Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Latest 25 from a total of 1,095,044 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Entropy Callback | 36520276 | 33 secs ago | IN | 0 ETH | 0.0000066 | ||||
| Entropy Callback | 36518797 | 12 mins ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36518755 | 12 mins ago | IN | 0 ETH | 0.00000585 | ||||
| Entropy Callback | 36518721 | 12 mins ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36518705 | 12 mins ago | IN | 0 ETH | 0.00000609 | ||||
| Entropy Callback | 36518674 | 13 mins ago | IN | 0 ETH | 0.00000594 | ||||
| Entropy Callback | 36511727 | 1 hr ago | IN | 0 ETH | 0.00000585 | ||||
| Entropy Callback | 36511558 | 1 hr ago | IN | 0 ETH | 0.0000066 | ||||
| Entropy Callback | 36496867 | 3 hrs ago | IN | 0 ETH | 0.00000621 | ||||
| Entropy Callback | 36493805 | 3 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36493698 | 3 hrs ago | IN | 0 ETH | 0.00000585 | ||||
| Entropy Callback | 36493609 | 3 hrs ago | IN | 0 ETH | 0.00000609 | ||||
| Entropy Callback | 36493555 | 3 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36493522 | 3 hrs ago | IN | 0 ETH | 0.00000621 | ||||
| Entropy Callback | 36491012 | 4 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36490971 | 4 hrs ago | IN | 0 ETH | 0.00000621 | ||||
| Entropy Callback | 36483879 | 5 hrs ago | IN | 0 ETH | 0.00000564 | ||||
| Entropy Callback | 36483856 | 5 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36483832 | 5 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36483812 | 5 hrs ago | IN | 0 ETH | 0.00000564 | ||||
| Entropy Callback | 36483790 | 5 hrs ago | IN | 0 ETH | 0.00000564 | ||||
| Entropy Callback | 36483763 | 5 hrs ago | IN | 0 ETH | 0.00000585 | ||||
| Entropy Callback | 36483741 | 5 hrs ago | IN | 0 ETH | 0.0000057 | ||||
| Entropy Callback | 36483714 | 5 hrs ago | IN | 0 ETH | 0.0000058 | ||||
| Entropy Callback | 36483689 | 5 hrs ago | IN | 0 ETH | 0.0000057 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 13114685 | 208 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
VRFProvider
Compiler Version
v0.8.28+commit.7893614a
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {IVRFProvider, IVRFConsumer} from "./IVRF.sol";
contract VRFProvider is IVRFProvider {
address private owner;
mapping(address => bool) public signers;
uint256 private seqNo = 100_000_000;
mapping(address => bool) consumers;
mapping(uint256 => address) callbacks;
event RandomnessRequested(uint256 indexed seqNo, address indexed consumer);
event RandomnessReceived(uint256 indexed seqNo, uint256 randomNumber, bytes signature);
constructor() {
owner = msg.sender;
}
function setConsumer(address consumer, bool enabled) external {
require(owner == msg.sender, "only owner");
consumers[consumer] = enabled;
}
function setSigner(address signer, bool enabled) external {
require(owner == msg.sender, "only owner");
signers[signer] = enabled;
}
function requestRandomNumberWithTraceId(uint256 _traceId) external returns (uint256) {
require(consumers[msg.sender], "only consumers");
callbacks[++seqNo] = msg.sender;
emit RandomnessRequested(seqNo, msg.sender);
return seqNo;
}
function entropyCallback(uint256 _seqNo, uint256 randomNumber, bytes calldata _signature) external {
require(callbacks[_seqNo] != address(0), "missing callback");
require(
_isValidSignature(
keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(abi.encode(_seqNo, randomNumber)))
),
_signature
),
"Invalid signature"
);
address consumer = callbacks[_seqNo];
delete callbacks[_seqNo];
IVRFConsumer(consumer).randomNumberCallback(_seqNo, randomNumber);
emit RandomnessReceived(_seqNo, randomNumber, _signature);
}
function _isValidSignature(bytes32 _hash, bytes memory _signature) internal view returns (bool) {
require(_signature.length == 65, "Invalid signature length");
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(_signature, 32))
s := mload(add(_signature, 64))
v := byte(0, mload(add(_signature, 96)))
}
if (v < 27) v += 27;
address recoveredSigner = ecrecover(_hash, v, r, s);
return signers[recoveredSigner];
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
interface IVRFConsumer {
function randomNumberCallback(uint256 requestId, uint256 randomNumber) external;
}
interface IVRFProvider {
function requestRandomNumberWithTraceId(uint256 traceId) external returns (uint256);
function entropyCallback(uint256 _seqNo, uint256 randomNumber, bytes calldata _signature) external;
}{
"viaIR": false,
"codegen": "yul",
"evmVersion": "cancun",
"outputSelection": {
"*": {
"*": [
"abi",
"metadata"
],
"": [
"ast"
]
}
},
"optimizer": {
"enabled": true,
"mode": "3",
"fallback_to_optimizing_for_size": false,
"disable_system_request_memoization": true
},
"metadata": {},
"libraries": {},
"enableEraVMExtensions": false,
"forceEVMLA": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seqNo","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"}],"name":"RandomnessReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seqNo","type":"uint256"},{"indexed":true,"internalType":"address","name":"consumer","type":"address"}],"name":"RandomnessRequested","type":"event"},{"inputs":[{"internalType":"uint256","name":"_seqNo","type":"uint256"},{"internalType":"uint256","name":"randomNumber","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"entropyCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traceId","type":"uint256"}],"name":"requestRandomNumberWithTraceId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"consumer","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setConsumer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000eba2d2efd26cbe8535b7e3800bf31e29fe85e8a142458a5606a536cc0900000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0002000000000002000a000000000002000000000301034f00010000000103550000006001100270000000c00010019d0000008004000039000000400040043f00000001002001900000003e0000c13d000000c001100197000000040010008c000001640000413d000000000203043b000000e002200270000000c40020009c0000004e0000a13d000000c50020009c000000650000613d000000c60020009c0000007b0000613d000000c70020009c000001640000c13d000000240010008c000001640000413d0000000001000416000000000001004b000001640000c13d0000000001000411000000000010043f0000000301000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c7000080100200003902fd02f80000040f0000000100200190000001640000613d000000000101043b000000000101041a000000ff00100190000000d80000c13d000000400100043d0000004402100039000000d103000041000000000032043500000024021000390000000e030000390000000000320435000000d2020000410000000000210435000000040210003900000020030000390000000000320435000000c00010009c000000c0010080410000004001100210000000d3011001c7000002ff000104300000000001000416000000000001004b000001640000c13d000000c1010000410000000202000039000000000012041b000000000100041a000000c2011001970000000002000411000000000121019f000000000010041b000000200100003900000100001004430000012000000443000000c301000041000002fe0001042e000000c80020009c000000bb0000613d000000c90020009c000001640000c13d0000000002000416000000000002004b000001640000c13d02fd02b60000040f000000000300041a000000cb033001970000000004000411000000000043004b00000000030000390000000103006039000900000001001d000a00000002001d000000000103001902fd02c90000040f0000000901000029000000cb01100197000000000010043f0000000101000039000000cd0000013d000000240010008c000001640000413d0000000001000416000000000001004b000001640000c13d0000000401300370000000000101043b000000cb0010009c000001640000213d000000000010043f0000000101000039000000200010043f0000004002000039000000000100001902fd02de0000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000000e501000041000002fe0001042e000000640010008c000001640000413d0000000002000416000000000002004b000001640000c13d0000002402300370000000000602043b0000000402300370000000000502043b0000004402300370000000000202043b000000d40020009c000001640000213d0000002304200039000000000014004b000001640000813d0000000404200039000000000343034f000000000303043b000000d40030009c000001640000213d0000000002320019000a00240020003d0000000a0010006b000001640000213d000000000050043f0000000401000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c70000801002000039000900000005001d000700000003001d000800000006001d000600000004001d02fd02f80000040f000000080400002900000009030000290000000100200190000001640000613d000000400200043d000000000101043b000000000101041a000000cb001001980000010e0000c13d0000004401200039000000e4030000410000000000310435000000240120003900000010030000390000000000310435000000d2010000410000000000120435000000040120003900000020030000390000000000310435000000c00020009c000000c0020080410000004001200210000000d3011001c7000002ff000104300000000002000416000000000002004b000001640000c13d02fd02b60000040f000000000300041a000000cb033001970000000004000411000000000043004b00000000030000390000000103006039000900000001001d000a00000002001d000000000103001902fd02c90000040f0000000901000029000000cb01100197000000000010043f0000000301000039000000200010043f0000004002000039000000000100001902fd02de0000040f000000000301041a000000e6023001970000000a0000006b000000010220c1bf000000000021041b0000000001000019000002fe0001042e0000000202000039000000000102041a000000010110003a000000e20000c13d000000cf01000041000000000010043f0000001101000039000000040010043f000000d001000041000002ff00010430000000000012041b000000000010043f0000000401000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c7000080100200003902fd02f80000040f0000000100200190000001640000613d000000000101043b000000000201041a000000c2022001970000000006000411000000cb03600197000000000232019f000000000021041b0000000201000039000000000501041a000000400100043d000a00000001001d0000000001000414000000c00010009c000000c001008041000000c001100210000000cc011001c70000800d020000390000000303000039000000cd04000041000900000005001d02fd02f30000040f0000000100200190000001640000613d0000000a0100002900000009020000290000000000210435000000c00010009c000000c0010080410000004001100210000000ce011001c7000002fe0001042e00000040012000390000000000410435000000400100003900000000011204360000000000310435000000d50020009c000001340000813d0000006003200039000000400030043f000000c00010009c000000c00100804100000040011002100000000002020433000000c00020009c000000c0020080410000006002200210000000000112019f0000000002000414000000c00020009c000000c002008041000000c002200210000000000112019f000000cc011001c7000080100200003902fd02f80000040f0000000100200190000001640000613d000000000301043b000000400100043d0000002002100039000000d60400004100000000004204350000003c0410003900000000003404350000003c030000390000000000310435000000d70010009c0000013a0000a13d000000cf01000041000000000010043f0000004101000039000000040010043f000000d001000041000002ff000104300000006003100039000000400030043f000000c00020009c000000c00200804100000040022002100000000001010433000000c00010009c000000c0010080410000006001100210000000000121019f0000000002000414000000c00020009c000000c002008041000000c002200210000000000112019f000000cc011001c7000080100200003902fd02f80000040f000000060700002900000007060000290000000100200190000001640000613d0000001f02600039000000e702200197000500000002001d0000003f02200039000000e703200197000000000101043b000000400200043d0000000003320019000000000023004b00000000050000390000000105004039000000d40030009c000001340000213d0000000100500190000001340000c13d000000400030043f00000000036204360000000a08000029000000000080007c000001660000a13d0000000001000019000002ff00010430000000e704600198000a001f00600193000400000004001d00000000044300190000002005700039000600000005001d0000000105500367000001740000613d000000000605034f0000000007030019000000006806043c0000000007870436000000000047004b000001700000c13d0000000a0000006b000001820000613d00000004055003600000000a060000290000000306600210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f000000000054043500000007043000290000000000040435000000400400043d0000000005020433000000410050008c000001db0000c13d000000600520003900000000050504330000000003030433000000400220003900000000020204330000006006400039000000000026043500000040024000390000000000320435000000f8025002700000001b03200039000000ff0330018f000000d90050009c0000000003028019000000200240003900000000003204350000000000140435000000c00040009c000000c004008041000000000000043f00000040014002100000000002000414000000c00020009c000000c002008041000000c002200210000000000112019f000000da011001c7000000010200003902fd02f80000040f0000006003100270000000c003300197000000200030008c000000200400003900000000040340190000001f0540018f0000002004400190000001b30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000047004b000001af0000c13d000000000005004b000001c00000613d000000000641034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350000000100200190000001eb0000613d000000000100043d000000cb01100197000000000010043f0000000101000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c7000080100200003902fd02f80000040f0000000100200190000001640000613d000000000101043b000000000101041a000000ff00100190000002090000c13d000000400100043d0000004402100039000000e303000041000000000032043500000024021000390000001103000039000000330000013d0000004401400039000000d8020000410000000000210435000000240140003900000018020000390000000000210435000000d2010000410000000000140435000000040140003900000020020000390000000000210435000000c00040009c000000c0040080410000004001400210000000d3011001c7000002ff000104300000001f0530018f000000db06300198000000400200043d0000000004620019000001f60000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000001f20000c13d000000000005004b000002030000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000000c00020009c000000c0020080410000004002200210000000000112019f000002ff000104300000000901000029000000000010043f0000000401000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c7000080100200003902fd02f80000040f00000009030000290000000100200190000001640000613d000000000101043b000000000101041a000300000001001d000000000030043f0000000401000039000000200010043f0000000001000414000000c00010009c000000c001008041000000c001100210000000ca011001c7000080100200003902fd02f80000040f0000000100200190000001640000613d0000000302000029000000cb03200197000000000101043b000000000201041a000000c202200197000000000021041b000000dc010000410000000000100443000300000003001d00000004003004430000000001000414000000c00010009c000000c001008041000000c001100210000000dd011001c7000080020200003902fd02f80000040f0000000100200190000002990000613d000000000101043b000000000001004b00000009020000290000000803000029000001640000613d000000400400043d00000024014000390000000000310435000000de010000410000000001140436000100000001001d000200000004001d0000000401400039000000000021043500000000010004140000000302000029000000040020008c000002580000613d0000000202000029000000c00020009c000000c0020080410000004002200210000000c00010009c000000c001008041000000c001100210000000000121019f000000df011001c7000000030200002902fd02f30000040f00000001002001900000029a0000613d0000000201000029000000d40010009c00000007020000290000000803000029000001340000213d0000000204000029000000400040043f0000004001400039000000000021043500000040010000390000000102000029000000000012043500000000003404350000006001400039000000040210002900000006030000290000000103300367000000040000006b000002710000613d000000000403034f0000000005010019000000004604043c0000000005650436000000000025004b0000026d0000c13d0000000a0000006b0000027f0000613d00000004033003600000000a040000290000000304400210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000070110002900000000000104350000000201000029000000c00010009c000000c00100804100000040011002100000000502000029000000e00020009c000000e0020080410000006002200210000000000112019f0000000002000414000000c00020009c000000c002008041000000c002200210000000000121019f000000e10110009a0000800d020000390000000203000039000000e204000041000000090500002902fd02f30000040f0000000100200190000001640000613d0000000001000019000002fe0001042e000000000001042f00000060061002700000001f0460018f000000db05600198000000400200043d0000000003520019000002a60000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000038004b000002a20000c13d000000c006600197000000000004004b000002b40000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000006001600210000002040000013d000000e80010009c000002c70000213d000000430010008c000002c70000a13d00000001020003670000000401200370000000000101043b000000cb0010009c000002c70000213d0000002402200370000000000202043b000000000002004b0000000003000039000000010300c039000000000032004b000002c70000c13d000000000001042d0000000001000019000002ff00010430000000000001004b000002cc0000613d000000000001042d000000400100043d0000004402100039000000e903000041000000000032043500000024021000390000000a030000390000000000320435000000d2020000410000000000210435000000040210003900000020030000390000000000320435000000c00010009c000000c0010080410000004001100210000000d3011001c7000002ff00010430000000000001042f000000c00010009c000000c0010080410000004001100210000000c00020009c000000c0020080410000006002200210000000000112019f0000000002000414000000c00020009c000000c002008041000000c002200210000000000112019f000000cc011001c7000080100200003902fd02f80000040f0000000100200190000002f10000613d000000000101043b000000000001042d0000000001000019000002ff00010430000002f6002104210000000102000039000000000001042d0000000002000019000000000001042d000002fb002104230000000102000039000000000001042d0000000002000019000000000001042d000002fd00000432000002fe0001042e000002ff0001043000000000000000000000000000000000000000000000000000000000ffffffff0000000000000000000000000000000000000000000000000000000005f5e100ffffffffffffffffffffffff0000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000736c0d5a00000000000000000000000000000000000000000000000000000000736c0d5b000000000000000000000000000000000000000000000000000000009bc4390100000000000000000000000000000000000000000000000000000000e39144720000000000000000000000000000000000000000000000000000000002c9ef450000000000000000000000000000000000000000000000000000000031cb61050200000000000000000000000000000000000040000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff020000000000000000000000000000000000000000000000000000000000000028f521cf7abd0044cba5bb040c5217ff69a4e5865f5262905018698e68fe7d0000000000000000000000000000000000000000200000000000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006f6e6c7920636f6e73756d65727300000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffa019457468657265756d205369676e6564204d6573736167653a0a333200000000000000000000000000000000000000000000000000000000ffffffffffffff9f496e76616c6964207369676e6174757265206c656e67746800000000000000001b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe01806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000008f561acc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff9ffdffffffffffffffffffffffffffffffffffffa0000000000000000000000000c7adfbb2cc10826a0f248ad07418fe525e921af696e6d1e03414e95ecc1a3c15496e76616c6964207369676e61747572650000000000000000000000000000006d697373696e672063616c6c6261636b000000000000000000000000000000000000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f6e6c79206f776e657200000000000000000000000000000000000000000000e3a7c509816b9deda02cb54e77a422366ebd0f5b3eeb1bcc0cb835d3c7926c5a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.