Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save auryn-macmillan/b352d49c502046d5fa22bcdbcb3fba59 to your computer and use it in GitHub Desktop.
Save auryn-macmillan/b352d49c502046d5fa22bcdbcb3fba59 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
},
{
"files": "*.yml",
"options": {}
},
{
"files": "*.yaml",
"options": {}
},
{
"files": "*.toml",
"options": {}
},
{
"files": "*.json",
"options": {}
},
{
"files": "*.js",
"options": {}
},
{
"files": "*.ts",
"options": {}
}
]
}
{
"id": "71bcb05d017f8b632b153bff8ec63230",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.17",
"solcLongVersion": "0.8.17+commit.8df45f5f",
"input": {
"language": "Solidity",
"sources": {
"Hashi.sol": {
"content": "pragma solidity ^0.8.17;\n\ncontract Hashi {\n mapping (address => mapping (uint256 => bytes32)) public blockHeaders;\n\n \n}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"Hashi.sol": {
"Hashi": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "blockHeaders",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"Hashi.sol\":26:125 contract Hashi {... */\n mstore(0x40, 0x80)\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\ntag_1:\n pop\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x00\n codecopy\n 0x00\n return\nstop\n\nsub_0: assembly {\n /* \"Hashi.sol\":26:125 contract Hashi {... */\n mstore(0x40, 0x80)\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\n tag_1:\n pop\n jumpi(tag_2, lt(calldatasize, 0x04))\n shr(0xe0, calldataload(0x00))\n dup1\n 0x0cff03aa\n eq\n tag_3\n jumpi\n tag_2:\n 0x00\n dup1\n revert\n /* \"Hashi.sol\":47:116 mapping (address => mapping (uint256 => bytes32)) public blockHeaders */\n tag_3:\n tag_4\n 0x04\n dup1\n calldatasize\n sub\n dup2\n add\n swap1\n tag_5\n swap2\n swap1\n tag_6\n jump\t// in\n tag_5:\n tag_7\n jump\t// in\n tag_4:\n mload(0x40)\n tag_8\n swap2\n swap1\n tag_9\n jump\t// in\n tag_8:\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n tag_7:\n mstore(0x20, 0x00)\n dup2\n 0x00\n mstore\n mstore(0x20, keccak256(0x00, 0x40))\n dup1\n 0x00\n mstore\n keccak256(0x00, 0x40)\n 0x00\n swap2\n pop\n swap2\n pop\n pop\n sload\n dup2\n jump\t// out\n /* \"#utility.yul\":88:205 */\n tag_11:\n /* \"#utility.yul\":197:198 */\n 0x00\n /* \"#utility.yul\":194:195 */\n dup1\n /* \"#utility.yul\":187:199 */\n revert\n /* \"#utility.yul\":334:460 */\n tag_13:\n /* \"#utility.yul\":371:378 */\n 0x00\n /* \"#utility.yul\":411:453 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"#utility.yul\":404:409 */\n dup3\n /* \"#utility.yul\":400:454 */\n and\n /* \"#utility.yul\":389:454 */\n swap1\n pop\n /* \"#utility.yul\":334:460 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":466:562 */\n tag_14:\n /* \"#utility.yul\":503:510 */\n 0x00\n /* \"#utility.yul\":532:556 */\n tag_28\n /* \"#utility.yul\":550:555 */\n dup3\n /* \"#utility.yul\":532:556 */\n tag_13\n jump\t// in\n tag_28:\n /* \"#utility.yul\":521:556 */\n swap1\n pop\n /* \"#utility.yul\":466:562 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":568:690 */\n tag_15:\n /* \"#utility.yul\":641:665 */\n tag_30\n /* \"#utility.yul\":659:664 */\n dup2\n /* \"#utility.yul\":641:665 */\n tag_14\n jump\t// in\n tag_30:\n /* \"#utility.yul\":634:639 */\n dup2\n /* \"#utility.yul\":631:666 */\n eq\n /* \"#utility.yul\":621:684 */\n tag_31\n jumpi\n /* \"#utility.yul\":680:681 */\n 0x00\n /* \"#utility.yul\":677:678 */\n dup1\n /* \"#utility.yul\":670:682 */\n revert\n /* \"#utility.yul\":621:684 */\n tag_31:\n /* \"#utility.yul\":568:690 */\n pop\n jump\t// out\n /* \"#utility.yul\":696:835 */\n tag_16:\n /* \"#utility.yul\":742:747 */\n 0x00\n /* \"#utility.yul\":780:786 */\n dup2\n /* \"#utility.yul\":767:787 */\n calldataload\n /* \"#utility.yul\":758:787 */\n swap1\n pop\n /* \"#utility.yul\":796:829 */\n tag_33\n /* \"#utility.yul\":823:828 */\n dup2\n /* \"#utility.yul\":796:829 */\n tag_15\n jump\t// in\n tag_33:\n /* \"#utility.yul\":696:835 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":841:918 */\n tag_17:\n /* \"#utility.yul\":878:885 */\n 0x00\n /* \"#utility.yul\":907:912 */\n dup2\n /* \"#utility.yul\":896:912 */\n swap1\n pop\n /* \"#utility.yul\":841:918 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":924:1046 */\n tag_18:\n /* \"#utility.yul\":997:1021 */\n tag_36\n /* \"#utility.yul\":1015:1020 */\n dup2\n /* \"#utility.yul\":997:1021 */\n tag_17\n jump\t// in\n tag_36:\n /* \"#utility.yul\":990:995 */\n dup2\n /* \"#utility.yul\":987:1022 */\n eq\n /* \"#utility.yul\":977:1040 */\n tag_37\n jumpi\n /* \"#utility.yul\":1036:1037 */\n 0x00\n /* \"#utility.yul\":1033:1034 */\n dup1\n /* \"#utility.yul\":1026:1038 */\n revert\n /* \"#utility.yul\":977:1040 */\n tag_37:\n /* \"#utility.yul\":924:1046 */\n pop\n jump\t// out\n /* \"#utility.yul\":1052:1191 */\n tag_19:\n /* \"#utility.yul\":1098:1103 */\n 0x00\n /* \"#utility.yul\":1136:1142 */\n dup2\n /* \"#utility.yul\":1123:1143 */\n calldataload\n /* \"#utility.yul\":1114:1143 */\n swap1\n pop\n /* \"#utility.yul\":1152:1185 */\n tag_39\n /* \"#utility.yul\":1179:1184 */\n dup2\n /* \"#utility.yul\":1152:1185 */\n tag_18\n jump\t// in\n tag_39:\n /* \"#utility.yul\":1052:1191 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":1197:1671 */\n tag_6:\n /* \"#utility.yul\":1265:1271 */\n 0x00\n /* \"#utility.yul\":1273:1279 */\n dup1\n /* \"#utility.yul\":1322:1324 */\n 0x40\n /* \"#utility.yul\":1310:1319 */\n dup4\n /* \"#utility.yul\":1301:1308 */\n dup6\n /* \"#utility.yul\":1297:1320 */\n sub\n /* \"#utility.yul\":1293:1325 */\n slt\n /* \"#utility.yul\":1290:1409 */\n iszero\n tag_41\n jumpi\n /* \"#utility.yul\":1328:1407 */\n tag_42\n tag_11\n jump\t// in\n tag_42:\n /* \"#utility.yul\":1290:1409 */\n tag_41:\n /* \"#utility.yul\":1448:1449 */\n 0x00\n /* \"#utility.yul\":1473:1526 */\n tag_43\n /* \"#utility.yul\":1518:1525 */\n dup6\n /* \"#utility.yul\":1509:1515 */\n dup3\n /* \"#utility.yul\":1498:1507 */\n dup7\n /* \"#utility.yul\":1494:1516 */\n add\n /* \"#utility.yul\":1473:1526 */\n tag_16\n jump\t// in\n tag_43:\n /* \"#utility.yul\":1463:1526 */\n swap3\n pop\n /* \"#utility.yul\":1419:1536 */\n pop\n /* \"#utility.yul\":1575:1577 */\n 0x20\n /* \"#utility.yul\":1601:1654 */\n tag_44\n /* \"#utility.yul\":1646:1653 */\n dup6\n /* \"#utility.yul\":1637:1643 */\n dup3\n /* \"#utility.yul\":1626:1635 */\n dup7\n /* \"#utility.yul\":1622:1644 */\n add\n /* \"#utility.yul\":1601:1654 */\n tag_19\n jump\t// in\n tag_44:\n /* \"#utility.yul\":1591:1654 */\n swap2\n pop\n /* \"#utility.yul\":1546:1664 */\n pop\n /* \"#utility.yul\":1197:1671 */\n swap3\n pop\n swap3\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":1677:1754 */\n tag_20:\n /* \"#utility.yul\":1714:1721 */\n 0x00\n /* \"#utility.yul\":1743:1748 */\n dup2\n /* \"#utility.yul\":1732:1748 */\n swap1\n pop\n /* \"#utility.yul\":1677:1754 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":1760:1878 */\n tag_21:\n /* \"#utility.yul\":1847:1871 */\n tag_47\n /* \"#utility.yul\":1865:1870 */\n dup2\n /* \"#utility.yul\":1847:1871 */\n tag_20\n jump\t// in\n tag_47:\n /* \"#utility.yul\":1842:1845 */\n dup3\n /* \"#utility.yul\":1835:1872 */\n mstore\n /* \"#utility.yul\":1760:1878 */\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":1884:2106 */\n tag_9:\n /* \"#utility.yul\":1977:1981 */\n 0x00\n /* \"#utility.yul\":2015:2017 */\n 0x20\n /* \"#utility.yul\":2004:2013 */\n dup3\n /* \"#utility.yul\":2000:2018 */\n add\n /* \"#utility.yul\":1992:2018 */\n swap1\n pop\n /* \"#utility.yul\":2028:2099 */\n tag_49\n /* \"#utility.yul\":2096:2097 */\n 0x00\n /* \"#utility.yul\":2085:2094 */\n dup4\n /* \"#utility.yul\":2081:2098 */\n add\n /* \"#utility.yul\":2072:2078 */\n dup5\n /* \"#utility.yul\":2028:2099 */\n tag_21\n jump\t// in\n tag_49:\n /* \"#utility.yul\":1884:2106 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n\n auxdata: 0xa2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506101c8806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80630cff03aa14610030575b600080fd5b61004a6004803603810190610045919061011e565b610060565b6040516100579190610177565b60405180910390f35b6000602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100b58261008a565b9050919050565b6100c5816100aa565b81146100d057600080fd5b50565b6000813590506100e2816100bc565b92915050565b6000819050919050565b6100fb816100e8565b811461010657600080fd5b50565b600081359050610118816100f2565b92915050565b6000806040838503121561013557610134610085565b5b6000610143858286016100d3565b925050602061015485828601610109565b9150509250929050565b6000819050919050565b6101718161015e565b82525050565b600060208201905061018c6000830184610168565b9291505056fea2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1C8 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFF03AA EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP2 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP2 POP POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xB5 DUP3 PUSH2 0x8A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC5 DUP2 PUSH2 0xAA JUMP JUMPDEST DUP2 EQ PUSH2 0xD0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE2 DUP2 PUSH2 0xBC JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xFB DUP2 PUSH2 0xE8 JUMP JUMPDEST DUP2 EQ PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x118 DUP2 PUSH2 0xF2 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x135 JUMPI PUSH2 0x134 PUSH2 0x85 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x143 DUP6 DUP3 DUP7 ADD PUSH2 0xD3 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x154 DUP6 DUP3 DUP7 ADD PUSH2 0x109 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x171 DUP2 PUSH2 0x15E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x18C PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x168 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4B SAR CALLDATALOAD 0x27 DUP3 0xB8 0xCA LOG2 CALLDATASIZE ISZERO 0x5C 0xAD 0x25 0x4B PUSH4 0xEE65D6A7 DUP8 DUP16 MLOAD CALLDATASIZE 0xC 0xF6 CALLVALUE 0xE2 0xC 0x4B SHR SELFBALANCE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "26:99:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@blockHeaders_7": {
"entryPoint": 96,
"id": 7,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_decode_t_address": {
"entryPoint": 211,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint256": {
"entryPoint": 265,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_uint256": {
"entryPoint": 286,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_encode_t_bytes32_to_t_bytes32_fromStack": {
"entryPoint": 360,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": {
"entryPoint": 375,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 170,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_bytes32": {
"entryPoint": 350,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 138,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 232,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 133,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 188,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 242,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2109:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "47:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "57:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
}
],
"src": "7:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "177:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "379:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "389:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "404:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "411:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "400:3:1"
},
"nodeType": "YulFunctionCall",
"src": "400:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "361:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "371:7:1",
"type": ""
}
],
"src": "334:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "511:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "521:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "550:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "532:17:1"
},
"nodeType": "YulFunctionCall",
"src": "532:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "521:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "493:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "503:7:1",
"type": ""
}
],
"src": "466:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "611:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "668:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "677:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "680:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "670:6:1"
},
"nodeType": "YulFunctionCall",
"src": "670:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "670:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "634:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "659:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "641:17:1"
},
"nodeType": "YulFunctionCall",
"src": "641:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "631:2:1"
},
"nodeType": "YulFunctionCall",
"src": "631:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "624:6:1"
},
"nodeType": "YulFunctionCall",
"src": "624:43:1"
},
"nodeType": "YulIf",
"src": "621:63:1"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "604:5:1",
"type": ""
}
],
"src": "568:122:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "748:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "758:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "780:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "767:12:1"
},
"nodeType": "YulFunctionCall",
"src": "767:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "758:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "823:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "796:26:1"
},
"nodeType": "YulFunctionCall",
"src": "796:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "796:33:1"
}
]
},
"name": "abi_decode_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "726:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "734:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "742:5:1",
"type": ""
}
],
"src": "696:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "886:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "896:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "907:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "896:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "868:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "878:7:1",
"type": ""
}
],
"src": "841:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "967:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1024:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1033:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1036:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1026:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1026:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1026:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "990:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1015:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "997:17:1"
},
"nodeType": "YulFunctionCall",
"src": "997:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "987:2:1"
},
"nodeType": "YulFunctionCall",
"src": "987:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "980:6:1"
},
"nodeType": "YulFunctionCall",
"src": "980:43:1"
},
"nodeType": "YulIf",
"src": "977:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "960:5:1",
"type": ""
}
],
"src": "924:122:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1104:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1114:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1136:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "1123:12:1"
},
"nodeType": "YulFunctionCall",
"src": "1123:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1114:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1179:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "1152:26:1"
},
"nodeType": "YulFunctionCall",
"src": "1152:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "1152:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1082:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1090:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1098:5:1",
"type": ""
}
],
"src": "1052:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1280:391:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1326:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "1328:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1328:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1328:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1301:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1310:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1297:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1297:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1322:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1293:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1293:32:1"
},
"nodeType": "YulIf",
"src": "1290:119:1"
},
{
"nodeType": "YulBlock",
"src": "1419:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1434:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1448:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1438:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1463:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1498:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1509:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1494:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1494:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1518:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nodeType": "YulIdentifier",
"src": "1473:20:1"
},
"nodeType": "YulFunctionCall",
"src": "1473:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1463:6:1"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "1546:118:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1561:16:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1575:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1565:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1591:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1626:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1637:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1622:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1622:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1646:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "1601:20:1"
},
"nodeType": "YulFunctionCall",
"src": "1601:53:1"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1591:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1242:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1253:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1265:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1273:6:1",
"type": ""
}
],
"src": "1197:474:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1722:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1732:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "1743:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1732:7:1"
}
]
}
]
},
"name": "cleanup_t_bytes32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1704:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1714:7:1",
"type": ""
}
],
"src": "1677:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1825:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1842:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1865:5:1"
}
],
"functionName": {
"name": "cleanup_t_bytes32",
"nodeType": "YulIdentifier",
"src": "1847:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1847:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1835:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1835:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "1835:37:1"
}
]
},
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1813:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1820:3:1",
"type": ""
}
],
"src": "1760:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1982:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1992:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2004:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2015:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2000:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2000:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1992:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "2072:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2085:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2096:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2081:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2081:17:1"
}
],
"functionName": {
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nodeType": "YulIdentifier",
"src": "2028:43:1"
},
"nodeType": "YulFunctionCall",
"src": "2028:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "2028:71:1"
}
]
},
"name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1954:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1966:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1977:4:1",
"type": ""
}
],
"src": "1884:222:1"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_bytes32(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_bytes32_to_t_bytes32_fromStack(value, pos) {\n mstore(pos, cleanup_t_bytes32(value))\n }\n\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value0, add(headStart, 0))\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c80630cff03aa14610030575b600080fd5b61004a6004803603810190610045919061011e565b610060565b6040516100579190610177565b60405180910390f35b6000602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100b58261008a565b9050919050565b6100c5816100aa565b81146100d057600080fd5b50565b6000813590506100e2816100bc565b92915050565b6000819050919050565b6100fb816100e8565b811461010657600080fd5b50565b600081359050610118816100f2565b92915050565b6000806040838503121561013557610134610085565b5b6000610143858286016100d3565b925050602061015485828601610109565b9150509250929050565b6000819050919050565b6101718161015e565b82525050565b600060208201905061018c6000830184610168565b9291505056fea2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFF03AA EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP2 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP2 POP POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xB5 DUP3 PUSH2 0x8A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC5 DUP2 PUSH2 0xAA JUMP JUMPDEST DUP2 EQ PUSH2 0xD0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE2 DUP2 PUSH2 0xBC JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xFB DUP2 PUSH2 0xE8 JUMP JUMPDEST DUP2 EQ PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x118 DUP2 PUSH2 0xF2 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x135 JUMPI PUSH2 0x134 PUSH2 0x85 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x143 DUP6 DUP3 DUP7 ADD PUSH2 0xD3 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x154 DUP6 DUP3 DUP7 ADD PUSH2 0x109 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x171 DUP2 PUSH2 0x15E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x18C PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x168 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4B SAR CALLDATALOAD 0x27 DUP3 0xB8 0xCA LOG2 CALLDATASIZE ISZERO 0x5C 0xAD 0x25 0x4B PUSH4 0xEE65D6A7 DUP8 DUP16 MLOAD CALLDATASIZE 0xC 0xF6 CALLVALUE 0xE2 0xC 0x4B SHR SELFBALANCE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "26:99:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47:69;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:77::-;878:7;907:5;896:16;;841:77;;;:::o;924:122::-;997:24;1015:5;997:24;:::i;:::-;990:5;987:35;977:63;;1036:1;1033;1026:12;977:63;924:122;:::o;1052:139::-;1098:5;1136:6;1123:20;1114:29;;1152:33;1179:5;1152:33;:::i;:::-;1052:139;;;;:::o;1197:474::-;1265:6;1273;1322:2;1310:9;1301:7;1297:23;1293:32;1290:119;;;1328:79;;:::i;:::-;1290:119;1448:1;1473:53;1518:7;1509:6;1498:9;1494:22;1473:53;:::i;:::-;1463:63;;1419:117;1575:2;1601:53;1646:7;1637:6;1626:9;1622:22;1601:53;:::i;:::-;1591:63;;1546:118;1197:474;;;;;:::o;1677:77::-;1714:7;1743:5;1732:16;;1677:77;;;:::o;1760:118::-;1847:24;1865:5;1847:24;:::i;:::-;1842:3;1835:37;1760:118;;:::o;1884:222::-;1977:4;2015:2;2004:9;2000:18;1992:26;;2028:71;2096:1;2085:9;2081:17;2072:6;2028:71;:::i;:::-;1884:222;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "91200",
"executionCost": "141",
"totalCost": "91341"
},
"external": {
"blockHeaders(address,uint256)": "3028"
}
},
"legacyAssembly": {
".code": [
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 26,
"end": 125,
"name": "MSTORE",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "ISZERO",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 26,
"end": 125,
"name": "JUMPI",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "REVERT",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 26,
"end": 125,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "POP",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "CODECOPY",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033",
".code": [
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 26,
"end": 125,
"name": "MSTORE",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "ISZERO",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 26,
"end": 125,
"name": "JUMPI",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "REVERT",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 26,
"end": 125,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "POP",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 26,
"end": 125,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "LT",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH [tag]",
"source": 0,
"value": "2"
},
{
"begin": 26,
"end": 125,
"name": "JUMPI",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "CALLDATALOAD",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "E0"
},
{
"begin": 26,
"end": 125,
"name": "SHR",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "CFF03AA"
},
{
"begin": 26,
"end": 125,
"name": "EQ",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH [tag]",
"source": 0,
"value": "3"
},
{
"begin": 26,
"end": 125,
"name": "JUMPI",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "tag",
"source": 0,
"value": "2"
},
{
"begin": 26,
"end": 125,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 26,
"end": 125,
"name": "DUP1",
"source": 0
},
{
"begin": 26,
"end": 125,
"name": "REVERT",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "tag",
"source": 0,
"value": "3"
},
{
"begin": 47,
"end": 116,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "4"
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 47,
"end": 116,
"name": "DUP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SUB",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "DUP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "ADD",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "5"
},
{
"begin": 47,
"end": 116,
"name": "SWAP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "6"
},
{
"begin": 47,
"end": 116,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "tag",
"source": 0,
"value": "5"
},
{
"begin": 47,
"end": 116,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "7"
},
{
"begin": 47,
"end": 116,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "tag",
"source": 0,
"value": "4"
},
{
"begin": 47,
"end": 116,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 47,
"end": 116,
"name": "MLOAD",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "8"
},
{
"begin": 47,
"end": 116,
"name": "SWAP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH [tag]",
"source": 0,
"value": "9"
},
{
"begin": 47,
"end": 116,
"jumpType": "[in]",
"name": "JUMP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "tag",
"source": 0,
"value": "8"
},
{
"begin": 47,
"end": 116,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 47,
"end": 116,
"name": "MLOAD",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "DUP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SUB",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "RETURN",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "tag",
"source": 0,
"value": "7"
},
{
"begin": 47,
"end": 116,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "20"
},
{
"begin": 47,
"end": 116,
"name": "MSTORE",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "DUP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "MSTORE",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "KECCAK256",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "20"
},
{
"begin": 47,
"end": 116,
"name": "MSTORE",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "DUP1",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "MSTORE",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "KECCAK256",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 47,
"end": 116,
"name": "SWAP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "POP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SWAP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "POP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "POP",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "SLOAD",
"source": 0
},
{
"begin": 47,
"end": 116,
"name": "DUP2",
"source": 0
},
{
"begin": 47,
"end": 116,
"jumpType": "[out]",
"name": "JUMP",
"source": 0
},
{
"begin": 88,
"end": 205,
"name": "tag",
"source": 1,
"value": "11"
},
{
"begin": 88,
"end": 205,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 197,
"end": 198,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 194,
"end": 195,
"name": "DUP1",
"source": 1
},
{
"begin": 187,
"end": 199,
"name": "REVERT",
"source": 1
},
{
"begin": 334,
"end": 460,
"name": "tag",
"source": 1,
"value": "13"
},
{
"begin": 334,
"end": 460,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 371,
"end": 378,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 411,
"end": 453,
"name": "PUSH",
"source": 1,
"value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
},
{
"begin": 404,
"end": 409,
"name": "DUP3",
"source": 1
},
{
"begin": 400,
"end": 454,
"name": "AND",
"source": 1
},
{
"begin": 389,
"end": 454,
"name": "SWAP1",
"source": 1
},
{
"begin": 389,
"end": 454,
"name": "POP",
"source": 1
},
{
"begin": 334,
"end": 460,
"name": "SWAP2",
"source": 1
},
{
"begin": 334,
"end": 460,
"name": "SWAP1",
"source": 1
},
{
"begin": 334,
"end": 460,
"name": "POP",
"source": 1
},
{
"begin": 334,
"end": 460,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 466,
"end": 562,
"name": "tag",
"source": 1,
"value": "14"
},
{
"begin": 466,
"end": 562,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 503,
"end": 510,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 532,
"end": 556,
"name": "PUSH [tag]",
"source": 1,
"value": "28"
},
{
"begin": 550,
"end": 555,
"name": "DUP3",
"source": 1
},
{
"begin": 532,
"end": 556,
"name": "PUSH [tag]",
"source": 1,
"value": "13"
},
{
"begin": 532,
"end": 556,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 532,
"end": 556,
"name": "tag",
"source": 1,
"value": "28"
},
{
"begin": 532,
"end": 556,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 521,
"end": 556,
"name": "SWAP1",
"source": 1
},
{
"begin": 521,
"end": 556,
"name": "POP",
"source": 1
},
{
"begin": 466,
"end": 562,
"name": "SWAP2",
"source": 1
},
{
"begin": 466,
"end": 562,
"name": "SWAP1",
"source": 1
},
{
"begin": 466,
"end": 562,
"name": "POP",
"source": 1
},
{
"begin": 466,
"end": 562,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 568,
"end": 690,
"name": "tag",
"source": 1,
"value": "15"
},
{
"begin": 568,
"end": 690,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 641,
"end": 665,
"name": "PUSH [tag]",
"source": 1,
"value": "30"
},
{
"begin": 659,
"end": 664,
"name": "DUP2",
"source": 1
},
{
"begin": 641,
"end": 665,
"name": "PUSH [tag]",
"source": 1,
"value": "14"
},
{
"begin": 641,
"end": 665,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 641,
"end": 665,
"name": "tag",
"source": 1,
"value": "30"
},
{
"begin": 641,
"end": 665,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 634,
"end": 639,
"name": "DUP2",
"source": 1
},
{
"begin": 631,
"end": 666,
"name": "EQ",
"source": 1
},
{
"begin": 621,
"end": 684,
"name": "PUSH [tag]",
"source": 1,
"value": "31"
},
{
"begin": 621,
"end": 684,
"name": "JUMPI",
"source": 1
},
{
"begin": 680,
"end": 681,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 677,
"end": 678,
"name": "DUP1",
"source": 1
},
{
"begin": 670,
"end": 682,
"name": "REVERT",
"source": 1
},
{
"begin": 621,
"end": 684,
"name": "tag",
"source": 1,
"value": "31"
},
{
"begin": 621,
"end": 684,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 568,
"end": 690,
"name": "POP",
"source": 1
},
{
"begin": 568,
"end": 690,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 696,
"end": 835,
"name": "tag",
"source": 1,
"value": "16"
},
{
"begin": 696,
"end": 835,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 742,
"end": 747,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 780,
"end": 786,
"name": "DUP2",
"source": 1
},
{
"begin": 767,
"end": 787,
"name": "CALLDATALOAD",
"source": 1
},
{
"begin": 758,
"end": 787,
"name": "SWAP1",
"source": 1
},
{
"begin": 758,
"end": 787,
"name": "POP",
"source": 1
},
{
"begin": 796,
"end": 829,
"name": "PUSH [tag]",
"source": 1,
"value": "33"
},
{
"begin": 823,
"end": 828,
"name": "DUP2",
"source": 1
},
{
"begin": 796,
"end": 829,
"name": "PUSH [tag]",
"source": 1,
"value": "15"
},
{
"begin": 796,
"end": 829,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 796,
"end": 829,
"name": "tag",
"source": 1,
"value": "33"
},
{
"begin": 796,
"end": 829,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 696,
"end": 835,
"name": "SWAP3",
"source": 1
},
{
"begin": 696,
"end": 835,
"name": "SWAP2",
"source": 1
},
{
"begin": 696,
"end": 835,
"name": "POP",
"source": 1
},
{
"begin": 696,
"end": 835,
"name": "POP",
"source": 1
},
{
"begin": 696,
"end": 835,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 841,
"end": 918,
"name": "tag",
"source": 1,
"value": "17"
},
{
"begin": 841,
"end": 918,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 878,
"end": 885,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 907,
"end": 912,
"name": "DUP2",
"source": 1
},
{
"begin": 896,
"end": 912,
"name": "SWAP1",
"source": 1
},
{
"begin": 896,
"end": 912,
"name": "POP",
"source": 1
},
{
"begin": 841,
"end": 918,
"name": "SWAP2",
"source": 1
},
{
"begin": 841,
"end": 918,
"name": "SWAP1",
"source": 1
},
{
"begin": 841,
"end": 918,
"name": "POP",
"source": 1
},
{
"begin": 841,
"end": 918,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 924,
"end": 1046,
"name": "tag",
"source": 1,
"value": "18"
},
{
"begin": 924,
"end": 1046,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 997,
"end": 1021,
"name": "PUSH [tag]",
"source": 1,
"value": "36"
},
{
"begin": 1015,
"end": 1020,
"name": "DUP2",
"source": 1
},
{
"begin": 997,
"end": 1021,
"name": "PUSH [tag]",
"source": 1,
"value": "17"
},
{
"begin": 997,
"end": 1021,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 997,
"end": 1021,
"name": "tag",
"source": 1,
"value": "36"
},
{
"begin": 997,
"end": 1021,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 990,
"end": 995,
"name": "DUP2",
"source": 1
},
{
"begin": 987,
"end": 1022,
"name": "EQ",
"source": 1
},
{
"begin": 977,
"end": 1040,
"name": "PUSH [tag]",
"source": 1,
"value": "37"
},
{
"begin": 977,
"end": 1040,
"name": "JUMPI",
"source": 1
},
{
"begin": 1036,
"end": 1037,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1033,
"end": 1034,
"name": "DUP1",
"source": 1
},
{
"begin": 1026,
"end": 1038,
"name": "REVERT",
"source": 1
},
{
"begin": 977,
"end": 1040,
"name": "tag",
"source": 1,
"value": "37"
},
{
"begin": 977,
"end": 1040,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 924,
"end": 1046,
"name": "POP",
"source": 1
},
{
"begin": 924,
"end": 1046,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"name": "tag",
"source": 1,
"value": "19"
},
{
"begin": 1052,
"end": 1191,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1098,
"end": 1103,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1136,
"end": 1142,
"name": "DUP2",
"source": 1
},
{
"begin": 1123,
"end": 1143,
"name": "CALLDATALOAD",
"source": 1
},
{
"begin": 1114,
"end": 1143,
"name": "SWAP1",
"source": 1
},
{
"begin": 1114,
"end": 1143,
"name": "POP",
"source": 1
},
{
"begin": 1152,
"end": 1185,
"name": "PUSH [tag]",
"source": 1,
"value": "39"
},
{
"begin": 1179,
"end": 1184,
"name": "DUP2",
"source": 1
},
{
"begin": 1152,
"end": 1185,
"name": "PUSH [tag]",
"source": 1,
"value": "18"
},
{
"begin": 1152,
"end": 1185,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1152,
"end": 1185,
"name": "tag",
"source": 1,
"value": "39"
},
{
"begin": 1152,
"end": 1185,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"name": "SWAP3",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"name": "SWAP2",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"name": "POP",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"name": "POP",
"source": 1
},
{
"begin": 1052,
"end": 1191,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "tag",
"source": 1,
"value": "6"
},
{
"begin": 1197,
"end": 1671,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1265,
"end": 1271,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1273,
"end": 1279,
"name": "DUP1",
"source": 1
},
{
"begin": 1322,
"end": 1324,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 1310,
"end": 1319,
"name": "DUP4",
"source": 1
},
{
"begin": 1301,
"end": 1308,
"name": "DUP6",
"source": 1
},
{
"begin": 1297,
"end": 1320,
"name": "SUB",
"source": 1
},
{
"begin": 1293,
"end": 1325,
"name": "SLT",
"source": 1
},
{
"begin": 1290,
"end": 1409,
"name": "ISZERO",
"source": 1
},
{
"begin": 1290,
"end": 1409,
"name": "PUSH [tag]",
"source": 1,
"value": "41"
},
{
"begin": 1290,
"end": 1409,
"name": "JUMPI",
"source": 1
},
{
"begin": 1328,
"end": 1407,
"name": "PUSH [tag]",
"source": 1,
"value": "42"
},
{
"begin": 1328,
"end": 1407,
"name": "PUSH [tag]",
"source": 1,
"value": "11"
},
{
"begin": 1328,
"end": 1407,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1328,
"end": 1407,
"name": "tag",
"source": 1,
"value": "42"
},
{
"begin": 1328,
"end": 1407,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1290,
"end": 1409,
"name": "tag",
"source": 1,
"value": "41"
},
{
"begin": 1290,
"end": 1409,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1448,
"end": 1449,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1473,
"end": 1526,
"name": "PUSH [tag]",
"source": 1,
"value": "43"
},
{
"begin": 1518,
"end": 1525,
"name": "DUP6",
"source": 1
},
{
"begin": 1509,
"end": 1515,
"name": "DUP3",
"source": 1
},
{
"begin": 1498,
"end": 1507,
"name": "DUP7",
"source": 1
},
{
"begin": 1494,
"end": 1516,
"name": "ADD",
"source": 1
},
{
"begin": 1473,
"end": 1526,
"name": "PUSH [tag]",
"source": 1,
"value": "16"
},
{
"begin": 1473,
"end": 1526,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1473,
"end": 1526,
"name": "tag",
"source": 1,
"value": "43"
},
{
"begin": 1473,
"end": 1526,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1463,
"end": 1526,
"name": "SWAP3",
"source": 1
},
{
"begin": 1463,
"end": 1526,
"name": "POP",
"source": 1
},
{
"begin": 1419,
"end": 1536,
"name": "POP",
"source": 1
},
{
"begin": 1575,
"end": 1577,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 1601,
"end": 1654,
"name": "PUSH [tag]",
"source": 1,
"value": "44"
},
{
"begin": 1646,
"end": 1653,
"name": "DUP6",
"source": 1
},
{
"begin": 1637,
"end": 1643,
"name": "DUP3",
"source": 1
},
{
"begin": 1626,
"end": 1635,
"name": "DUP7",
"source": 1
},
{
"begin": 1622,
"end": 1644,
"name": "ADD",
"source": 1
},
{
"begin": 1601,
"end": 1654,
"name": "PUSH [tag]",
"source": 1,
"value": "19"
},
{
"begin": 1601,
"end": 1654,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1601,
"end": 1654,
"name": "tag",
"source": 1,
"value": "44"
},
{
"begin": 1601,
"end": 1654,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1591,
"end": 1654,
"name": "SWAP2",
"source": 1
},
{
"begin": 1591,
"end": 1654,
"name": "POP",
"source": 1
},
{
"begin": 1546,
"end": 1664,
"name": "POP",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "SWAP3",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "POP",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "SWAP3",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "SWAP1",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"name": "POP",
"source": 1
},
{
"begin": 1197,
"end": 1671,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1677,
"end": 1754,
"name": "tag",
"source": 1,
"value": "20"
},
{
"begin": 1677,
"end": 1754,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1714,
"end": 1721,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1743,
"end": 1748,
"name": "DUP2",
"source": 1
},
{
"begin": 1732,
"end": 1748,
"name": "SWAP1",
"source": 1
},
{
"begin": 1732,
"end": 1748,
"name": "POP",
"source": 1
},
{
"begin": 1677,
"end": 1754,
"name": "SWAP2",
"source": 1
},
{
"begin": 1677,
"end": 1754,
"name": "SWAP1",
"source": 1
},
{
"begin": 1677,
"end": 1754,
"name": "POP",
"source": 1
},
{
"begin": 1677,
"end": 1754,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1760,
"end": 1878,
"name": "tag",
"source": 1,
"value": "21"
},
{
"begin": 1760,
"end": 1878,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1847,
"end": 1871,
"name": "PUSH [tag]",
"source": 1,
"value": "47"
},
{
"begin": 1865,
"end": 1870,
"name": "DUP2",
"source": 1
},
{
"begin": 1847,
"end": 1871,
"name": "PUSH [tag]",
"source": 1,
"value": "20"
},
{
"begin": 1847,
"end": 1871,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 1847,
"end": 1871,
"name": "tag",
"source": 1,
"value": "47"
},
{
"begin": 1847,
"end": 1871,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1842,
"end": 1845,
"name": "DUP3",
"source": 1
},
{
"begin": 1835,
"end": 1872,
"name": "MSTORE",
"source": 1
},
{
"begin": 1760,
"end": 1878,
"name": "POP",
"source": 1
},
{
"begin": 1760,
"end": 1878,
"name": "POP",
"source": 1
},
{
"begin": 1760,
"end": 1878,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"name": "tag",
"source": 1,
"value": "9"
},
{
"begin": 1884,
"end": 2106,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1977,
"end": 1981,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 2015,
"end": 2017,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 2004,
"end": 2013,
"name": "DUP3",
"source": 1
},
{
"begin": 2000,
"end": 2018,
"name": "ADD",
"source": 1
},
{
"begin": 1992,
"end": 2018,
"name": "SWAP1",
"source": 1
},
{
"begin": 1992,
"end": 2018,
"name": "POP",
"source": 1
},
{
"begin": 2028,
"end": 2099,
"name": "PUSH [tag]",
"source": 1,
"value": "49"
},
{
"begin": 2096,
"end": 2097,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 2085,
"end": 2094,
"name": "DUP4",
"source": 1
},
{
"begin": 2081,
"end": 2098,
"name": "ADD",
"source": 1
},
{
"begin": 2072,
"end": 2078,
"name": "DUP5",
"source": 1
},
{
"begin": 2028,
"end": 2099,
"name": "PUSH [tag]",
"source": 1,
"value": "21"
},
{
"begin": 2028,
"end": 2099,
"jumpType": "[in]",
"name": "JUMP",
"source": 1
},
{
"begin": 2028,
"end": 2099,
"name": "tag",
"source": 1,
"value": "49"
},
{
"begin": 2028,
"end": 2099,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"name": "SWAP3",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"name": "SWAP2",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"name": "POP",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"name": "POP",
"source": 1
},
{
"begin": 1884,
"end": 2106,
"jumpType": "[out]",
"name": "JUMP",
"source": 1
}
]
}
},
"sourceList": [
"Hashi.sol",
"#utility.yul"
]
},
"methodIdentifiers": {
"blockHeaders(address,uint256)": "0cff03aa"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"blockHeaders\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"Hashi.sol\":\"Hashi\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"Hashi.sol\":{\"keccak256\":\"0x1b925c91a14f497d45b0456eda0097012d82cb4b40a0becd0768aeddf2641c81\",\"urls\":[\"bzz-raw://d7854075ec3d0b99edb8f8616d1c12552b20f1ddebe7746bf0fe102e94a3c04e\",\"dweb:/ipfs/QmTHE9CWohVFBoUoVjNJmKj21uBEbEKBEoDPJP7ByjdsiM\"]}},\"version\":1}",
"storageLayout": {
"storage": [
{
"astId": 7,
"contract": "Hashi.sol:Hashi",
"label": "blockHeaders",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_bytes32))"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_uint256,t_bytes32))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(uint256 => bytes32))",
"numberOfBytes": "32",
"value": "t_mapping(t_uint256,t_bytes32)"
},
"t_mapping(t_uint256,t_bytes32)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32",
"value": "t_bytes32"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"errors": [
{
"component": "general",
"errorCode": "1878",
"formattedMessage": "Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n--> Hashi.sol\n\n",
"message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "Hashi.sol",
"start": -1
},
"type": "Warning"
}
],
"sources": {
"Hashi.sol": {
"ast": {
"absolutePath": "Hashi.sol",
"exportedSymbols": {
"Hashi": [
8
]
},
"id": 9,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".17"
],
"nodeType": "PragmaDirective",
"src": "0:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Hashi",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 8,
"linearizedBaseContracts": [
8
],
"name": "Hashi",
"nameLocation": "35:5:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "0cff03aa",
"id": 7,
"mutability": "mutable",
"name": "blockHeaders",
"nameLocation": "104:12:0",
"nodeType": "VariableDeclaration",
"scope": 8,
"src": "47:69:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bytes32_$_$",
"typeString": "mapping(address => mapping(uint256 => bytes32))"
},
"typeName": {
"id": 6,
"keyType": {
"id": 2,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "56:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "47:49:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bytes32_$_$",
"typeString": "mapping(address => mapping(uint256 => bytes32))"
},
"valueType": {
"id": 5,
"keyType": {
"id": 3,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "76:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "67:28:0",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$",
"typeString": "mapping(uint256 => bytes32)"
},
"valueType": {
"id": 4,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "87:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
}
},
"visibility": "public"
}
],
"scope": 9,
"src": "26:99:0",
"usedErrors": []
}
],
"src": "0:125:0"
},
"id": 0
}
}
}
}
{
"id": "aa3b73d36bf3462ec4c6ce5c36c7dd8d",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.17",
"solcLongVersion": "0.8.17+commit.8df45f5f",
"input": {
"language": "Solidity",
"sources": {
"OwnedHashi.sol": {
"content": ""
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"errors": [
{
"component": "general",
"errorCode": "1878",
"formattedMessage": "Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n--> OwnedHashi.sol\n\n",
"message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "OwnedHashi.sol",
"start": -1
},
"type": "Warning"
},
{
"component": "general",
"errorCode": "3420",
"formattedMessage": "Warning: Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.8.17;\"\n--> OwnedHashi.sol\n\n",
"message": "Source file does not specify required compiler version! Consider adding \"pragma solidity ^0.8.17;\"",
"severity": "warning",
"sourceLocation": {
"end": -1,
"file": "OwnedHashi.sol",
"start": -1
},
"type": "Warning"
}
],
"sources": {
"OwnedHashi.sol": {
"ast": {
"absolutePath": "OwnedHashi.sol",
"exportedSymbols": {},
"id": 1,
"nodeType": "SourceUnit",
"nodes": [],
"src": "0:0:0"
},
"id": 0
}
}
}
}
{
"id": "ffe2c36bdd8afcdf5e23c074381df99b",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.17",
"solcLongVersion": "0.8.17+commit.8df45f5f",
"input": {
"language": "Solidity",
"sources": {
"IHeaderAdapter.sol": {
"content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity ^0.8.17;\n\ninterface IOracleAdapter {\n function getHeaderFromOracle(\n address oracleAdapter,\n uint256 chainId,\n uint256 blockNumber)\n external view returns(bytes32 blockHeader);\n}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"IHeaderAdapter.sol": {
"IOracleAdapter": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "oracleAdapter",
"type": "address"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "getHeaderFromOracle",
"outputs": [
{
"internalType": "bytes32",
"name": "blockHeader",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": "",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"legacyAssembly": null,
"methodIdentifiers": {
"getHeaderFromOracle(address,uint256,uint256)": "b31825bf"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracleAdapter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getHeaderFromOracle\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHeader\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"IHeaderAdapter.sol\":\"IOracleAdapter\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"IHeaderAdapter.sol\":{\"keccak256\":\"0x7bea3758157ec2715a450dec19e29bb183da43c23113b5f34e87335dadfb5a81\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://f650ff1d5348117edab7bf2724f1886ee4fbefa0250ba18b975168e23d626f62\",\"dweb:/ipfs/QmZNtD7WVBEYUbKWD7DQ4SaqdwwjwczYC7mFpehmMPSRzg\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"IHeaderAdapter.sol": {
"ast": {
"absolutePath": "IHeaderAdapter.sol",
"exportedSymbols": {
"IOracleAdapter": [
13
]
},
"id": 14,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".17"
],
"nodeType": "PragmaDirective",
"src": "42:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IOracleAdapter",
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 13,
"linearizedBaseContracts": [
13
],
"name": "IOracleAdapter",
"nameLocation": "78:14:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "b31825bf",
"id": 12,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getHeaderFromOracle",
"nameLocation": "108:19:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "oracleAdapter",
"nameLocation": "145:13:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "137:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "137:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "chainId",
"nameLocation": "176:7:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "168:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "168:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "blockNumber",
"nameLocation": "201:11:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "193:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "193:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "127:86:0"
},
"returnParameters": {
"id": 11,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "blockHeader",
"nameLocation": "248:11:0",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "240:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 9,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "240:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "239:21:0"
},
"scope": 13,
"src": "99:162:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 14,
"src": "68:195:0",
"usedErrors": []
}
],
"src": "42:221:0"
},
"id": 0
}
}
}
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506101c8806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80630cff03aa14610030575b600080fd5b61004a6004803603810190610045919061011e565b610060565b6040516100579190610177565b60405180910390f35b6000602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100b58261008a565b9050919050565b6100c5816100aa565b81146100d057600080fd5b50565b6000813590506100e2816100bc565b92915050565b6000819050919050565b6100fb816100e8565b811461010657600080fd5b50565b600081359050610118816100f2565b92915050565b6000806040838503121561013557610134610085565b5b6000610143858286016100d3565b925050602061015485828601610109565b9150509250929050565b6000819050919050565b6101718161015e565b82525050565b600060208201905061018c6000830184610168565b9291505056fea2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1C8 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFF03AA EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP2 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP2 POP POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xB5 DUP3 PUSH2 0x8A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC5 DUP2 PUSH2 0xAA JUMP JUMPDEST DUP2 EQ PUSH2 0xD0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE2 DUP2 PUSH2 0xBC JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xFB DUP2 PUSH2 0xE8 JUMP JUMPDEST DUP2 EQ PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x118 DUP2 PUSH2 0xF2 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x135 JUMPI PUSH2 0x134 PUSH2 0x85 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x143 DUP6 DUP3 DUP7 ADD PUSH2 0xD3 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x154 DUP6 DUP3 DUP7 ADD PUSH2 0x109 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x171 DUP2 PUSH2 0x15E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x18C PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x168 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4B SAR CALLDATALOAD 0x27 DUP3 0xB8 0xCA LOG2 CALLDATASIZE ISZERO 0x5C 0xAD 0x25 0x4B PUSH4 0xEE65D6A7 DUP8 DUP16 MLOAD CALLDATASIZE 0xC 0xF6 CALLVALUE 0xE2 0xC 0x4B SHR SELFBALANCE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "26:99:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@blockHeaders_7": {
"entryPoint": 96,
"id": 7,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_decode_t_address": {
"entryPoint": 211,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_t_uint256": {
"entryPoint": 265,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_addresst_uint256": {
"entryPoint": 286,
"id": null,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_encode_t_bytes32_to_t_bytes32_fromStack": {
"entryPoint": 360,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": {
"entryPoint": 375,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 170,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_bytes32": {
"entryPoint": 350,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 138,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 232,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 133,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_address": {
"entryPoint": 188,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 242,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2109:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "47:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "57:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
}
],
"src": "7:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "177:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "379:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "389:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "404:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "411:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "400:3:1"
},
"nodeType": "YulFunctionCall",
"src": "400:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "361:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "371:7:1",
"type": ""
}
],
"src": "334:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "511:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "521:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "550:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "532:17:1"
},
"nodeType": "YulFunctionCall",
"src": "532:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "521:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "493:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "503:7:1",
"type": ""
}
],
"src": "466:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "611:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "668:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "677:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "680:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "670:6:1"
},
"nodeType": "YulFunctionCall",
"src": "670:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "670:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "634:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "659:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "641:17:1"
},
"nodeType": "YulFunctionCall",
"src": "641:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "631:2:1"
},
"nodeType": "YulFunctionCall",
"src": "631:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "624:6:1"
},
"nodeType": "YulFunctionCall",
"src": "624:43:1"
},
"nodeType": "YulIf",
"src": "621:63:1"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "604:5:1",
"type": ""
}
],
"src": "568:122:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "748:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "758:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "780:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "767:12:1"
},
"nodeType": "YulFunctionCall",
"src": "767:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "758:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "823:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "796:26:1"
},
"nodeType": "YulFunctionCall",
"src": "796:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "796:33:1"
}
]
},
"name": "abi_decode_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "726:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "734:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "742:5:1",
"type": ""
}
],
"src": "696:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "886:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "896:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "907:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "896:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "868:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "878:7:1",
"type": ""
}
],
"src": "841:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "967:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1024:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1033:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1036:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1026:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1026:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1026:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "990:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1015:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "997:17:1"
},
"nodeType": "YulFunctionCall",
"src": "997:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "987:2:1"
},
"nodeType": "YulFunctionCall",
"src": "987:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "980:6:1"
},
"nodeType": "YulFunctionCall",
"src": "980:43:1"
},
"nodeType": "YulIf",
"src": "977:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "960:5:1",
"type": ""
}
],
"src": "924:122:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1104:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1114:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1136:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "1123:12:1"
},
"nodeType": "YulFunctionCall",
"src": "1123:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1114:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1179:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "1152:26:1"
},
"nodeType": "YulFunctionCall",
"src": "1152:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "1152:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1082:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1090:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1098:5:1",
"type": ""
}
],
"src": "1052:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1280:391:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1326:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "1328:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1328:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1328:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1301:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1310:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1297:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1297:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1322:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1293:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1293:32:1"
},
"nodeType": "YulIf",
"src": "1290:119:1"
},
{
"nodeType": "YulBlock",
"src": "1419:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1434:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1448:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1438:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1463:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1498:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1509:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1494:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1494:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1518:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nodeType": "YulIdentifier",
"src": "1473:20:1"
},
"nodeType": "YulFunctionCall",
"src": "1473:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1463:6:1"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "1546:118:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1561:16:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1575:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1565:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1591:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1626:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1637:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1622:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1622:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1646:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "1601:20:1"
},
"nodeType": "YulFunctionCall",
"src": "1601:53:1"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1591:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1242:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1253:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1265:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1273:6:1",
"type": ""
}
],
"src": "1197:474:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1722:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1732:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "1743:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1732:7:1"
}
]
}
]
},
"name": "cleanup_t_bytes32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1704:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1714:7:1",
"type": ""
}
],
"src": "1677:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1825:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1842:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1865:5:1"
}
],
"functionName": {
"name": "cleanup_t_bytes32",
"nodeType": "YulIdentifier",
"src": "1847:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1847:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1835:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1835:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "1835:37:1"
}
]
},
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1813:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1820:3:1",
"type": ""
}
],
"src": "1760:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1982:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1992:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2004:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2015:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2000:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2000:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1992:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "2072:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2085:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2096:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2081:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2081:17:1"
}
],
"functionName": {
"name": "abi_encode_t_bytes32_to_t_bytes32_fromStack",
"nodeType": "YulIdentifier",
"src": "2028:43:1"
},
"nodeType": "YulFunctionCall",
"src": "2028:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "2028:71:1"
}
]
},
"name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1954:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1966:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1977:4:1",
"type": ""
}
],
"src": "1884:222:1"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_bytes32(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_bytes32_to_t_bytes32_fromStack(value, pos) {\n mstore(pos, cleanup_t_bytes32(value))\n }\n\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bytes32_to_t_bytes32_fromStack(value0, add(headStart, 0))\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c80630cff03aa14610030575b600080fd5b61004a6004803603810190610045919061011e565b610060565b6040516100579190610177565b60405180910390f35b6000602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100b58261008a565b9050919050565b6100c5816100aa565b81146100d057600080fd5b50565b6000813590506100e2816100bc565b92915050565b6000819050919050565b6100fb816100e8565b811461010657600080fd5b50565b600081359050610118816100f2565b92915050565b6000806040838503121561013557610134610085565b5b6000610143858286016100d3565b925050602061015485828601610109565b9150509250929050565b6000819050919050565b6101718161015e565b82525050565b600060208201905061018c6000830184610168565b9291505056fea2646970667358221220404b1d352782b8caa236155cad254b63ee65d6a7878f51360cf634e20c4b1c4764736f6c63430008110033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFF03AA EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP2 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP2 POP POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xB5 DUP3 PUSH2 0x8A JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xC5 DUP2 PUSH2 0xAA JUMP JUMPDEST DUP2 EQ PUSH2 0xD0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE2 DUP2 PUSH2 0xBC JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xFB DUP2 PUSH2 0xE8 JUMP JUMPDEST DUP2 EQ PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x118 DUP2 PUSH2 0xF2 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x135 JUMPI PUSH2 0x134 PUSH2 0x85 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x143 DUP6 DUP3 DUP7 ADD PUSH2 0xD3 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x154 DUP6 DUP3 DUP7 ADD PUSH2 0x109 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x171 DUP2 PUSH2 0x15E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x18C PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x168 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4B SAR CALLDATALOAD 0x27 DUP3 0xB8 0xCA LOG2 CALLDATASIZE ISZERO 0x5C 0xAD 0x25 0x4B PUSH4 0xEE65D6A7 DUP8 DUP16 MLOAD CALLDATASIZE 0xC 0xF6 CALLVALUE 0xE2 0xC 0x4B SHR SELFBALANCE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
"sourceMap": "26:99:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47:69;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:77::-;878:7;907:5;896:16;;841:77;;;:::o;924:122::-;997:24;1015:5;997:24;:::i;:::-;990:5;987:35;977:63;;1036:1;1033;1026:12;977:63;924:122;:::o;1052:139::-;1098:5;1136:6;1123:20;1114:29;;1152:33;1179:5;1152:33;:::i;:::-;1052:139;;;;:::o;1197:474::-;1265:6;1273;1322:2;1310:9;1301:7;1297:23;1293:32;1290:119;;;1328:79;;:::i;:::-;1290:119;1448:1;1473:53;1518:7;1509:6;1498:9;1494:22;1473:53;:::i;:::-;1463:63;;1419:117;1575:2;1601:53;1646:7;1637:6;1626:9;1622:22;1601:53;:::i;:::-;1591:63;;1546:118;1197:474;;;;;:::o;1677:77::-;1714:7;1743:5;1732:16;;1677:77;;;:::o;1760:118::-;1847:24;1865:5;1847:24;:::i;:::-;1842:3;1835:37;1760:118;;:::o;1884:222::-;1977:4;2015:2;2004:9;2000:18;1992:26;;2028:71;2096:1;2085:9;2081:17;2072:6;2028:71;:::i;:::-;1884:222;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "91200",
"executionCost": "141",
"totalCost": "91341"
},
"external": {
"blockHeaders(address,uint256)": "3028"
}
},
"methodIdentifiers": {
"blockHeaders(address,uint256)": "0cff03aa"
}
},
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "blockHeaders",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.17+commit.8df45f5f"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "blockHeaders",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"Hashi.sol": "Hashi"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"Hashi.sol": {
"keccak256": "0x1b925c91a14f497d45b0456eda0097012d82cb4b40a0becd0768aeddf2641c81",
"urls": [
"bzz-raw://d7854075ec3d0b99edb8f8616d1c12552b20f1ddebe7746bf0fe102e94a3c04e",
"dweb:/ipfs/QmTHE9CWohVFBoUoVjNJmKj21uBEbEKBEoDPJP7ByjdsiM"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"goerli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"gasEstimates": null,
"methodIdentifiers": {
"getHeaderFromOracle(address,uint256,uint256)": "b31825bf"
}
},
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "oracleAdapter",
"type": "address"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "getHeaderFromOracle",
"outputs": [
{
"internalType": "bytes32",
"name": "blockHeader",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.17+commit.8df45f5f"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "oracleAdapter",
"type": "address"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "getHeaderFromOracle",
"outputs": [
{
"internalType": "bytes32",
"name": "blockHeader",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"IHeaderAdapter.sol": "IOracleAdapter"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"IHeaderAdapter.sol": {
"keccak256": "0x7bea3758157ec2715a450dec19e29bb183da43c23113b5f34e87335dadfb5a81",
"license": "LGPL-3.0-only",
"urls": [
"bzz-raw://f650ff1d5348117edab7bf2724f1886ee4fbefa0250ba18b975168e23d626f62",
"dweb:/ipfs/QmZNtD7WVBEYUbKWD7DQ4SaqdwwjwczYC7mFpehmMPSRzg"
]
}
},
"version": 1
}
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.17;
import "./IHeaderAdapter.sol";
contract Hashi {
error OracleDidNotReport(address emitter, address oracleAdapter);
error OraclesDisagree(address emitter, address oracleOne, oracleTwo);
error ThresholdNotMet(address,address highestCount, address blockHeader)
/// @dev Returns the block header reported by a given oracle for a given block.
/// @param oracleAdapter Address of the oracle adapter to query.
/// @param blockNumber Block number for which to return a header.
/// @return blockHeader Block header reported by the given oracle adapter for the given block number.
function getHeaderFromOracle(
address oracleAdapter,
uint256 chainId,
uint256 blockNumber)
public view returns(bytes32 blockHeader) {
return IHeaderAdapter(oracleAdapter, chainId, blockNumber);
};
/// @dev Returns the block headers for a given block reported by a given set of oracles.
/// @param oracleAdapters Array of address for the oracle adapters to query, MUST be provided in numerical order from smallest to largest.
/// @param blockNumber Block number for which to return headers.
/// @return blockHeaders Array of block header reported by the given oracle adapters for the given block number.
/// @notice This method MUST revert if the oracleAdapters array contains duplicates.
function getHeadersFromOracles(
address[] memory oracleAdapters,
uint256 chainId,
uint256 blockNumber)
public view returns(bytes32[] memory blockHeaders) {
for (uint256 i = 0; i < oracleAdapters.length; i++) {
blockHeaders[i] = getHeaderFromOracle(oracleAdapters[i], chainId, blockNumber);
}
};
function getAgreedOnHeader(
address[] memory oracleAdapters,
uint256 chainId,
uint256 blockNumber)
public view returns(bytes32 blockHeader) {
bytes32[] memory blockHeaders = getHeadersFromOracles(oracleAdapters, chainId, blockNumber, threshold);
bytes32 previousHeader = blockHeaders[0];
if (previousHeader == bytes32(0)) revert OracleDidNotReport(address(this), oracleAdapters[i]);
for (uint256 i = 1; i < blockHeaders.length; i++) {
bytes32 currentHeader = blockHeaders[i];
if (currentHeader == bytes32(0)) revert OracleDidNotReport(address(this), oracleAdapters[i]);
if (currentHeader != previousHeader) revert OraclesDisagree(address(this), oracleAdapters[i-1], oracleAdapters[i]);
previousHeader = currentHeader;
}
blockHeader = currentHeader;
};
/// @dev Returns the blockheader agreed upon by a threshold of given header oracles.
/// @param oracleAdapters Array of address for the oracle adapters to query, MUST be provided in numerical order from smallest to largest.
/// @param blockNumber Block number for which to return headers.
/// @param threshold Threshold of oracles that must report the same header for the given block. `threshold` MUST be `<= oracleAdapters.length && > oracleAdapters.length / 2`.
/// @return blockHeader Block header reported by the required threshold of given oracle adapters for the given block number.
/// @notice This method MUST revert if the oracleAdapters array contains duplicates.
function getHeaderFromThreshold(
address[] memory oracleAdapters,
uint256 chainId,
uint256 blockNumber,
uint256 threshold)
public view returns(bytes32 blockHeader) {
bytes32[] memory blockHeaders = getHeadersFromOracles(oracleAdapters, chainId, blockNumber, threshold);
mapping (bytes32 => uint256) public counts;
for (uint256 i = 0; i < blockHeaders.length; i++) {
counts[blockHeaders[i]] += 1;
}
uint256 highestCount;
for (uint256 i = 0; i < blockHeaders.length; i++) {
bytes32 currentHeader = blockHeaders[i]
uint256 currentCount = counts[currentHeader];
if (currentCount > highestCount) {
highestCount = currentCount;
blockHeader = currentHeader;
}
}
if (highestCount < threshold) revert ThresholdNotMet(address(this), highestCount, blockHeader);
};
}
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.17;
interface IOracleAdapter {
function getHeaderFromOracle(
address oracleAdapter,
uint256 chainId,
uint256 blockNumber)
external view returns(bytes32 blockHeader);
}
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.17;
import "./Hashi.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
contract OwnableHashi is OwnableUpgradeable {
address public hashi;
address[] public oracleAdapters;
function getHeader(uint256 chainId, uint256 blockNumber) public view returns(bytes32 blockHeader) {
Hashi(hashi).getAgreedOnHeader(oracleAdapters, chainId, blockNumber);
}
function setHashi(address _hashi) public onlyOwner {
hashi = _hashi;
}
function setOracleAdapters(address[] memory _oracleAdapters) public onlyOwner {
oracleAdapters = _oracleAdapters;
}
/// how to handle timeouts for oracles that are not reporting?
/// when should governance be able to remove an oracle?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment