L2 Services
Registering and Using Oracle Network Services on L2 Chains
Registry Contract
L2 Chain Management
function proposeNewChain(
uint256 _chainID,
string memory _jsonRpc,
address _endpoint
) external payable {
if (msg.value < proposeFee) {
revert NotEnoughFee();
}
if (chainRegistry[_chainID].owner != address(0)) {
revert ChainExisted();
}
pendingProposal[_chainID].jsonRpc = _jsonRpc;
pendingProposal[_chainID].endpoint = _endpoint;
pendingProposal[_chainID].owner = msg.sender;
emit ChainProposed(msg.sender, _chainID);
}Account and Payment Functions
Endpoint Contracts
L2Endpoint
L2EndpointHow to Integrate VRF and Request-Response on L2
VRF
Request-Response
Last updated