Skip to content

Instantly share code, notes, and snippets.

@amithkk
Created June 12, 2022 16:09
Show Gist options
  • Save amithkk/1f88c5abc9fe81933a2533a4e104e422 to your computer and use it in GitHub Desktop.
Save amithkk/1f88c5abc9fe81933a2533a4e104e422 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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
The 'scripts' folder contains example async/await scripts for deploying the 'Storage' contract.
For the deployment of any other contract, 'contractName' and 'constructorArgs' should be updated (along with other code if required).
Scripts have full access to the web3.js and ethers.js libraries.
To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled.
Output from script will appear in remix terminal.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
number = num;
}
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
return number;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Owner
* @dev Set & change owner
*/
contract Owner {
address private owner;
// event for EVM logging
event OwnerSet(address indexed oldOwner, address indexed newOwner);
// modifier to check if caller is owner
modifier isOwner() {
// If the first argument of 'require' evaluates to 'false', execution terminates and all
// changes to the state and to Ether balances are reverted.
// This used to consume all gas in old EVM versions, but not anymore.
// It is often a good idea to use 'require' to check if functions are called correctly.
// As a second argument, you can also provide an explanation about what went wrong.
require(msg.sender == owner, "Caller is not owner");
_;
}
/**
* @dev Set contract deployer as owner
*/
constructor() {
owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor
emit OwnerSet(address(0), owner);
}
/**
* @dev Change owner
* @param newOwner address of new owner
*/
function changeOwner(address newOwner) public isOwner {
emit OwnerSet(owner, newOwner);
owner = newOwner;
}
/**
* @dev Return owner address
* @return address of owner
*/
function getOwner() external view returns (address) {
return owner;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
*/
contract Ballot {
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted
address delegate; // person delegated to
uint vote; // index of the voted proposal
}
struct Proposal {
// If you can limit the length to a certain number of bytes,
// always use one of bytes1 to bytes32 because they are much cheaper
bytes32 name; // short name (up to 32 bytes)
uint voteCount; // number of accumulated votes
}
address public chairperson;
mapping(address => Voter) public voters;
Proposal[] public proposals;
/**
* @dev Create a new ballot to choose one of 'proposalNames'.
* @param proposalNames names of proposals
*/
constructor(bytes32[] memory proposalNames) {
chairperson = msg.sender;
voters[chairperson].weight = 1;
for (uint i = 0; i < proposalNames.length; i++) {
// 'Proposal({...})' creates a temporary
// Proposal object and 'proposals.push(...)'
// appends it to the end of 'proposals'.
proposals.push(Proposal({
name: proposalNames[i],
voteCount: 0
}));
}
}
/**
* @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'.
* @param voter address of voter
*/
function giveRightToVote(address voter) public {
require(
msg.sender == chairperson,
"Only chairperson can give right to vote."
);
require(
!voters[voter].voted,
"The voter already voted."
);
require(voters[voter].weight == 0);
voters[voter].weight = 1;
}
/**
* @dev Delegate your vote to the voter 'to'.
* @param to address to which vote is delegated
*/
function delegate(address to) public {
Voter storage sender = voters[msg.sender];
require(!sender.voted, "You already voted.");
require(to != msg.sender, "Self-delegation is disallowed.");
while (voters[to].delegate != address(0)) {
to = voters[to].delegate;
// We found a loop in the delegation, not allowed.
require(to != msg.sender, "Found loop in delegation.");
}
sender.voted = true;
sender.delegate = to;
Voter storage delegate_ = voters[to];
if (delegate_.voted) {
// If the delegate already voted,
// directly add to the number of votes
proposals[delegate_.vote].voteCount += sender.weight;
} else {
// If the delegate did not vote yet,
// add to her weight.
delegate_.weight += sender.weight;
}
}
/**
* @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'.
* @param proposal index of proposal in the proposals array
*/
function vote(uint proposal) public {
Voter storage sender = voters[msg.sender];
require(sender.weight != 0, "Has no right to vote");
require(!sender.voted, "Already voted.");
sender.voted = true;
sender.vote = proposal;
// If 'proposal' is out of the range of the array,
// this will throw automatically and revert all
// changes.
proposals[proposal].voteCount += sender.weight;
}
/**
* @dev Computes the winning proposal taking all previous votes into account.
* @return winningProposal_ index of winning proposal in the proposals array
*/
function winningProposal() public view
returns (uint winningProposal_)
{
uint winningVoteCount = 0;
for (uint p = 0; p < proposals.length; p++) {
if (proposals[p].voteCount > winningVoteCount) {
winningVoteCount = proposals[p].voteCount;
winningProposal_ = p;
}
}
}
/**
* @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then
* @return winnerName_ the name of the winner
*/
function winnerName() public view
returns (bytes32 winnerName_)
{
winnerName_ = proposals[winningProposal()].name;
}
}
{
"id": "0a7141b0f30eb3358e5c5c5f2c5d7770",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.7",
"solcLongVersion": "0.8.7+commit.e28d00a7",
"input": {
"language": "Solidity",
"sources": {
"contracts/1_Storage.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Storage\n * @dev Store & retrieve value in a variable\n */\ncontract Storage {\n\n uint256 number;\n\n /**\n * @dev Store value in variable\n * @param num value to store\n */\n function store(uint256 num) public {\n number = num;\n }\n\n /**\n * @dev Return value \n * @return value of 'number'\n */\n function retrieve() public view returns (uint256){\n return number;\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": {
"contracts/1_Storage.sol": {
"Storage": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'number'"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/1_Storage.sol\":141:497 contract Storage {... */\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 /* \"contracts/1_Storage.sol\":141:497 contract Storage {... */\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 0x2e64cec1\n eq\n tag_3\n jumpi\n dup1\n 0x6057361d\n eq\n tag_4\n jumpi\n tag_2:\n 0x00\n dup1\n revert\n /* \"contracts/1_Storage.sol\":416:495 function retrieve() public view returns (uint256){... */\n tag_3:\n tag_5\n tag_6\n jump\t// in\n tag_5:\n mload(0x40)\n tag_7\n swap2\n swap1\n tag_8\n jump\t// in\n tag_7:\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"contracts/1_Storage.sol\":271:335 function store(uint256 num) public {... */\n tag_4:\n tag_9\n 0x04\n dup1\n calldatasize\n sub\n dup2\n add\n swap1\n tag_10\n swap2\n swap1\n tag_11\n jump\t// in\n tag_10:\n tag_12\n jump\t// in\n tag_9:\n stop\n /* \"contracts/1_Storage.sol\":416:495 function retrieve() public view returns (uint256){... */\n tag_6:\n /* \"contracts/1_Storage.sol\":457:464 uint256 */\n 0x00\n /* \"contracts/1_Storage.sol\":482:488 number */\n dup1\n sload\n /* \"contracts/1_Storage.sol\":475:488 return number */\n swap1\n pop\n /* \"contracts/1_Storage.sol\":416:495 function retrieve() public view returns (uint256){... */\n swap1\n jump\t// out\n /* \"contracts/1_Storage.sol\":271:335 function store(uint256 num) public {... */\n tag_12:\n /* \"contracts/1_Storage.sol\":325:328 num */\n dup1\n /* \"contracts/1_Storage.sol\":316:322 number */\n 0x00\n /* \"contracts/1_Storage.sol\":316:328 number = num */\n dup2\n swap1\n sstore\n pop\n /* \"contracts/1_Storage.sol\":271:335 function store(uint256 num) public {... */\n pop\n jump\t// out\n /* \"#utility.yul\":7:146 */\n tag_16:\n /* \"#utility.yul\":53:58 */\n 0x00\n /* \"#utility.yul\":91:97 */\n dup2\n /* \"#utility.yul\":78:98 */\n calldataload\n /* \"#utility.yul\":69:98 */\n swap1\n pop\n /* \"#utility.yul\":107:140 */\n tag_18\n /* \"#utility.yul\":134:139 */\n dup2\n /* \"#utility.yul\":107:140 */\n tag_19\n jump\t// in\n tag_18:\n /* \"#utility.yul\":7:146 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":152:481 */\n tag_11:\n /* \"#utility.yul\":211:217 */\n 0x00\n /* \"#utility.yul\":260:262 */\n 0x20\n /* \"#utility.yul\":248:257 */\n dup3\n /* \"#utility.yul\":239:246 */\n dup5\n /* \"#utility.yul\":235:258 */\n sub\n /* \"#utility.yul\":231:263 */\n slt\n /* \"#utility.yul\":228:347 */\n iszero\n tag_21\n jumpi\n /* \"#utility.yul\":266:345 */\n tag_22\n tag_23\n jump\t// in\n tag_22:\n /* \"#utility.yul\":228:347 */\n tag_21:\n /* \"#utility.yul\":386:387 */\n 0x00\n /* \"#utility.yul\":411:464 */\n tag_24\n /* \"#utility.yul\":456:463 */\n dup5\n /* \"#utility.yul\":447:453 */\n dup3\n /* \"#utility.yul\":436:445 */\n dup6\n /* \"#utility.yul\":432:454 */\n add\n /* \"#utility.yul\":411:464 */\n tag_16\n jump\t// in\n tag_24:\n /* \"#utility.yul\":401:464 */\n swap2\n pop\n /* \"#utility.yul\":357:474 */\n pop\n /* \"#utility.yul\":152:481 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":487:605 */\n tag_25:\n /* \"#utility.yul\":574:598 */\n tag_27\n /* \"#utility.yul\":592:597 */\n dup2\n /* \"#utility.yul\":574:598 */\n tag_28\n jump\t// in\n tag_27:\n /* \"#utility.yul\":569:572 */\n dup3\n /* \"#utility.yul\":562:599 */\n mstore\n /* \"#utility.yul\":487:605 */\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":611:833 */\n tag_8:\n /* \"#utility.yul\":704:708 */\n 0x00\n /* \"#utility.yul\":742:744 */\n 0x20\n /* \"#utility.yul\":731:740 */\n dup3\n /* \"#utility.yul\":727:745 */\n add\n /* \"#utility.yul\":719:745 */\n swap1\n pop\n /* \"#utility.yul\":755:826 */\n tag_30\n /* \"#utility.yul\":823:824 */\n 0x00\n /* \"#utility.yul\":812:821 */\n dup4\n /* \"#utility.yul\":808:825 */\n add\n /* \"#utility.yul\":799:805 */\n dup5\n /* \"#utility.yul\":755:826 */\n tag_25\n jump\t// in\n tag_30:\n /* \"#utility.yul\":611:833 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":920:997 */\n tag_28:\n /* \"#utility.yul\":957:964 */\n 0x00\n /* \"#utility.yul\":986:991 */\n dup2\n /* \"#utility.yul\":975:991 */\n swap1\n pop\n /* \"#utility.yul\":920:997 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":1126:1243 */\n tag_23:\n /* \"#utility.yul\":1235:1236 */\n 0x00\n /* \"#utility.yul\":1232:1233 */\n dup1\n /* \"#utility.yul\":1225:1237 */\n revert\n /* \"#utility.yul\":1249:1371 */\n tag_19:\n /* \"#utility.yul\":1322:1346 */\n tag_38\n /* \"#utility.yul\":1340:1345 */\n dup2\n /* \"#utility.yul\":1322:1346 */\n tag_28\n jump\t// in\n tag_38:\n /* \"#utility.yul\":1315:1320 */\n dup2\n /* \"#utility.yul\":1312:1347 */\n eq\n /* \"#utility.yul\":1302:1365 */\n tag_39\n jumpi\n /* \"#utility.yul\":1361:1362 */\n 0x00\n /* \"#utility.yul\":1358:1359 */\n dup1\n /* \"#utility.yul\":1351:1363 */\n revert\n /* \"#utility.yul\":1302:1365 */\n tag_39:\n /* \"#utility.yul\":1249:1371 */\n pop\n jump\t// out\n\n auxdata: 0xa2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x150 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 117,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 126,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 136,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 157,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 202,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 217,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 244,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 254,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 259,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1374:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "59:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "69:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "91:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "78:12:1"
},
"nodeType": "YulFunctionCall",
"src": "78:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "69:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "134:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "107:26:1"
},
"nodeType": "YulFunctionCall",
"src": "107:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "107:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "37:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "45:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "53:5:1",
"type": ""
}
],
"src": "7:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "218:263:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "264:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "266:77:1"
},
"nodeType": "YulFunctionCall",
"src": "266:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "239:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "248:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "260:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:32:1"
},
"nodeType": "YulIf",
"src": "228:119:1"
},
{
"nodeType": "YulBlock",
"src": "357:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "372:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "386:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "376:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "401:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "436:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "447:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "432:3:1"
},
"nodeType": "YulFunctionCall",
"src": "432:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "456:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "411:20:1"
},
"nodeType": "YulFunctionCall",
"src": "411:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "401:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "188:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "199:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "211:6:1",
"type": ""
}
],
"src": "152:329:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "552:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "569:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "592:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "574:17:1"
},
"nodeType": "YulFunctionCall",
"src": "574:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "562:6:1"
},
"nodeType": "YulFunctionCall",
"src": "562:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "562:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "540:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "547:3:1",
"type": ""
}
],
"src": "487:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "709:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "719:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "731:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "742:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "727:3:1"
},
"nodeType": "YulFunctionCall",
"src": "727:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "719:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "799:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "812:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "823:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "808:3:1"
},
"nodeType": "YulFunctionCall",
"src": "808:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "755:43:1"
},
"nodeType": "YulFunctionCall",
"src": "755:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "755:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "681:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "693:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "704:4:1",
"type": ""
}
],
"src": "611:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "879:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "889:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "905:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "899:5:1"
},
"nodeType": "YulFunctionCall",
"src": "899:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "889:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "872:6:1",
"type": ""
}
],
"src": "839:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "965:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "975:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "986:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "975:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "947:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "957:7:1",
"type": ""
}
],
"src": "920:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1092:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1109:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1112:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1102:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1102:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1102:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "1003:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1215:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1232:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1235:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1225:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1225:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1225:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "1126:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1292:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1349:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1358:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1361:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1351:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1351:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1351:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1315:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1340:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1322:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1322:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1312:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1312:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1305:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1305:43:1"
},
"nodeType": "YulIf",
"src": "1302:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1285:5:1",
"type": ""
}
],
"src": "1249:122:1"
}
]
},
"contents": "{\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_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;271:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;416:79;457:7;482:6;;475:13;;416:79;:::o;271:64::-;325:3;316:6;:12;;;;271:64;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;7:139;;;;:::o;152:329::-;211:6;260:2;248:9;239:7;235:23;231:32;228:119;;;266:79;;:::i;:::-;228:119;386:1;411:53;456:7;447:6;436:9;432:22;411:53;:::i;:::-;401:63;;357:117;152:329;;;;:::o;487:118::-;574:24;592:5;574:24;:::i;:::-;569:3;562:37;487:118;;:::o;611:222::-;704:4;742:2;731:9;727:18;719:26;;755:71;823:1;812:9;808:17;799:6;755:71;:::i;:::-;611:222;;;;:::o;920:77::-;957:7;986:5;975:16;;920:77;;;:::o;1126:117::-;1235:1;1232;1225:12;1249:122;1322:24;1340:5;1322:24;:::i;:::-;1315:5;1312:35;1302:63;;1361:1;1358;1351:12;1302:63;1249:122;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "67200",
"executionCost": "117",
"totalCost": "67317"
},
"external": {
"retrieve()": "2415",
"store(uint256)": "22520"
}
},
"legacyAssembly": {
".code": [
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 141,
"end": 497,
"name": "MSTORE",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "ISZERO",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 141,
"end": 497,
"name": "JUMPI",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "REVERT",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 141,
"end": 497,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "POP",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "CODECOPY",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
".code": [
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 141,
"end": 497,
"name": "MSTORE",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "CALLVALUE",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "ISZERO",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 141,
"end": 497,
"name": "JUMPI",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "REVERT",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 141,
"end": 497,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "POP",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 141,
"end": 497,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "LT",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [tag]",
"source": 0,
"value": "2"
},
{
"begin": 141,
"end": 497,
"name": "JUMPI",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "CALLDATALOAD",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "E0"
},
{
"begin": 141,
"end": 497,
"name": "SHR",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "2E64CEC1"
},
{
"begin": 141,
"end": 497,
"name": "EQ",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [tag]",
"source": 0,
"value": "3"
},
{
"begin": 141,
"end": 497,
"name": "JUMPI",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "6057361D"
},
{
"begin": 141,
"end": 497,
"name": "EQ",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH [tag]",
"source": 0,
"value": "4"
},
{
"begin": 141,
"end": 497,
"name": "JUMPI",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "tag",
"source": 0,
"value": "2"
},
{
"begin": 141,
"end": 497,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 141,
"end": 497,
"name": "DUP1",
"source": 0
},
{
"begin": 141,
"end": 497,
"name": "REVERT",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "tag",
"source": 0,
"value": "3"
},
{
"begin": 416,
"end": 495,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "PUSH [tag]",
"source": 0,
"value": "5"
},
{
"begin": 416,
"end": 495,
"name": "PUSH [tag]",
"source": 0,
"value": "6"
},
{
"begin": 416,
"end": 495,
"name": "JUMP",
"source": 0,
"value": "[in]"
},
{
"begin": 416,
"end": 495,
"name": "tag",
"source": 0,
"value": "5"
},
{
"begin": 416,
"end": 495,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 416,
"end": 495,
"name": "MLOAD",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "PUSH [tag]",
"source": 0,
"value": "7"
},
{
"begin": 416,
"end": 495,
"name": "SWAP2",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "SWAP1",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "PUSH [tag]",
"source": 0,
"value": "8"
},
{
"begin": 416,
"end": 495,
"name": "JUMP",
"source": 0,
"value": "[in]"
},
{
"begin": 416,
"end": 495,
"name": "tag",
"source": 0,
"value": "7"
},
{
"begin": 416,
"end": 495,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 416,
"end": 495,
"name": "MLOAD",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "DUP1",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "SWAP2",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "SUB",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "SWAP1",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "RETURN",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "tag",
"source": 0,
"value": "4"
},
{
"begin": 271,
"end": 335,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "PUSH [tag]",
"source": 0,
"value": "9"
},
{
"begin": 271,
"end": 335,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 271,
"end": 335,
"name": "DUP1",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "CALLDATASIZE",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "SUB",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "DUP2",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "ADD",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "SWAP1",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "PUSH [tag]",
"source": 0,
"value": "10"
},
{
"begin": 271,
"end": 335,
"name": "SWAP2",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "SWAP1",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "PUSH [tag]",
"source": 0,
"value": "11"
},
{
"begin": 271,
"end": 335,
"name": "JUMP",
"source": 0,
"value": "[in]"
},
{
"begin": 271,
"end": 335,
"name": "tag",
"source": 0,
"value": "10"
},
{
"begin": 271,
"end": 335,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "PUSH [tag]",
"source": 0,
"value": "12"
},
{
"begin": 271,
"end": 335,
"name": "JUMP",
"source": 0,
"value": "[in]"
},
{
"begin": 271,
"end": 335,
"name": "tag",
"source": 0,
"value": "9"
},
{
"begin": 271,
"end": 335,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "STOP",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "tag",
"source": 0,
"value": "6"
},
{
"begin": 416,
"end": 495,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 457,
"end": 464,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 482,
"end": 488,
"name": "DUP1",
"source": 0
},
{
"begin": 482,
"end": 488,
"name": "SLOAD",
"source": 0
},
{
"begin": 475,
"end": 488,
"name": "SWAP1",
"source": 0
},
{
"begin": 475,
"end": 488,
"name": "POP",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "SWAP1",
"source": 0
},
{
"begin": 416,
"end": 495,
"name": "JUMP",
"source": 0,
"value": "[out]"
},
{
"begin": 271,
"end": 335,
"name": "tag",
"source": 0,
"value": "12"
},
{
"begin": 271,
"end": 335,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 325,
"end": 328,
"name": "DUP1",
"source": 0
},
{
"begin": 316,
"end": 322,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 316,
"end": 328,
"name": "DUP2",
"source": 0
},
{
"begin": 316,
"end": 328,
"name": "SWAP1",
"source": 0
},
{
"begin": 316,
"end": 328,
"name": "SSTORE",
"source": 0
},
{
"begin": 316,
"end": 328,
"name": "POP",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "POP",
"source": 0
},
{
"begin": 271,
"end": 335,
"name": "JUMP",
"source": 0,
"value": "[out]"
},
{
"begin": 7,
"end": 146,
"name": "tag",
"source": 1,
"value": "16"
},
{
"begin": 7,
"end": 146,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 53,
"end": 58,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 91,
"end": 97,
"name": "DUP2",
"source": 1
},
{
"begin": 78,
"end": 98,
"name": "CALLDATALOAD",
"source": 1
},
{
"begin": 69,
"end": 98,
"name": "SWAP1",
"source": 1
},
{
"begin": 69,
"end": 98,
"name": "POP",
"source": 1
},
{
"begin": 107,
"end": 140,
"name": "PUSH [tag]",
"source": 1,
"value": "18"
},
{
"begin": 134,
"end": 139,
"name": "DUP2",
"source": 1
},
{
"begin": 107,
"end": 140,
"name": "PUSH [tag]",
"source": 1,
"value": "19"
},
{
"begin": 107,
"end": 140,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 107,
"end": 140,
"name": "tag",
"source": 1,
"value": "18"
},
{
"begin": 107,
"end": 140,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 7,
"end": 146,
"name": "SWAP3",
"source": 1
},
{
"begin": 7,
"end": 146,
"name": "SWAP2",
"source": 1
},
{
"begin": 7,
"end": 146,
"name": "POP",
"source": 1
},
{
"begin": 7,
"end": 146,
"name": "POP",
"source": 1
},
{
"begin": 7,
"end": 146,
"name": "JUMP",
"source": 1,
"value": "[out]"
},
{
"begin": 152,
"end": 481,
"name": "tag",
"source": 1,
"value": "11"
},
{
"begin": 152,
"end": 481,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 211,
"end": 217,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 260,
"end": 262,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 248,
"end": 257,
"name": "DUP3",
"source": 1
},
{
"begin": 239,
"end": 246,
"name": "DUP5",
"source": 1
},
{
"begin": 235,
"end": 258,
"name": "SUB",
"source": 1
},
{
"begin": 231,
"end": 263,
"name": "SLT",
"source": 1
},
{
"begin": 228,
"end": 347,
"name": "ISZERO",
"source": 1
},
{
"begin": 228,
"end": 347,
"name": "PUSH [tag]",
"source": 1,
"value": "21"
},
{
"begin": 228,
"end": 347,
"name": "JUMPI",
"source": 1
},
{
"begin": 266,
"end": 345,
"name": "PUSH [tag]",
"source": 1,
"value": "22"
},
{
"begin": 266,
"end": 345,
"name": "PUSH [tag]",
"source": 1,
"value": "23"
},
{
"begin": 266,
"end": 345,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 266,
"end": 345,
"name": "tag",
"source": 1,
"value": "22"
},
{
"begin": 266,
"end": 345,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 228,
"end": 347,
"name": "tag",
"source": 1,
"value": "21"
},
{
"begin": 228,
"end": 347,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 386,
"end": 387,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 411,
"end": 464,
"name": "PUSH [tag]",
"source": 1,
"value": "24"
},
{
"begin": 456,
"end": 463,
"name": "DUP5",
"source": 1
},
{
"begin": 447,
"end": 453,
"name": "DUP3",
"source": 1
},
{
"begin": 436,
"end": 445,
"name": "DUP6",
"source": 1
},
{
"begin": 432,
"end": 454,
"name": "ADD",
"source": 1
},
{
"begin": 411,
"end": 464,
"name": "PUSH [tag]",
"source": 1,
"value": "16"
},
{
"begin": 411,
"end": 464,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 411,
"end": 464,
"name": "tag",
"source": 1,
"value": "24"
},
{
"begin": 411,
"end": 464,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 401,
"end": 464,
"name": "SWAP2",
"source": 1
},
{
"begin": 401,
"end": 464,
"name": "POP",
"source": 1
},
{
"begin": 357,
"end": 474,
"name": "POP",
"source": 1
},
{
"begin": 152,
"end": 481,
"name": "SWAP3",
"source": 1
},
{
"begin": 152,
"end": 481,
"name": "SWAP2",
"source": 1
},
{
"begin": 152,
"end": 481,
"name": "POP",
"source": 1
},
{
"begin": 152,
"end": 481,
"name": "POP",
"source": 1
},
{
"begin": 152,
"end": 481,
"name": "JUMP",
"source": 1,
"value": "[out]"
},
{
"begin": 487,
"end": 605,
"name": "tag",
"source": 1,
"value": "25"
},
{
"begin": 487,
"end": 605,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 574,
"end": 598,
"name": "PUSH [tag]",
"source": 1,
"value": "27"
},
{
"begin": 592,
"end": 597,
"name": "DUP2",
"source": 1
},
{
"begin": 574,
"end": 598,
"name": "PUSH [tag]",
"source": 1,
"value": "28"
},
{
"begin": 574,
"end": 598,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 574,
"end": 598,
"name": "tag",
"source": 1,
"value": "27"
},
{
"begin": 574,
"end": 598,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 569,
"end": 572,
"name": "DUP3",
"source": 1
},
{
"begin": 562,
"end": 599,
"name": "MSTORE",
"source": 1
},
{
"begin": 487,
"end": 605,
"name": "POP",
"source": 1
},
{
"begin": 487,
"end": 605,
"name": "POP",
"source": 1
},
{
"begin": 487,
"end": 605,
"name": "JUMP",
"source": 1,
"value": "[out]"
},
{
"begin": 611,
"end": 833,
"name": "tag",
"source": 1,
"value": "8"
},
{
"begin": 611,
"end": 833,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 704,
"end": 708,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 742,
"end": 744,
"name": "PUSH",
"source": 1,
"value": "20"
},
{
"begin": 731,
"end": 740,
"name": "DUP3",
"source": 1
},
{
"begin": 727,
"end": 745,
"name": "ADD",
"source": 1
},
{
"begin": 719,
"end": 745,
"name": "SWAP1",
"source": 1
},
{
"begin": 719,
"end": 745,
"name": "POP",
"source": 1
},
{
"begin": 755,
"end": 826,
"name": "PUSH [tag]",
"source": 1,
"value": "30"
},
{
"begin": 823,
"end": 824,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 812,
"end": 821,
"name": "DUP4",
"source": 1
},
{
"begin": 808,
"end": 825,
"name": "ADD",
"source": 1
},
{
"begin": 799,
"end": 805,
"name": "DUP5",
"source": 1
},
{
"begin": 755,
"end": 826,
"name": "PUSH [tag]",
"source": 1,
"value": "25"
},
{
"begin": 755,
"end": 826,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 755,
"end": 826,
"name": "tag",
"source": 1,
"value": "30"
},
{
"begin": 755,
"end": 826,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 611,
"end": 833,
"name": "SWAP3",
"source": 1
},
{
"begin": 611,
"end": 833,
"name": "SWAP2",
"source": 1
},
{
"begin": 611,
"end": 833,
"name": "POP",
"source": 1
},
{
"begin": 611,
"end": 833,
"name": "POP",
"source": 1
},
{
"begin": 611,
"end": 833,
"name": "JUMP",
"source": 1,
"value": "[out]"
},
{
"begin": 920,
"end": 997,
"name": "tag",
"source": 1,
"value": "28"
},
{
"begin": 920,
"end": 997,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 957,
"end": 964,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 986,
"end": 991,
"name": "DUP2",
"source": 1
},
{
"begin": 975,
"end": 991,
"name": "SWAP1",
"source": 1
},
{
"begin": 975,
"end": 991,
"name": "POP",
"source": 1
},
{
"begin": 920,
"end": 997,
"name": "SWAP2",
"source": 1
},
{
"begin": 920,
"end": 997,
"name": "SWAP1",
"source": 1
},
{
"begin": 920,
"end": 997,
"name": "POP",
"source": 1
},
{
"begin": 920,
"end": 997,
"name": "JUMP",
"source": 1,
"value": "[out]"
},
{
"begin": 1126,
"end": 1243,
"name": "tag",
"source": 1,
"value": "23"
},
{
"begin": 1126,
"end": 1243,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1235,
"end": 1236,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1232,
"end": 1233,
"name": "DUP1",
"source": 1
},
{
"begin": 1225,
"end": 1237,
"name": "REVERT",
"source": 1
},
{
"begin": 1249,
"end": 1371,
"name": "tag",
"source": 1,
"value": "19"
},
{
"begin": 1249,
"end": 1371,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1322,
"end": 1346,
"name": "PUSH [tag]",
"source": 1,
"value": "38"
},
{
"begin": 1340,
"end": 1345,
"name": "DUP2",
"source": 1
},
{
"begin": 1322,
"end": 1346,
"name": "PUSH [tag]",
"source": 1,
"value": "28"
},
{
"begin": 1322,
"end": 1346,
"name": "JUMP",
"source": 1,
"value": "[in]"
},
{
"begin": 1322,
"end": 1346,
"name": "tag",
"source": 1,
"value": "38"
},
{
"begin": 1322,
"end": 1346,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1315,
"end": 1320,
"name": "DUP2",
"source": 1
},
{
"begin": 1312,
"end": 1347,
"name": "EQ",
"source": 1
},
{
"begin": 1302,
"end": 1365,
"name": "PUSH [tag]",
"source": 1,
"value": "39"
},
{
"begin": 1302,
"end": 1365,
"name": "JUMPI",
"source": 1
},
{
"begin": 1361,
"end": 1362,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 1358,
"end": 1359,
"name": "DUP1",
"source": 1
},
{
"begin": 1351,
"end": 1363,
"name": "REVERT",
"source": 1
},
{
"begin": 1302,
"end": 1365,
"name": "tag",
"source": 1,
"value": "39"
},
{
"begin": 1302,
"end": 1365,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 1249,
"end": 1371,
"name": "POP",
"source": 1
},
{
"begin": 1249,
"end": 1371,
"name": "JUMP",
"source": 1,
"value": "[out]"
}
]
}
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"retrieve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"}],\"name\":\"store\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Store & retrieve value in a variable\",\"kind\":\"dev\",\"methods\":{\"retrieve()\":{\"details\":\"Return value \",\"returns\":{\"_0\":\"value of 'number'\"}},\"store(uint256)\":{\"details\":\"Store value in variable\",\"params\":{\"num\":\"value to store\"}}},\"title\":\"Storage\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/1_Storage.sol\":\"Storage\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/1_Storage.sol\":{\"keccak256\":\"0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1\",\"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA\"]}},\"version\":1}",
"storageLayout": {
"storage": [
{
"astId": 4,
"contract": "contracts/1_Storage.sol:Storage",
"label": "number",
"offset": 0,
"slot": "0",
"type": "t_uint256"
}
],
"types": {
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/1_Storage.sol": {
"ast": {
"absolutePath": "contracts/1_Storage.sol",
"exportedSymbols": {
"Storage": [
25
]
},
"id": 26,
"license": "GPL-3.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.7",
".0",
"<",
"0.9",
".0"
],
"nodeType": "PragmaDirective",
"src": "37:31:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "70:70:0",
"text": " @title Storage\n @dev Store & retrieve value in a variable"
},
"fullyImplemented": true,
"id": 25,
"linearizedBaseContracts": [
25
],
"name": "Storage",
"nameLocation": "150:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "number",
"nameLocation": "173:6:0",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "165:14:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "165:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body": {
"id": 14,
"nodeType": "Block",
"src": "306:29:0",
"statements": [
{
"expression": {
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 10,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "316:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 11,
"name": "num",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7,
"src": "325:3:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "316:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 13,
"nodeType": "ExpressionStatement",
"src": "316:12:0"
}
]
},
"documentation": {
"id": 5,
"nodeType": "StructuredDocumentation",
"src": "186:80:0",
"text": " @dev Store value in variable\n @param num value to store"
},
"functionSelector": "6057361d",
"id": 15,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "store",
"nameLocation": "280:5:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 8,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "num",
"nameLocation": "294:3:0",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "286:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "286:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "285:13:0"
},
"returnParameters": {
"id": 9,
"nodeType": "ParameterList",
"parameters": [],
"src": "306:0:0"
},
"scope": 25,
"src": "271:64:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 23,
"nodeType": "Block",
"src": "465:30:0",
"statements": [
{
"expression": {
"id": 21,
"name": "number",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "482:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 20,
"id": 22,
"nodeType": "Return",
"src": "475:13:0"
}
]
},
"documentation": {
"id": 16,
"nodeType": "StructuredDocumentation",
"src": "341:70:0",
"text": " @dev Return value \n @return value of 'number'"
},
"functionSelector": "2e64cec1",
"id": 24,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "retrieve",
"nameLocation": "425:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 17,
"nodeType": "ParameterList",
"parameters": [],
"src": "433:2:0"
},
"returnParameters": {
"id": 20,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "457:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 18,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "457:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "456:9:0"
},
"scope": 25,
"src": "416:79:0",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 26,
"src": "141:356:0",
"usedErrors": []
}
],
"src": "37:460: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
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a361034d806100db6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b610043610075565b6040516100509190610259565b60405180910390f35b610073600480360381019061006e91906101fe565b61009e565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461012c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012390610274565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000813590506101f881610300565b92915050565b60006020828403121561021057600080fd5b600061021e848285016101e9565b91505092915050565b610230816102a5565b82525050565b6000610243601383610294565b915061024e826102d7565b602082019050919050565b600060208201905061026e6000830184610227565b92915050565b6000602082019050818103600083015261028d81610236565b9050919050565b600082825260208201905092915050565b60006102b0826102b7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f43616c6c6572206973206e6f74206f776e657200000000000000000000000000600082015250565b610309816102a5565b811461031457600080fd5b5056fea2646970667358221220ec1f72c537ef818b2c305ea3ca7867b0ef3028de9afc9b2c4a9caf9ce425630f64736f6c63430008030033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLER PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH2 0x34D DUP1 PUSH2 0xDB 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xA6F9DAE1 EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x259 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x1FE JUMP JUMPDEST PUSH2 0x9E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x12C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x123 SWAP1 PUSH2 0x274 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 DUP1 PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x1F8 DUP2 PUSH2 0x300 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x210 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x21E DUP5 DUP3 DUP6 ADD PUSH2 0x1E9 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x230 DUP2 PUSH2 0x2A5 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x243 PUSH1 0x13 DUP4 PUSH2 0x294 JUMP JUMPDEST SWAP2 POP PUSH2 0x24E DUP3 PUSH2 0x2D7 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x26E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x227 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x28D DUP2 PUSH2 0x236 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2B0 DUP3 PUSH2 0x2B7 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x43616C6C6572206973206E6F74206F776E657200000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH2 0x309 DUP2 PUSH2 0x2A5 JUMP JUMPDEST DUP2 EQ PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEC 0x1F PUSH19 0xC537EF818B2C305EA3CA7867B0EF3028DE9AFC SWAP12 0x2C 0x4A SWAP13 0xAF SWAP13 0xE4 0x25 PUSH4 0xF64736F PUSH13 0x63430008030033000000000000 ",
"sourceMap": "121:1361:0:-:0;;;923:170;;;;;;;;;;955:10;947:5;;:18;;;;;;;;;;;;;;;;;;1080:5;;;;;;;;;;1059:27;;1076:1;1059:27;;;;;;;;;;;;121:1361;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2278:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "59:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "69:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "91:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "78:12:1"
},
"nodeType": "YulFunctionCall",
"src": "78:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "69:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "134:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "107:26:1"
},
"nodeType": "YulFunctionCall",
"src": "107:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "107:33:1"
}
]
},
"name": "abi_decode_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "37:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "45:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "53:5:1",
"type": ""
}
],
"src": "7:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "218:196:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "264:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "273:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "276:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "266:6:1"
},
"nodeType": "YulFunctionCall",
"src": "266:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "239:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "248:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "260:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:32:1"
},
"nodeType": "YulIf",
"src": "228:2:1"
},
{
"nodeType": "YulBlock",
"src": "290:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "305:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "319:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "309:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "334:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "369:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "380:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "365:3:1"
},
"nodeType": "YulFunctionCall",
"src": "365:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address",
"nodeType": "YulIdentifier",
"src": "344:20:1"
},
"nodeType": "YulFunctionCall",
"src": "344:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "334:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "188:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "199:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "211:6:1",
"type": ""
}
],
"src": "152:262:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "485:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "502:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "525:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "507:17:1"
},
"nodeType": "YulFunctionCall",
"src": "507:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "495:6:1"
},
"nodeType": "YulFunctionCall",
"src": "495:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "495:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "473:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "480:3:1",
"type": ""
}
],
"src": "420:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "690:220:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "700:74:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "766:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "771:2:1",
"type": "",
"value": "19"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "707:58:1"
},
"nodeType": "YulFunctionCall",
"src": "707:67:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "700:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "872:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d",
"nodeType": "YulIdentifier",
"src": "783:88:1"
},
"nodeType": "YulFunctionCall",
"src": "783:93:1"
},
"nodeType": "YulExpressionStatement",
"src": "783:93:1"
},
{
"nodeType": "YulAssignment",
"src": "885:19:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "896:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "901:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "892:3:1"
},
"nodeType": "YulFunctionCall",
"src": "892:12:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "885:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "678:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "686:3:1",
"type": ""
}
],
"src": "544:366:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1014:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1024:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1036:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1047:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1032:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1032:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1024:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1104:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1117:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1128:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1113:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1113:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "1060:43:1"
},
"nodeType": "YulFunctionCall",
"src": "1060:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "1060:71:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "986:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "998:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1009:4:1",
"type": ""
}
],
"src": "916:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1315:248:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1325:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1337:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1348:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1333:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1333:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1325:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1372:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1383:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1368:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1368:17:1"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1391:4:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1397:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1387:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1387:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1361:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1361:47:1"
},
"nodeType": "YulExpressionStatement",
"src": "1361:47:1"
},
{
"nodeType": "YulAssignment",
"src": "1417:139:1",
"value": {
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1551:4:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1425:124:1"
},
"nodeType": "YulFunctionCall",
"src": "1425:131:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1417:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1295:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1310:4:1",
"type": ""
}
],
"src": "1144:419:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1665:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1682:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1687:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1675:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1675:19:1"
},
"nodeType": "YulExpressionStatement",
"src": "1675:19:1"
},
{
"nodeType": "YulAssignment",
"src": "1703:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1722:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1727:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1718:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1718:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "1703:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1637:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1642:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "1653:11:1",
"type": ""
}
],
"src": "1569:169:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1789:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1799:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1828:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "1810:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1810:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1799:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1771:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1781:7:1",
"type": ""
}
],
"src": "1744:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1891:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1901:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1916:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1923:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "1912:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1912:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1901:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1873:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1883:7:1",
"type": ""
}
],
"src": "1846:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2084:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2106:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2114:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2102:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2102:14:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "2118:21:1",
"type": "",
"value": "Caller is not owner"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2095:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2095:45:1"
},
"nodeType": "YulExpressionStatement",
"src": "2095:45:1"
}
]
},
"name": "store_literal_in_memory_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2076:6:1",
"type": ""
}
],
"src": "1978:169:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2196:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2253:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2262:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2265:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2255:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2255:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "2255:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2219:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2244:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "2226:17:1"
},
"nodeType": "YulFunctionCall",
"src": "2226:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "2216:2:1"
},
"nodeType": "YulFunctionCall",
"src": "2216:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2209:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2209:43:1"
},
"nodeType": "YulIf",
"src": "2206:2:1"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2189:5:1",
"type": ""
}
],
"src": "2153:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 19)\n store_literal_in_memory_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function store_literal_in_memory_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d(memPtr) {\n\n mstore(add(memPtr, 0), \"Caller is not owner\")\n\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b610043610075565b6040516100509190610259565b60405180910390f35b610073600480360381019061006e91906101fe565b61009e565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461012c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012390610274565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000813590506101f881610300565b92915050565b60006020828403121561021057600080fd5b600061021e848285016101e9565b91505092915050565b610230816102a5565b82525050565b6000610243601383610294565b915061024e826102d7565b602082019050919050565b600060208201905061026e6000830184610227565b92915050565b6000602082019050818103600083015261028d81610236565b9050919050565b600082825260208201905092915050565b60006102b0826102b7565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f43616c6c6572206973206e6f74206f776e657200000000000000000000000000600082015250565b610309816102a5565b811461031457600080fd5b5056fea2646970667358221220ec1f72c537ef818b2c305ea3ca7867b0ef3028de9afc9b2c4a9caf9ce425630f64736f6c63430008030033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xA6F9DAE1 EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x259 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x1FE JUMP JUMPDEST PUSH2 0x9E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x12C JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x123 SWAP1 PUSH2 0x274 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 PUSH1 0x40 MLOAD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 DUP1 PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x1F8 DUP2 PUSH2 0x300 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x210 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x21E DUP5 DUP3 DUP6 ADD PUSH2 0x1E9 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x230 DUP2 PUSH2 0x2A5 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x243 PUSH1 0x13 DUP4 PUSH2 0x294 JUMP JUMPDEST SWAP2 POP PUSH2 0x24E DUP3 PUSH2 0x2D7 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x26E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x227 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x28D DUP2 PUSH2 0x236 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2B0 DUP3 PUSH2 0x2B7 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x43616C6C6572206973206E6F74206F776E657200000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH2 0x309 DUP2 PUSH2 0x2A5 JUMP JUMPDEST DUP2 EQ PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xEC 0x1F PUSH19 0xC537EF818B2C305EA3CA7867B0EF3028DE9AFC SWAP12 0x2C 0x4A SWAP13 0xAF SWAP13 0xE4 0x25 PUSH4 0xF64736F PUSH13 0x63430008030033000000000000 ",
"sourceMap": "121:1361:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:81;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1184:127;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1399:81;1442:7;1468:5;;;;;;;;;;;1461:12;;1399:81;:::o;1184:127::-;807:5;;;;;;;;;;793:19;;:10;:19;;;785:51;;;;;;;;;;;;:::i;:::-;;;;;;;;;1269:8:::1;1253:25;;1262:5;::::0;::::1;;;;;;;;1253:25;;;;;;;;;;;;1296:8;1288:5;::::0;:16:::1;;;;;;;;;;;;;;;;;;1184:127:::0;:::o;7:139:1:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:262::-;;260:2;248:9;239:7;235:23;231:32;228:2;;;276:1;273;266:12;228:2;319:1;344:53;389:7;380:6;369:9;365:22;344:53;:::i;:::-;334:63;;290:117;218:196;;;;:::o;420:118::-;507:24;525:5;507:24;:::i;:::-;502:3;495:37;485:53;;:::o;544:366::-;;707:67;771:2;766:3;707:67;:::i;:::-;700:74;;783:93;872:3;783:93;:::i;:::-;901:2;896:3;892:12;885:19;;690:220;;;:::o;916:222::-;;1047:2;1036:9;1032:18;1024:26;;1060:71;1128:1;1117:9;1113:17;1104:6;1060:71;:::i;:::-;1014:124;;;;:::o;1144:419::-;;1348:2;1337:9;1333:18;1325:26;;1397:9;1391:4;1387:20;1383:1;1372:9;1368:17;1361:47;1425:131;1551:4;1425:131;:::i;:::-;1417:139;;1315:248;;;:::o;1569:169::-;;1687:6;1682:3;1675:19;1727:4;1722:3;1718:14;1703:29;;1665:73;;;;:::o;1744:96::-;;1810:24;1828:5;1810:24;:::i;:::-;1799:35;;1789:51;;;:::o;1846:126::-;;1923:42;1916:5;1912:54;1901:65;;1891:81;;;:::o;1978:169::-;2118:21;2114:1;2106:6;2102:14;2095:45;2084:63;:::o;2153:122::-;2226:24;2244:5;2226:24;:::i;:::-;2219:5;2216:35;2206:2;;2265:1;2262;2255:12;2206:2;2196:79;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "169000",
"executionCost": "23458",
"totalCost": "192458"
},
"external": {
"changeOwner(address)": "24567",
"getOwner()": "1200"
}
},
"methodIdentifiers": {
"changeOwner(address)": "a6f9dae1",
"getOwner()": "893d20e8"
}
},
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnerSet",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "changeOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.3+commit.8d00100c"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnerSet",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "changeOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"details": "Set & change owner",
"kind": "dev",
"methods": {
"changeOwner(address)": {
"details": "Change owner",
"params": {
"newOwner": "address of new owner"
}
},
"constructor": {
"details": "Set contract deployer as owner"
},
"getOwner()": {
"details": "Return owner address ",
"returns": {
"_0": "address of owner"
}
}
},
"title": "Owner",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/2_Owner.sol": "Owner"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/2_Owner.sol": {
"keccak256": "0x1e624ada939528fff73575187024d951aa6d33d4cbaad97ecf1f3e2a7d717583",
"license": "GPL-3.0",
"urls": [
"bzz-raw://e3f3c6ab93acd1a8bd389f852149d59b6d713efc51458ff95bba42c3329fb0d1",
"dweb:/ipfs/QmP7NEPrSbYRM4DzpJ31YUC2KNXUX4USuQk3jMNRUdzVyV"
]
}
},
"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
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x150 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 117,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 126,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 136,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 157,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 202,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 217,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 244,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 254,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 259,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1374:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "59:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "69:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "91:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "78:12:1"
},
"nodeType": "YulFunctionCall",
"src": "78:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "69:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "134:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "107:26:1"
},
"nodeType": "YulFunctionCall",
"src": "107:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "107:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "37:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "45:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "53:5:1",
"type": ""
}
],
"src": "7:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "218:263:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "264:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "266:77:1"
},
"nodeType": "YulFunctionCall",
"src": "266:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "239:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "248:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "260:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:32:1"
},
"nodeType": "YulIf",
"src": "228:119:1"
},
{
"nodeType": "YulBlock",
"src": "357:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "372:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "386:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "376:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "401:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "436:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "447:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "432:3:1"
},
"nodeType": "YulFunctionCall",
"src": "432:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "456:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "411:20:1"
},
"nodeType": "YulFunctionCall",
"src": "411:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "401:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "188:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "199:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "211:6:1",
"type": ""
}
],
"src": "152:329:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "552:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "569:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "592:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "574:17:1"
},
"nodeType": "YulFunctionCall",
"src": "574:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "562:6:1"
},
"nodeType": "YulFunctionCall",
"src": "562:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "562:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "540:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "547:3:1",
"type": ""
}
],
"src": "487:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "709:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "719:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "731:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "742:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "727:3:1"
},
"nodeType": "YulFunctionCall",
"src": "727:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "719:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "799:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "812:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "823:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "808:3:1"
},
"nodeType": "YulFunctionCall",
"src": "808:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "755:43:1"
},
"nodeType": "YulFunctionCall",
"src": "755:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "755:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "681:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "693:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "704:4:1",
"type": ""
}
],
"src": "611:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "879:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "889:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "905:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "899:5:1"
},
"nodeType": "YulFunctionCall",
"src": "899:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "889:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "872:6:1",
"type": ""
}
],
"src": "839:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "965:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "975:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "986:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "975:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "947:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "957:7:1",
"type": ""
}
],
"src": "920:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1092:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1109:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1112:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1102:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1102:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1102:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "1003:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1215:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1232:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1235:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1225:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1225:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1225:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "1126:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1292:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1349:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1358:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1361:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1351:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1351:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1351:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1315:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1340:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1322:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1322:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1312:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1312:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1305:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1305:43:1"
},
"nodeType": "YulIf",
"src": "1302:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1285:5:1",
"type": ""
}
],
"src": "1249:122:1"
}
]
},
"contents": "{\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_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;271:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;416:79;457:7;482:6;;475:13;;416:79;:::o;271:64::-;325:3;316:6;:12;;;;271:64;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;7:139;;;;:::o;152:329::-;211:6;260:2;248:9;239:7;235:23;231:32;228:119;;;266:79;;:::i;:::-;228:119;386:1;411:53;456:7;447:6;436:9;432:22;411:53;:::i;:::-;401:63;;357:117;152:329;;;;:::o;487:118::-;574:24;592:5;574:24;:::i;:::-;569:3;562:37;487:118;;:::o;611:222::-;704:4;742:2;731:9;727:18;719:26;;755:71;823:1;812:9;808:17;799:6;755:71;:::i;:::-;611:222;;;;:::o;920:77::-;957:7;986:5;975:16;;920:77;;;:::o;1126:117::-;1235:1;1232;1225:12;1249:122;1322:24;1340:5;1322:24;:::i;:::-;1315:5;1312:35;1302:63;;1361:1;1358;1351:12;1302:63;1249:122;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "67200",
"executionCost": "117",
"totalCost": "67317"
},
"external": {
"retrieve()": "2415",
"store(uint256)": "22520"
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'number'"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/1_Storage.sol": "Storage"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
"license": "GPL-3.0",
"urls": [
"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1",
"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA"
]
}
},
"version": 1
}
pragma solidity ^0.5.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithEthers script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
// 'web3Provider' is a remix global variable object
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer);
let contract = await factory.deploy(...constructorArgs);
console.log('Contract Address: ', contract.address);
// The contract is NOT deployed yet; we must wait until it is mined
await contract.deployed()
console.log('Deployment successful.')
} catch (e) {
console.log(e.message)
}
})()
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithWeb3 script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
const accounts = await web3.eth.getAccounts()
let contract = new web3.eth.Contract(metadata.abi)
contract = contract.deploy({
data: metadata.data.bytecode.object,
arguments: constructorArgs
})
const newContractInstance = await contract.send({
from: accounts[0],
gas: 1500000,
gasPrice: '30000000000'
})
console.log('Contract deployed at address: ', newContractInstance.options.address)
} catch (e) {
console.log(e.message)
}
})()
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/3_Ballot.sol";
contract BallotTest {
bytes32[] proposalNames;
Ballot ballotToTest;
function beforeAll () public {
proposalNames.push(bytes32("candidate1"));
ballotToTest = new Ballot(proposalNames);
}
function checkWinningProposal () public {
ballotToTest.vote(0);
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal");
Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name");
}
function checkWinninProposalWithReturnValue () public view returns (bool) {
return ballotToTest.winningProposal() == 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment