Skip to content

Instantly share code, notes, and snippets.

@mrygalski
Created May 2, 2021 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrygalski/5418828ce1d3f393a12bf6faf4419bf5 to your computer and use it in GitHub Desktop.
Save mrygalski/5418828ce1d3f393a12bf6faf4419bf5 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.1+commit.df193b15.js&optimize=true&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;
}
}
{
"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": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1551:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "120:1056:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "130:12:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "140:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "_1",
"nodeType": "YulTypedName",
"src": "134:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "187:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "196:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "204:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "189:6:1"
},
"nodeType": "YulFunctionCall",
"src": "189:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "189:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "162:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "171:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "158:3:1"
},
"nodeType": "YulFunctionCall",
"src": "158:23:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "183:2:1"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "154:3:1"
},
"nodeType": "YulFunctionCall",
"src": "154:32:1"
},
"nodeType": "YulIf",
"src": "151:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "222:30:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "242:9:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "236:5:1"
},
"nodeType": "YulFunctionCall",
"src": "236:16:1"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "226:6:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "261:28:1",
"value": {
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "279:2:1",
"type": "",
"value": "64"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "283:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "275:3:1"
},
"nodeType": "YulFunctionCall",
"src": "275:10:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "287:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "271:3:1"
},
"nodeType": "YulFunctionCall",
"src": "271:18:1"
},
"variables": [
{
"name": "_2",
"nodeType": "YulTypedName",
"src": "265:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "316:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "325:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "333:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "318:6:1"
},
"nodeType": "YulFunctionCall",
"src": "318:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "318:22:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "304:6:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "312:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "301:2:1"
},
"nodeType": "YulFunctionCall",
"src": "301:14:1"
},
"nodeType": "YulIf",
"src": "298:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "351:32:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "365:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "376:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "361:3:1"
},
"nodeType": "YulFunctionCall",
"src": "361:22:1"
},
"variables": [
{
"name": "_3",
"nodeType": "YulTypedName",
"src": "355:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "431:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "440:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "448:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "433:6:1"
},
"nodeType": "YulFunctionCall",
"src": "433:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "433:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "410:2:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "414:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "406:3:1"
},
"nodeType": "YulFunctionCall",
"src": "406:13:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "421:7:1"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "402:3:1"
},
"nodeType": "YulFunctionCall",
"src": "402:27:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "395:6:1"
},
"nodeType": "YulFunctionCall",
"src": "395:35:1"
},
"nodeType": "YulIf",
"src": "392:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "466:19:1",
"value": {
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "482:2:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "476:5:1"
},
"nodeType": "YulFunctionCall",
"src": "476:9:1"
},
"variables": [
{
"name": "_4",
"nodeType": "YulTypedName",
"src": "470:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "508:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "510:16:1"
},
"nodeType": "YulFunctionCall",
"src": "510:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "510:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "500:2:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "504:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "497:2:1"
},
"nodeType": "YulFunctionCall",
"src": "497:10:1"
},
"nodeType": "YulIf",
"src": "494:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "539:21:1",
"value": {
"arguments": [
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "553:2:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "557:2:1"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "549:3:1"
},
"nodeType": "YulFunctionCall",
"src": "549:11:1"
},
"variables": [
{
"name": "_5",
"nodeType": "YulTypedName",
"src": "543:2:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "569:23:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "589:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "583:5:1"
},
"nodeType": "YulFunctionCall",
"src": "583:9:1"
},
"variables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "573:6:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "601:56:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "623:6:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "_5",
"nodeType": "YulIdentifier",
"src": "639:2:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "643:2:1",
"type": "",
"value": "63"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "635:3:1"
},
"nodeType": "YulFunctionCall",
"src": "635:11:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "652:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "648:3:1"
},
"nodeType": "YulFunctionCall",
"src": "648:7:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "631:3:1"
},
"nodeType": "YulFunctionCall",
"src": "631:25:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "619:3:1"
},
"nodeType": "YulFunctionCall",
"src": "619:38:1"
},
"variables": [
{
"name": "newFreePtr",
"nodeType": "YulTypedName",
"src": "605:10:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "716:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "718:16:1"
},
"nodeType": "YulFunctionCall",
"src": "718:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "718:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "675:10:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "687:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "672:2:1"
},
"nodeType": "YulFunctionCall",
"src": "672:18:1"
},
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "695:10:1"
},
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "707:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "692:2:1"
},
"nodeType": "YulFunctionCall",
"src": "692:22:1"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "669:2:1"
},
"nodeType": "YulFunctionCall",
"src": "669:46:1"
},
"nodeType": "YulIf",
"src": "666:2:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "754:2:1",
"type": "",
"value": "64"
},
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "758:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "747:6:1"
},
"nodeType": "YulFunctionCall",
"src": "747:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "747:22:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "778:17:1",
"value": {
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "789:6:1"
},
"variables": [
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "782:3:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "811:6:1"
},
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "819:2:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "804:6:1"
},
"nodeType": "YulFunctionCall",
"src": "804:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "804:18:1"
},
{
"nodeType": "YulAssignment",
"src": "831:22:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "842:6:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "850:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "838:3:1"
},
"nodeType": "YulFunctionCall",
"src": "838:15:1"
},
"variableNames": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "831:3:1"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "862:22:1",
"value": {
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "877:2:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "881:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "873:3:1"
},
"nodeType": "YulFunctionCall",
"src": "873:11:1"
},
"variables": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "866:3:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "930:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "939:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "947:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "932:6:1"
},
"nodeType": "YulFunctionCall",
"src": "932:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "932:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "907:2:1"
},
{
"name": "_5",
"nodeType": "YulIdentifier",
"src": "911:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "903:3:1"
},
"nodeType": "YulFunctionCall",
"src": "903:11:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "916:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "899:3:1"
},
"nodeType": "YulFunctionCall",
"src": "899:20:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "921:7:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "896:2:1"
},
"nodeType": "YulFunctionCall",
"src": "896:33:1"
},
"nodeType": "YulIf",
"src": "893:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "965:15:1",
"value": {
"name": "value0",
"nodeType": "YulIdentifier",
"src": "974:6:1"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "969:1:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1034:111:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1055:3:1"
},
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1066:3:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1060:5:1"
},
"nodeType": "YulFunctionCall",
"src": "1060:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1048:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1048:23:1"
},
"nodeType": "YulExpressionStatement",
"src": "1048:23:1"
},
{
"nodeType": "YulAssignment",
"src": "1084:19:1",
"value": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1095:3:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "1100:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1091:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1091:12:1"
},
"variableNames": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1084:3:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "1116:19:1",
"value": {
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1127:3:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "1132:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1123:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1123:12:1"
},
"variableNames": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1116:3:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1000:1:1"
},
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "1003:2:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "997:2:1"
},
"nodeType": "YulFunctionCall",
"src": "997:9:1"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "1007:18:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1009:14:1",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1018:1:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1021:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1014:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1014:9:1"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "1009:1:1"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "993:3:1",
"statements": []
},
"src": "989:156:1"
},
{
"nodeType": "YulAssignment",
"src": "1154:16:1",
"value": {
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "1164:6:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1154:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_array$_t_bytes32_$dyn_memory_ptr_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "86:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "97:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "109:6:1",
"type": ""
}
],
"src": "14:1162:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1228:189:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1267:115:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "1288:3:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1297:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1302:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1293:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1293:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1281:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1281:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "1281:33:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1334:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1337:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1327:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1327:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1327:15:1"
},
{
"expression": {
"arguments": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "1362:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1367:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1355:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1355:17:1"
},
"nodeType": "YulExpressionStatement",
"src": "1355:17:1"
}
]
},
"condition": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1244:5:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1255:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "1251:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1251:6:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1241:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1241:17:1"
},
"nodeType": "YulIf",
"src": "1238:2:1"
},
{
"nodeType": "YulAssignment",
"src": "1391:20:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1402:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1409:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1398:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1398:13:1"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "1391:3:1"
}
]
}
]
},
"name": "increment_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1210:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "1220:3:1",
"type": ""
}
],
"src": "1181:236:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1454:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1471:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1478:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1483:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1474:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1474:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1464:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1464:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "1464:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1511:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1514:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1504:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1504:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1504:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1535:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1538:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1528:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1528:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1528:15:1"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "1422:127:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_array$_t_bytes32_$dyn_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(value0, value0) }\n let offset := mload(headStart)\n let _2 := sub(shl(64, 1), 1)\n if gt(offset, _2) { revert(value0, value0) }\n let _3 := add(headStart, offset)\n if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(value0, value0) }\n let _4 := mload(_3)\n if gt(_4, _2) { panic_error_0x41() }\n let _5 := mul(_4, _1)\n let memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(_5, 63), not(31)))\n if or(gt(newFreePtr, _2), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n let dst := memPtr\n mstore(memPtr, _4)\n dst := add(memPtr, _1)\n let src := add(_3, _1)\n if gt(add(add(_3, _5), _1), dataEnd) { revert(value0, value0) }\n let i := value0\n for { } lt(i, _4) { i := add(i, 1) }\n {\n mstore(dst, mload(src))\n dst := add(dst, _1)\n src := add(src, _1)\n }\n value0 := memPtr\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0))\n {\n mstore(ret, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(ret, 0x24)\n }\n ret := add(value, 1)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n}",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506040516109f63803806109f683398101604081905261002f916100e2565b600080546001600160a01b03191633178082556001600160a01b031681526001602081905260408220555b81518110156100db576002604051806040016040528084848151811061009057634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825260009181018290528354600181810186559483529181902083516002909302019182559190910151910155806100d3816101a0565b91505061005a565b50506101dd565b600060208083850312156100f4578182fd5b82516001600160401b038082111561010a578384fd5b818501915085601f83011261011d578384fd5b81518181111561012f5761012f6101c7565b838102604051601f19603f83011681018181108582111715610153576101536101c7565b604052828152858101935084860182860187018a1015610171578788fd5b8795505b83861015610193578051855260019590950194938601938601610175565b5098975050505050505050565b60006000198214156101c057634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61080a806101ec6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd146100f45780639e7b8d6114610109578063a3ec138d1461011c578063e2ba53f01461013f57610088565b80630121b93f1461008d578063013cf08b146100a25780632e4176cf146100cc5780635c19a95c146100e1575b600080fd5b6100a061009b3660046105b5565b610147565b005b6100b56100b03660046105b5565b610208565b6040516100c39291906105ea565b60405180910390f35b6100d4610236565b6040516100c391906105cd565b6100a06100ef366004610587565b610245565b6100fc6103d2565b6040516100c391906105e1565b6100a0610117366004610587565b61046b565b61012f61012a366004610587565b610512565b6040516100c39493929190610767565b6100fc610546565b336000908152600160205260409020805461017d5760405162461bcd60e51b8152600401610174906105f8565b60405180910390fd5b600181015460ff16156101a25760405162461bcd60e51b815260040161017490610626565b6001818101805460ff19169091179055600280820183905581548154909190849081106101df57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160008282546101ff919061078b565b90915550505050565b6002818154811061021857600080fd5b60009182526020909120600290910201805460019091015490915082565b6000546001600160a01b031681565b3360009081526001602081905260409091209081015460ff161561027b5760405162461bcd60e51b81526004016101749061064e565b6001600160a01b0382163314156102a45760405162461bcd60e51b815260040161017490610730565b6001600160a01b038281166000908152600160208190526040909120015461010090041615610319576001600160a01b0391821660009081526001602081905260409091200154610100900490911690338214156103145760405162461bcd60e51b8152600401610174906106c2565b6102a4565b6001818101805460ff19168217610100600160a81b0319166101006001600160a01b0386169081029190911790915560009081526020829052604090209081015460ff16156103b35781546002828101548154811061038857634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160008282546103a8919061078b565b909155506103cd9050565b8154815482906000906103c790849061078b565b90915550505b505050565b600080805b60025481101561046657816002828154811061040357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101541115610454576002818154811061043c57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015491508092505b8061045e816107a3565b9150506103d7565b505090565b6000546001600160a01b031633146104955760405162461bcd60e51b81526004016101749061067a565b6001600160a01b0381166000908152600160208190526040909120015460ff16156104d25760405162461bcd60e51b8152600401610174906106f9565b6001600160a01b038116600090815260016020526040902054156104f557600080fd5b6001600160a01b0316600090815260016020819052604090912055565b600160208190526000918252604090912080549181015460029091015460ff82169161010090046001600160a01b03169084565b600060026105526103d2565b8154811061057057634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154905090565b600060208284031215610598578081fd5b81356001600160a01b03811681146105ae578182fd5b9392505050565b6000602082840312156105c6578081fd5b5035919050565b6001600160a01b0391909116815260200190565b90815260200190565b918252602082015260400190565b602080825260149082015273486173206e6f20726967687420746f20766f746560601b604082015260600190565b6020808252600e908201526d20b63932b0b23c903b37ba32b21760911b604082015260600190565b6020808252601290820152712cb7ba9030b63932b0b23c903b37ba32b21760711b604082015260600190565b60208082526028908201527f4f6e6c79206368616972706572736f6e2063616e2067697665207269676874206040820152673a37903b37ba329760c11b606082015260800190565b60208082526019908201527f466f756e64206c6f6f7020696e2064656c65676174696f6e2e00000000000000604082015260600190565b60208082526018908201527f54686520766f74657220616c726561647920766f7465642e0000000000000000604082015260600190565b6020808252601e908201527f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e0000604082015260600190565b93845291151560208401526001600160a01b03166040830152606082015260800190565b6000821982111561079e5761079e6107be565b500190565b60006000198214156107b7576107b76107be565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122025173ed113eef348989a9d4670ca4c8a51d1ac8547b0147067d227ac2d6e7c6b64736f6c63430008010033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x9F6 CODESIZE SUB DUP1 PUSH2 0x9F6 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0xE2 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR DUP1 DUP3 SSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 KECCAK256 SSTORE JUMPDEST DUP2 MLOAD DUP2 LT ISZERO PUSH2 0xDB JUMPI PUSH1 0x2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 DUP5 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x90 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD DUP3 MSTORE PUSH1 0x0 SWAP2 DUP2 ADD DUP3 SWAP1 MSTORE DUP4 SLOAD PUSH1 0x1 DUP2 DUP2 ADD DUP7 SSTORE SWAP5 DUP4 MSTORE SWAP2 DUP2 SWAP1 KECCAK256 DUP4 MLOAD PUSH1 0x2 SWAP1 SWAP4 MUL ADD SWAP2 DUP3 SSTORE SWAP2 SWAP1 SWAP2 ADD MLOAD SWAP2 ADD SSTORE DUP1 PUSH2 0xD3 DUP2 PUSH2 0x1A0 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x5A JUMP JUMPDEST POP POP PUSH2 0x1DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xF4 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x10A JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x11D JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 MLOAD DUP2 DUP2 GT ISZERO PUSH2 0x12F JUMPI PUSH2 0x12F PUSH2 0x1C7 JUMP JUMPDEST DUP4 DUP2 MUL PUSH1 0x40 MLOAD PUSH1 0x1F NOT PUSH1 0x3F DUP4 ADD AND DUP2 ADD DUP2 DUP2 LT DUP6 DUP3 GT OR ISZERO PUSH2 0x153 JUMPI PUSH2 0x153 PUSH2 0x1C7 JUMP JUMPDEST PUSH1 0x40 MSTORE DUP3 DUP2 MSTORE DUP6 DUP2 ADD SWAP4 POP DUP5 DUP7 ADD DUP3 DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x171 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x193 JUMPI DUP1 MLOAD DUP6 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP7 ADD SWAP4 DUP7 ADD PUSH2 0x175 JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x1C0 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 DUP2 REVERT JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x80A DUP1 PUSH2 0x1EC 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 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x609FF1BD GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x609FF1BD EQ PUSH2 0xF4 JUMPI DUP1 PUSH4 0x9E7B8D61 EQ PUSH2 0x109 JUMPI DUP1 PUSH4 0xA3EC138D EQ PUSH2 0x11C JUMPI DUP1 PUSH4 0xE2BA53F0 EQ PUSH2 0x13F JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0x121B93F EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x13CF08B EQ PUSH2 0xA2 JUMPI DUP1 PUSH4 0x2E4176CF EQ PUSH2 0xCC JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0xE1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA0 PUSH2 0x9B CALLDATASIZE PUSH1 0x4 PUSH2 0x5B5 JUMP JUMPDEST PUSH2 0x147 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0xB0 CALLDATASIZE PUSH1 0x4 PUSH2 0x5B5 JUMP JUMPDEST PUSH2 0x208 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP3 SWAP2 SWAP1 PUSH2 0x5EA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD4 PUSH2 0x236 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP2 SWAP1 PUSH2 0x5CD JUMP JUMPDEST PUSH2 0xA0 PUSH2 0xEF CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x245 JUMP JUMPDEST PUSH2 0xFC PUSH2 0x3D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP2 SWAP1 PUSH2 0x5E1 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x117 CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x46B JUMP JUMPDEST PUSH2 0x12F PUSH2 0x12A CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x767 JUMP JUMPDEST PUSH2 0xFC PUSH2 0x546 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x17D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x5F8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1A2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x626 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x2 DUP1 DUP3 ADD DUP4 SWAP1 SSTORE DUP2 SLOAD DUP2 SLOAD SWAP1 SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1DF JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x218 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 SWAP1 SWAP2 MUL ADD DUP1 SLOAD PUSH1 0x1 SWAP1 SWAP2 ADD SLOAD SWAP1 SWAP2 POP DUP3 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SWAP1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x27B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x64E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ ISZERO PUSH2 0x2A4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x730 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH2 0x100 SWAP1 DIV AND ISZERO PUSH2 0x319 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH2 0x100 SWAP1 DIV SWAP1 SWAP2 AND SWAP1 CALLER DUP3 EQ ISZERO PUSH2 0x314 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x6C2 JUMP JUMPDEST PUSH2 0x2A4 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 OR PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP3 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x3B3 JUMPI DUP2 SLOAD PUSH1 0x2 DUP3 DUP2 ADD SLOAD DUP2 SLOAD DUP2 LT PUSH2 0x388 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x3A8 SWAP2 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP PUSH2 0x3CD SWAP1 POP JUMP JUMPDEST DUP2 SLOAD DUP2 SLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x3C7 SWAP1 DUP5 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x2 SLOAD DUP2 LT ISZERO PUSH2 0x466 JUMPI DUP2 PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x403 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD GT ISZERO PUSH2 0x454 JUMPI PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x43C JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD SWAP2 POP DUP1 SWAP3 POP JUMPDEST DUP1 PUSH2 0x45E DUP2 PUSH2 0x7A3 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x3D7 JUMP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x495 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x67A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x4D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x6F9 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO PUSH2 0x4F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD SWAP2 DUP2 ADD SLOAD PUSH1 0x2 SWAP1 SWAP2 ADD SLOAD PUSH1 0xFF DUP3 AND SWAP2 PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP5 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH2 0x552 PUSH2 0x3D2 JUMP JUMPDEST DUP2 SLOAD DUP2 LT PUSH2 0x570 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x0 ADD SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x598 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x5AE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5C6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x14 SWAP1 DUP3 ADD MSTORE PUSH20 0x486173206E6F20726967687420746F20766F7465 PUSH1 0x60 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH14 0x20B63932B0B23C903B37BA32B217 PUSH1 0x91 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x12 SWAP1 DUP3 ADD MSTORE PUSH18 0x2CB7BA9030B63932B0B23C903B37BA32B217 PUSH1 0x71 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x4F6E6C79206368616972706572736F6E2063616E206769766520726967687420 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x3A37903B37BA3297 PUSH1 0xC1 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x19 SWAP1 DUP3 ADD MSTORE PUSH32 0x466F756E64206C6F6F7020696E2064656C65676174696F6E2E00000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x18 SWAP1 DUP3 ADD MSTORE PUSH32 0x54686520766F74657220616C726561647920766F7465642E0000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1E SWAP1 DUP3 ADD MSTORE PUSH32 0x53656C662D64656C65676174696F6E20697320646973616C6C6F7765642E0000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE SWAP2 ISZERO ISZERO PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 NOT DUP3 GT ISZERO PUSH2 0x79E JUMPI PUSH2 0x79E PUSH2 0x7BE JUMP JUMPDEST POP ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x7B7 JUMPI PUSH2 0x7B7 PUSH2 0x7BE JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x25 OR RETURNDATACOPY 0xD1 SGT 0xEE RETURN 0x48 SWAP9 SWAP11 SWAP14 CHAINID PUSH17 0xCA4C8A51D1AC8547B0147067D227AC2D6E PUSH29 0x6B64736F6C634300080100330000000000000000000000000000000000 ",
"sourceMap": "157:4362:0:-:0;;;958:481;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1012:11;:24;;-1:-1:-1;;;;;;1012:24:0;1026:10;1012:24;;;;-1:-1:-1;;;;;1053:11:0;1046:19;;1012:24;1046:19;;;;;;;:30;1087:346;1108:13;:20;1104:1;:24;1087:346;;;1312:9;1327:94;;;;;;;;1360:13;1374:1;1360:16;;;;;;-1:-1:-1;;;1360:16:0;;;;;;;;;;;;;;;;;;;;1327:94;;1405:1;1327:94;;;;;;1312:110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1130:3;;;;:::i;:::-;;;;1087:346;;;;958:481;157:4362;;14:1162:1;;140:2;183;171:9;162:7;158:23;154:32;151:2;;;204:6;196;189:22;151:2;236:16;;-1:-1:-1;;;;;301:14:1;;;298:2;;;333:6;325;318:22;298:2;376:6;365:9;361:22;351:32;;421:7;414:4;410:2;406:13;402:27;392:2;;448:6;440;433:22;392:2;482;476:9;504:2;500;497:10;494:2;;;510:18;;:::i;:::-;557:2;553;549:11;589:2;583:9;652:2;648:7;643:2;639;635:11;631:25;623:6;619:38;707:6;695:10;692:22;687:2;675:10;672:18;669:46;666:2;;;718:18;;:::i;:::-;754:2;747:22;804:18;;;838:15;;;;-1:-1:-1;873:11:1;;;903;;;899:20;;896:33;-1:-1:-1;893:2:1;;;947:6;939;932:22;893:2;974:6;965:15;;989:156;1003:2;1000:1;997:9;989:156;;;1060:10;;1048:23;;1021:1;1014:9;;;;;1091:12;;;;1123;;989:156;;;-1:-1:-1;1164:6:1;120:1056;-1:-1:-1;;;;;;;;120:1056:1:o;1181:236::-;;-1:-1:-1;;1241:17:1;;1238:2;;;-1:-1:-1;;;1281:33:1;;1337:4;1334:1;1327:15;1367:4;1288:3;1355:17;1238:2;-1:-1:-1;1409:1:1;1398:13;;1228:189::o;1422:127::-;1483:10;1478:3;1474:20;1471:1;1464:31;1514:4;1511:1;1504:15;1538:4;1535:1;1528:15;1454:95;157:4362:0;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4693:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:236:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "139:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "147:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "105:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "114:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "101:3:1"
},
"nodeType": "YulFunctionCall",
"src": "101:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "126:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "97:3:1"
},
"nodeType": "YulFunctionCall",
"src": "97:32:1"
},
"nodeType": "YulIf",
"src": "94:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "165:36:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "191:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "178:12:1"
},
"nodeType": "YulFunctionCall",
"src": "178:23:1"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "169:5:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "264:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "273:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "281:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "266:6:1"
},
"nodeType": "YulFunctionCall",
"src": "266:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "223:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "234:5:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "249:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "254:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "245:3:1"
},
"nodeType": "YulFunctionCall",
"src": "245:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "258:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "241:3:1"
},
"nodeType": "YulFunctionCall",
"src": "241:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "230:3:1"
},
"nodeType": "YulFunctionCall",
"src": "230:31:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "220:2:1"
},
"nodeType": "YulFunctionCall",
"src": "220:42:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "213:6:1"
},
"nodeType": "YulFunctionCall",
"src": "213:50:1"
},
"nodeType": "YulIf",
"src": "210:2:1"
},
{
"nodeType": "YulAssignment",
"src": "299:15:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "309:5:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "299:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "50:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "61:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "73:6:1",
"type": ""
}
],
"src": "14:306:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "395:120:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "441:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "450:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "458:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "443:6:1"
},
"nodeType": "YulFunctionCall",
"src": "443:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "443:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "416:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "425:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "412:3:1"
},
"nodeType": "YulFunctionCall",
"src": "412:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "437:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "408:3:1"
},
"nodeType": "YulFunctionCall",
"src": "408:32:1"
},
"nodeType": "YulIf",
"src": "405:2:1"
},
{
"nodeType": "YulAssignment",
"src": "476:33:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "499:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "486:12:1"
},
"nodeType": "YulFunctionCall",
"src": "486:23:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "476:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "361:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "372:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "384:6:1",
"type": ""
}
],
"src": "325:190:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "621:102:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "631:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "643:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "654:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "639:3:1"
},
"nodeType": "YulFunctionCall",
"src": "639:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "631:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "673:9:1"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "688:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "704:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "709:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "700:3:1"
},
"nodeType": "YulFunctionCall",
"src": "700:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "713:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "696:3:1"
},
"nodeType": "YulFunctionCall",
"src": "696:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "684:3:1"
},
"nodeType": "YulFunctionCall",
"src": "684:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "666:6:1"
},
"nodeType": "YulFunctionCall",
"src": "666:51:1"
},
"nodeType": "YulExpressionStatement",
"src": "666:51:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "590:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "601:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "612:4:1",
"type": ""
}
],
"src": "520:203:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "829:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "839:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "851:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "862:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "847:3:1"
},
"nodeType": "YulFunctionCall",
"src": "847:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "839:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "881:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "892:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "874:6:1"
},
"nodeType": "YulFunctionCall",
"src": "874:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "874:25:1"
}
]
},
"name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "798:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "809:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "820:4:1",
"type": ""
}
],
"src": "728:177:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1039:119:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1049:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1061:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1072:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1057:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1057:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1049:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1091:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1102:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1084:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1084:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "1084:25:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1129:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1140:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1125:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1125:18:1"
},
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1145:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1118:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1118:34:1"
},
"nodeType": "YulExpressionStatement",
"src": "1118:34:1"
}
]
},
"name": "abi_encode_tuple_t_bytes32_t_uint256__to_t_bytes32_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1000:9:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1011:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1019:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1030:4:1",
"type": ""
}
],
"src": "910:248:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1337:170:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1354:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1365:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1347:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1347:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "1347:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1388:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1399:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1384:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1384:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1404:2:1",
"type": "",
"value": "20"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1377:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1377:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "1377:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1427:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1438:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1423:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1423:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "1443:22:1",
"type": "",
"value": "Has no right to vote"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1416:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1416:50:1"
},
"nodeType": "YulExpressionStatement",
"src": "1416:50:1"
},
{
"nodeType": "YulAssignment",
"src": "1475:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1487:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1498:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1483:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1483:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1475:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_0dc527e8fa9b76c996eb5eda9ddb749b21540f5509781b94e1e37f7027e7f50e__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1314:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1328:4:1",
"type": ""
}
],
"src": "1163:344:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1686:164:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1703:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1714:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1696:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1696:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "1696:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1737:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1748:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1733:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1733:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1753:2:1",
"type": "",
"value": "14"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1726:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1726:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "1726:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1776:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1787:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1772:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1772:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "1792:16:1",
"type": "",
"value": "Already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1765:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1765:44:1"
},
"nodeType": "YulExpressionStatement",
"src": "1765:44:1"
},
{
"nodeType": "YulAssignment",
"src": "1818:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1830:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1841:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1826:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1826:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1818:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_56aab92b7164a4ea72a098d2d95a5e763b71d07f265e8d46fc7240404017fa84__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1663:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1677:4:1",
"type": ""
}
],
"src": "1512:338:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2029:168:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2046:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2057:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2039:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2039:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2039:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2080:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2091:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2076:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2076:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2096:2:1",
"type": "",
"value": "18"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2069:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2069:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2069:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2119:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2130:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2115:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2115:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "2135:20:1",
"type": "",
"value": "You already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2108:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2108:48:1"
},
"nodeType": "YulExpressionStatement",
"src": "2108:48:1"
},
{
"nodeType": "YulAssignment",
"src": "2165:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2177:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2188:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2173:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2173:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2165:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_657c6119c4ed567c60278fba62242b17c2fedf38962e651040dabfb3c9e15a5f__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2006:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2020:4:1",
"type": ""
}
],
"src": "1855:342:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2376:230:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2393:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2404:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2386:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2386:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2386:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2427:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2438:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2423:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2423:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2443:2:1",
"type": "",
"value": "40"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2416:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2416:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2416:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2466:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2477:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2462:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2462:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "2482:34:1",
"type": "",
"value": "Only chairperson can give right "
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2455:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2455:62:1"
},
"nodeType": "YulExpressionStatement",
"src": "2455:62:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2537:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2548:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2533:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2533:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "2553:10:1",
"type": "",
"value": "to vote."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2526:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2526:38:1"
},
"nodeType": "YulExpressionStatement",
"src": "2526:38:1"
},
{
"nodeType": "YulAssignment",
"src": "2573:27:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2585:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2596:3:1",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2581:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2581:19:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2573:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_80126ce3251ab2b6e4ade14fe5b2bc11f593510cbe9e3550c09bff1989e33b95__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2353:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2367:4:1",
"type": ""
}
],
"src": "2202:404:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2785:175:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2802:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2813:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2795:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2795:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2795:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2836:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2847:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2832:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2832:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2852:2:1",
"type": "",
"value": "25"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2825:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2825:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2825:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2875:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2886:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2871:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2871:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "2891:27:1",
"type": "",
"value": "Found loop in delegation."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2864:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2864:55:1"
},
"nodeType": "YulExpressionStatement",
"src": "2864:55:1"
},
{
"nodeType": "YulAssignment",
"src": "2928:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2940:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2951:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2936:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2936:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2928:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_8bd75322489f7ff7ab0b18506f4dcde935a32eca2a506b00f4d21b0becfa093c__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2762:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2776:4:1",
"type": ""
}
],
"src": "2611:349:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3139:174:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3156:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3167:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3149:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3149:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "3149:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3190:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3201:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3186:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3186:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3206:2:1",
"type": "",
"value": "24"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3179:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3179:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "3179:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3229:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3240:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3225:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3225:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "3245:26:1",
"type": "",
"value": "The voter already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3218:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3218:54:1"
},
"nodeType": "YulExpressionStatement",
"src": "3218:54:1"
},
{
"nodeType": "YulAssignment",
"src": "3281:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3293:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3304:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3289:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3289:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3281:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_d39b1db28626750c546703ffb72f30ea3facdfed1bebd47408e22ef18a76ba2d__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3116:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3130:4:1",
"type": ""
}
],
"src": "2965:348:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3492:180:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3509:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3520:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3502:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3502:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "3502:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3543:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3554:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3539:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3539:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3559:2:1",
"type": "",
"value": "30"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3532:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3532:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "3532:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3582:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3593:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3578:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3578:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "3598:32:1",
"type": "",
"value": "Self-delegation is disallowed."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3571:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3571:60:1"
},
"nodeType": "YulExpressionStatement",
"src": "3571:60:1"
},
{
"nodeType": "YulAssignment",
"src": "3640:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3652:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3663:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3648:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3648:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3640:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_f37bf1aca80f8fa291a40f639db6aeaa1425ceb0e8c61c8648f0e2efa282a947__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3469:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3483:4:1",
"type": ""
}
],
"src": "3318:354:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3778:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3788:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3800:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3811:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3796:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3796:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3788:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3830:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "3841:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3823:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3823:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "3823:25:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3747:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "3758:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3769:4:1",
"type": ""
}
],
"src": "3677:177:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4038:248:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4048:27:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4060:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4071:3:1",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4056:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4056:19:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4048:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4091:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "4102:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4084:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4084:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "4084:25:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4129:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4140:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4125:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4125:18:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "4159:6:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "4152:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4152:14:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "4145:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4145:22:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4118:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4118:50:1"
},
"nodeType": "YulExpressionStatement",
"src": "4118:50:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4188:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4199:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4184:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4184:18:1"
},
{
"arguments": [
{
"name": "value2",
"nodeType": "YulIdentifier",
"src": "4208:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4224:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4229:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4220:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4220:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4233:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "4216:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4216:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "4204:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4204:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4177:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4177:60:1"
},
"nodeType": "YulExpressionStatement",
"src": "4177:60:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4257:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4268:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4253:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4253:18:1"
},
{
"name": "value3",
"nodeType": "YulIdentifier",
"src": "4273:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4246:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4246:34:1"
},
"nodeType": "YulExpressionStatement",
"src": "4246:34:1"
}
]
},
"name": "abi_encode_tuple_t_uint256_t_bool_t_address_t_uint256__to_t_uint256_t_bool_t_address_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3983:9:1",
"type": ""
},
{
"name": "value3",
"nodeType": "YulTypedName",
"src": "3994:6:1",
"type": ""
},
{
"name": "value2",
"nodeType": "YulTypedName",
"src": "4002:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "4010:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "4018:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "4029:4:1",
"type": ""
}
],
"src": "3859:427:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4339:80:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4366:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "4368:16:1"
},
"nodeType": "YulFunctionCall",
"src": "4368:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "4368:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "4355:1:1"
},
{
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "4362:1:1"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4358:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4358:6:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "4352:2:1"
},
"nodeType": "YulFunctionCall",
"src": "4352:13:1"
},
"nodeType": "YulIf",
"src": "4349:2:1"
},
{
"nodeType": "YulAssignment",
"src": "4397:16:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "4408:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "4411:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4404:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4404:9:1"
},
"variableNames": [
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "4397:3:1"
}
]
}
]
},
"name": "checked_add_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "4322:1:1",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "4325:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nodeType": "YulTypedName",
"src": "4331:3:1",
"type": ""
}
],
"src": "4291:128:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4471:88:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4502:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "4504:16:1"
},
"nodeType": "YulFunctionCall",
"src": "4504:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "4504:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4487:5:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4498:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4494:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4494:6:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "4484:2:1"
},
"nodeType": "YulFunctionCall",
"src": "4484:17:1"
},
"nodeType": "YulIf",
"src": "4481:2:1"
},
{
"nodeType": "YulAssignment",
"src": "4533:20:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4544:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4551:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4540:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4540:13:1"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "4533:3:1"
}
]
}
]
},
"name": "increment_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "4453:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "4463:3:1",
"type": ""
}
],
"src": "4424:135:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4596:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4613:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4620:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4625:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4616:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4616:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4606:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4606:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "4606:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4653:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4656:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4646:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4646:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4646:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4677:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4680:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4670:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4670:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4670:15:1"
}
]
},
"name": "panic_error_0x11",
"nodeType": "YulFunctionDefinition",
"src": "4564:127:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(value0, value0) }\n value0 := value\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_bytes32_t_uint256__to_t_bytes32_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function abi_encode_tuple_t_stringliteral_0dc527e8fa9b76c996eb5eda9ddb749b21540f5509781b94e1e37f7027e7f50e__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 20)\n mstore(add(headStart, 64), \"Has no right to vote\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_56aab92b7164a4ea72a098d2d95a5e763b71d07f265e8d46fc7240404017fa84__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 14)\n mstore(add(headStart, 64), \"Already voted.\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_657c6119c4ed567c60278fba62242b17c2fedf38962e651040dabfb3c9e15a5f__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 18)\n mstore(add(headStart, 64), \"You already voted.\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_80126ce3251ab2b6e4ade14fe5b2bc11f593510cbe9e3550c09bff1989e33b95__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 40)\n mstore(add(headStart, 64), \"Only chairperson can give right \")\n mstore(add(headStart, 96), \"to vote.\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_stringliteral_8bd75322489f7ff7ab0b18506f4dcde935a32eca2a506b00f4d21b0becfa093c__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 25)\n mstore(add(headStart, 64), \"Found loop in delegation.\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_d39b1db28626750c546703ffb72f30ea3facdfed1bebd47408e22ef18a76ba2d__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 24)\n mstore(add(headStart, 64), \"The voter already voted.\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_f37bf1aca80f8fa291a40f639db6aeaa1425ceb0e8c61c8648f0e2efa282a947__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 30)\n mstore(add(headStart, 64), \"Self-delegation is disallowed.\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_uint256_t_bool_t_address_t_uint256__to_t_uint256_t_bool_t_address_t_uint256__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), iszero(iszero(value1)))\n mstore(add(headStart, 64), and(value2, sub(shl(160, 1), 1)))\n mstore(add(headStart, 96), value3)\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n if gt(x, not(y)) { panic_error_0x11() }\n sum := add(x, y)\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0)) { panic_error_0x11() }\n ret := add(value, 1)\n }\n function panic_error_0x11()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n}",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd146100f45780639e7b8d6114610109578063a3ec138d1461011c578063e2ba53f01461013f57610088565b80630121b93f1461008d578063013cf08b146100a25780632e4176cf146100cc5780635c19a95c146100e1575b600080fd5b6100a061009b3660046105b5565b610147565b005b6100b56100b03660046105b5565b610208565b6040516100c39291906105ea565b60405180910390f35b6100d4610236565b6040516100c391906105cd565b6100a06100ef366004610587565b610245565b6100fc6103d2565b6040516100c391906105e1565b6100a0610117366004610587565b61046b565b61012f61012a366004610587565b610512565b6040516100c39493929190610767565b6100fc610546565b336000908152600160205260409020805461017d5760405162461bcd60e51b8152600401610174906105f8565b60405180910390fd5b600181015460ff16156101a25760405162461bcd60e51b815260040161017490610626565b6001818101805460ff19169091179055600280820183905581548154909190849081106101df57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160008282546101ff919061078b565b90915550505050565b6002818154811061021857600080fd5b60009182526020909120600290910201805460019091015490915082565b6000546001600160a01b031681565b3360009081526001602081905260409091209081015460ff161561027b5760405162461bcd60e51b81526004016101749061064e565b6001600160a01b0382163314156102a45760405162461bcd60e51b815260040161017490610730565b6001600160a01b038281166000908152600160208190526040909120015461010090041615610319576001600160a01b0391821660009081526001602081905260409091200154610100900490911690338214156103145760405162461bcd60e51b8152600401610174906106c2565b6102a4565b6001818101805460ff19168217610100600160a81b0319166101006001600160a01b0386169081029190911790915560009081526020829052604090209081015460ff16156103b35781546002828101548154811061038857634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160008282546103a8919061078b565b909155506103cd9050565b8154815482906000906103c790849061078b565b90915550505b505050565b600080805b60025481101561046657816002828154811061040357634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101541115610454576002818154811061043c57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015491508092505b8061045e816107a3565b9150506103d7565b505090565b6000546001600160a01b031633146104955760405162461bcd60e51b81526004016101749061067a565b6001600160a01b0381166000908152600160208190526040909120015460ff16156104d25760405162461bcd60e51b8152600401610174906106f9565b6001600160a01b038116600090815260016020526040902054156104f557600080fd5b6001600160a01b0316600090815260016020819052604090912055565b600160208190526000918252604090912080549181015460029091015460ff82169161010090046001600160a01b03169084565b600060026105526103d2565b8154811061057057634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154905090565b600060208284031215610598578081fd5b81356001600160a01b03811681146105ae578182fd5b9392505050565b6000602082840312156105c6578081fd5b5035919050565b6001600160a01b0391909116815260200190565b90815260200190565b918252602082015260400190565b602080825260149082015273486173206e6f20726967687420746f20766f746560601b604082015260600190565b6020808252600e908201526d20b63932b0b23c903b37ba32b21760911b604082015260600190565b6020808252601290820152712cb7ba9030b63932b0b23c903b37ba32b21760711b604082015260600190565b60208082526028908201527f4f6e6c79206368616972706572736f6e2063616e2067697665207269676874206040820152673a37903b37ba329760c11b606082015260800190565b60208082526019908201527f466f756e64206c6f6f7020696e2064656c65676174696f6e2e00000000000000604082015260600190565b60208082526018908201527f54686520766f74657220616c726561647920766f7465642e0000000000000000604082015260600190565b6020808252601e908201527f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e0000604082015260600190565b93845291151560208401526001600160a01b03166040830152606082015260800190565b6000821982111561079e5761079e6107be565b500190565b60006000198214156107b7576107b76107be565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122025173ed113eef348989a9d4670ca4c8a51d1ac8547b0147067d227ac2d6e7c6b64736f6c63430008010033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x609FF1BD GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x609FF1BD EQ PUSH2 0xF4 JUMPI DUP1 PUSH4 0x9E7B8D61 EQ PUSH2 0x109 JUMPI DUP1 PUSH4 0xA3EC138D EQ PUSH2 0x11C JUMPI DUP1 PUSH4 0xE2BA53F0 EQ PUSH2 0x13F JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0x121B93F EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x13CF08B EQ PUSH2 0xA2 JUMPI DUP1 PUSH4 0x2E4176CF EQ PUSH2 0xCC JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0xE1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA0 PUSH2 0x9B CALLDATASIZE PUSH1 0x4 PUSH2 0x5B5 JUMP JUMPDEST PUSH2 0x147 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0xB0 CALLDATASIZE PUSH1 0x4 PUSH2 0x5B5 JUMP JUMPDEST PUSH2 0x208 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP3 SWAP2 SWAP1 PUSH2 0x5EA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD4 PUSH2 0x236 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP2 SWAP1 PUSH2 0x5CD JUMP JUMPDEST PUSH2 0xA0 PUSH2 0xEF CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x245 JUMP JUMPDEST PUSH2 0xFC PUSH2 0x3D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP2 SWAP1 PUSH2 0x5E1 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x117 CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x46B JUMP JUMPDEST PUSH2 0x12F PUSH2 0x12A CALLDATASIZE PUSH1 0x4 PUSH2 0x587 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC3 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x767 JUMP JUMPDEST PUSH2 0xFC PUSH2 0x546 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x17D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x5F8 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1A2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x626 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x2 DUP1 DUP3 ADD DUP4 SWAP1 SSTORE DUP2 SLOAD DUP2 SLOAD SWAP1 SWAP2 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x1DF JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x218 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 PUSH1 0x2 SWAP1 SWAP2 MUL ADD DUP1 SLOAD PUSH1 0x1 SWAP1 SWAP2 ADD SLOAD SWAP1 SWAP2 POP DUP3 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SWAP1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x27B JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x64E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ ISZERO PUSH2 0x2A4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x730 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH2 0x100 SWAP1 DIV AND ISZERO PUSH2 0x319 JUMPI PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH2 0x100 SWAP1 DIV SWAP1 SWAP2 AND SWAP1 CALLER DUP3 EQ ISZERO PUSH2 0x314 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x6C2 JUMP JUMPDEST PUSH2 0x2A4 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 OR PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP3 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x3B3 JUMPI DUP2 SLOAD PUSH1 0x2 DUP3 DUP2 ADD SLOAD DUP2 SLOAD DUP2 LT PUSH2 0x388 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x3A8 SWAP2 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP PUSH2 0x3CD SWAP1 POP JUMP JUMPDEST DUP2 SLOAD DUP2 SLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x3C7 SWAP1 DUP5 SWAP1 PUSH2 0x78B JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x2 SLOAD DUP2 LT ISZERO PUSH2 0x466 JUMPI DUP2 PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x403 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD GT ISZERO PUSH2 0x454 JUMPI PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x43C JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD SWAP2 POP DUP1 SWAP3 POP JUMPDEST DUP1 PUSH2 0x45E DUP2 PUSH2 0x7A3 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x3D7 JUMP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x495 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x67A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x4D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x174 SWAP1 PUSH2 0x6F9 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO PUSH2 0x4F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD SWAP2 DUP2 ADD SLOAD PUSH1 0x2 SWAP1 SWAP2 ADD SLOAD PUSH1 0xFF DUP3 AND SWAP2 PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP5 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 PUSH2 0x552 PUSH2 0x3D2 JUMP JUMPDEST DUP2 SLOAD DUP2 LT PUSH2 0x570 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x0 ADD SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x598 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x5AE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5C6 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x14 SWAP1 DUP3 ADD MSTORE PUSH20 0x486173206E6F20726967687420746F20766F7465 PUSH1 0x60 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH14 0x20B63932B0B23C903B37BA32B217 PUSH1 0x91 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x12 SWAP1 DUP3 ADD MSTORE PUSH18 0x2CB7BA9030B63932B0B23C903B37BA32B217 PUSH1 0x71 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x28 SWAP1 DUP3 ADD MSTORE PUSH32 0x4F6E6C79206368616972706572736F6E2063616E206769766520726967687420 PUSH1 0x40 DUP3 ADD MSTORE PUSH8 0x3A37903B37BA3297 PUSH1 0xC1 SHL PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x19 SWAP1 DUP3 ADD MSTORE PUSH32 0x466F756E64206C6F6F7020696E2064656C65676174696F6E2E00000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x18 SWAP1 DUP3 ADD MSTORE PUSH32 0x54686520766F74657220616C726561647920766F7465642E0000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x1E SWAP1 DUP3 ADD MSTORE PUSH32 0x53656C662D64656C65676174696F6E20697320646973616C6C6F7765642E0000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE SWAP2 ISZERO ISZERO PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 NOT DUP3 GT ISZERO PUSH2 0x79E JUMPI PUSH2 0x79E PUSH2 0x7BE JUMP JUMPDEST POP ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x7B7 JUMPI PUSH2 0x7B7 PUSH2 0x7BE JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x25 OR RETURNDATACOPY 0xD1 SGT 0xEE RETURN 0x48 SWAP9 SWAP11 SWAP14 CHAINID PUSH17 0xCA4C8A51D1AC8547B0147067D227AC2D6E PUSH29 0x6B64736F6C634300080100330000000000000000000000000000000000 ",
"sourceMap": "157:4362:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3173:458;;;;;;:::i;:::-;;:::i;:::-;;794:27;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;715:26;;;:::i;:::-;;;;;;;:::i;2078:907::-;;;;;;:::i;:::-;;:::i;3817:365::-;;;:::i;:::-;;;;;;;:::i;1599:355::-;;;;;;:::i;:::-;;:::i;748:39::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;4373:144::-;;;:::i;3173:458::-;3249:10;3219:20;3242:18;;;:6;:18;;;;;3278:13;;3270:51;;;;-1:-1:-1;;;3270:51:0;;;;;;;:::i;:::-;;;;;;;;;3340:12;;;;;;3339:13;3331:40;;;;-1:-1:-1;;;3331:40:0;;;;;;;:::i;:::-;3396:4;3381:12;;;:19;;-1:-1:-1;;3381:19:0;;;;;;3410:11;;;;:22;;;3611:13;;3578:19;;3611:13;;3410:11;3424:8;;3578:19;;;;-1:-1:-1;;;3578:19:0;;;;;;;;;;;;;;;;;;;:29;;;:46;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;3173:458:0:o;794:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;794:27:0;:::o;715:26::-;;;-1:-1:-1;;;;;715:26:0;;:::o;2078:907::-;2155:10;2125:20;2148:18;;;:6;:18;;;;;;;;2185:12;;;;;;2184:13;2176:44;;;;-1:-1:-1;;;2176:44:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2238:16:0;;2244:10;2238:16;;2230:59;;;;-1:-1:-1;;;2230:59:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2307:10:0;;;2338:1;2307:10;;;:6;:10;;;;;;;;:19;;;;;;:33;2300:223;;-1:-1:-1;;;;;2361:10:0;;;;;;;:6;:10;;;;;;;;:19;;;;;;;;;2472:10;2466:16;;;2458:54;;;;-1:-1:-1;;;2458:54:0;;;;;;;:::i;:::-;2300:223;;;2547:4;2532:12;;;:19;;-1:-1:-1;;2532:19:0;;;-1:-1:-1;;;;;;2561:20:0;2532:19;-1:-1:-1;;;;;2561:20:0;;;;;;;;;;;;-1:-1:-1;2617:10:0;;;;;;;;;;2641:15;;;;2532:19;2641:15;2637:342;;;2808:13;;2769:9;2779:14;;;;2769:25;;;;;;-1:-1:-1;;;2769:25:0;;;;;;;;;;;;;;;;;;;:35;;;:52;;;;;;;:::i;:::-;;;;-1:-1:-1;2637:342:0;;-1:-1:-1;2637:342:0;;2955:13;;2935:33;;:9;;2955:13;;2935:33;;2955:13;;2935:33;:::i;:::-;;;;-1:-1:-1;;2637:342:0;2078:907;;;:::o;3817:365::-;3877:21;;;3949:227;3970:9;:16;3966:20;;3949:227;;;4036:16;4011:9;4021:1;4011:12;;;;;;-1:-1:-1;;;4011:12:0;;;;;;;;;;;;;;;;;;;:22;;;:41;4007:159;;;4091:9;4101:1;4091:12;;;;;;-1:-1:-1;;;4091:12:0;;;;;;;;;;;;;;;;;;;:22;;;4072:41;;4150:1;4131:20;;4007:159;3988:3;;;;:::i;:::-;;;;3949:227;;;;3817:365;;:::o;1599:355::-;1691:11;;-1:-1:-1;;;;;1691:11:0;1677:10;:25;1656:112;;;;-1:-1:-1;;;1656:112:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;1800:13:0;;;;;;:6;:13;;;;;;;;:19;;;;1799:20;1778:91;;;;-1:-1:-1;;;1778:91:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;1887:13:0;;;;;;:6;:13;;;;;:20;:25;1879:34;;;;;;-1:-1:-1;;;;;1923:13:0;;;;;1946:1;1923:13;;;;;;;;:24;1599:355::o;748:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;748:39:0;;;:::o;4373:144::-;4428:19;4477:9;4487:17;:15;:17::i;:::-;4477:28;;;;;;-1:-1:-1;;;4477:28:0;;;;;;;;;;;;;;;;;;;:33;;;4463:47;;4373:144;:::o;14:306:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;178:23;;-1:-1:-1;;;;;230:31:1;;220:42;;210:2;;281:6;273;266:22;210:2;309:5;84:236;-1:-1:-1;;;84:236:1:o;325:190::-;;437:2;425:9;416:7;412:23;408:32;405:2;;;458:6;450;443:22;405:2;-1:-1:-1;486:23:1;;395:120;-1:-1:-1;395:120:1:o;520:203::-;-1:-1:-1;;;;;684:32:1;;;;666:51;;654:2;639:18;;621:102::o;728:177::-;874:25;;;862:2;847:18;;829:76::o;910:248::-;1084:25;;;1140:2;1125:18;;1118:34;1072:2;1057:18;;1039:119::o;1163:344::-;1365:2;1347:21;;;1404:2;1384:18;;;1377:30;-1:-1:-1;;;1438:2:1;1423:18;;1416:50;1498:2;1483:18;;1337:170::o;1512:338::-;1714:2;1696:21;;;1753:2;1733:18;;;1726:30;-1:-1:-1;;;1787:2:1;1772:18;;1765:44;1841:2;1826:18;;1686:164::o;1855:342::-;2057:2;2039:21;;;2096:2;2076:18;;;2069:30;-1:-1:-1;;;2130:2:1;2115:18;;2108:48;2188:2;2173:18;;2029:168::o;2202:404::-;2404:2;2386:21;;;2443:2;2423:18;;;2416:30;2482:34;2477:2;2462:18;;2455:62;-1:-1:-1;;;2548:2:1;2533:18;;2526:38;2596:3;2581:19;;2376:230::o;2611:349::-;2813:2;2795:21;;;2852:2;2832:18;;;2825:30;2891:27;2886:2;2871:18;;2864:55;2951:2;2936:18;;2785:175::o;2965:348::-;3167:2;3149:21;;;3206:2;3186:18;;;3179:30;3245:26;3240:2;3225:18;;3218:54;3304:2;3289:18;;3139:174::o;3318:354::-;3520:2;3502:21;;;3559:2;3539:18;;;3532:30;3598:32;3593:2;3578:18;;3571:60;3663:2;3648:18;;3492:180::o;3859:427::-;4084:25;;;4152:14;;4145:22;4140:2;4125:18;;4118:50;-1:-1:-1;;;;;4204:32:1;4199:2;4184:18;;4177:60;4268:2;4253:18;;4246:34;4071:3;4056:19;;4038:248::o;4291:128::-;;4362:1;4358:6;4355:1;4352:13;4349:2;;;4368:18;;:::i;:::-;-1:-1:-1;4404:9:1;;4339:80::o;4424:135::-;;-1:-1:-1;;4484:17:1;;4481:2;;;4504:18;;:::i;:::-;-1:-1:-1;4551:1:1;4540:13;;4471:88::o;4564:127::-;4625:10;4620:3;4616:20;4613:1;4606:31;4656:4;4653:1;4646:15;4680:4;4677:1;4670:15"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "411600",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"chairperson()": "1115",
"delegate(address)": "infinite",
"giveRightToVote(address)": "23057",
"proposals(uint256)": "2869",
"vote(uint256)": "65401",
"voters(address)": "3019",
"winnerName()": "infinite",
"winningProposal()": "infinite"
}
},
"methodIdentifiers": {
"chairperson()": "2e4176cf",
"delegate(address)": "5c19a95c",
"giveRightToVote(address)": "9e7b8d61",
"proposals(uint256)": "013cf08b",
"vote(uint256)": "0121b93f",
"voters(address)": "a3ec138d",
"winnerName()": "e2ba53f0",
"winningProposal()": "609ff1bd"
}
},
"abi": [
{
"inputs": [
{
"internalType": "bytes32[]",
"name": "proposalNames",
"type": "bytes32[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "chairperson",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "voter",
"type": "address"
}
],
"name": "giveRightToVote",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "proposals",
"outputs": [
{
"internalType": "bytes32",
"name": "name",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "voteCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "proposal",
"type": "uint256"
}
],
"name": "vote",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "voters",
"outputs": [
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
},
{
"internalType": "bool",
"name": "voted",
"type": "bool"
},
{
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"internalType": "uint256",
"name": "vote",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "winnerName",
"outputs": [
{
"internalType": "bytes32",
"name": "winnerName_",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "winningProposal",
"outputs": [
{
"internalType": "uint256",
"name": "winningProposal_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.1+commit.df193b15"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "bytes32[]",
"name": "proposalNames",
"type": "bytes32[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "chairperson",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "voter",
"type": "address"
}
],
"name": "giveRightToVote",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "proposals",
"outputs": [
{
"internalType": "bytes32",
"name": "name",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "voteCount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "proposal",
"type": "uint256"
}
],
"name": "vote",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "voters",
"outputs": [
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
},
{
"internalType": "bool",
"name": "voted",
"type": "bool"
},
{
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"internalType": "uint256",
"name": "vote",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "winnerName",
"outputs": [
{
"internalType": "bytes32",
"name": "winnerName_",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "winningProposal",
"outputs": [
{
"internalType": "uint256",
"name": "winningProposal_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"details": "Implements voting process along with vote delegation",
"kind": "dev",
"methods": {
"constructor": {
"details": "Create a new ballot to choose one of 'proposalNames'.",
"params": {
"proposalNames": "names of proposals"
}
},
"delegate(address)": {
"details": "Delegate your vote to the voter 'to'.",
"params": {
"to": "address to which vote is delegated"
}
},
"giveRightToVote(address)": {
"details": "Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'.",
"params": {
"voter": "address of voter"
}
},
"vote(uint256)": {
"details": "Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'.",
"params": {
"proposal": "index of proposal in the proposals array"
}
},
"winnerName()": {
"details": "Calls winningProposal() function to get the index of the winner contained in the proposals array and then",
"returns": {
"winnerName_": "the name of the winner"
}
},
"winningProposal()": {
"details": "Computes the winning proposal taking all previous votes into account.",
"returns": {
"winningProposal_": "index of winning proposal in the proposals array"
}
}
},
"title": "Ballot",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/3_Ballot.sol": "Ballot"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/3_Ballot.sol": {
"keccak256": "0xdd897b48a563d1d32369fdb327187dfcd2660159cfcd3787196bb6be6a312c8d",
"license": "GPL-3.0",
"urls": [
"bzz-raw://551d7a6d3e2abc66a7b37fbd8b0e4c07b43c72c3b55958e66ac421348311fed4",
"dweb:/ipfs/Qmd4XV9j79GPfv5cgVsg62vKzaLuf6igx7VSW2BKaUyF3w"
]
}
},
"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": {
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735908290a36101b0806100696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b61004361006e565b6040516100509190610139565b60405180910390f35b61006c61006736600461010b565b61007d565b005b6000546001600160a01b031690565b6000546001600160a01b031633146100b05760405162461bcd60e51b81526004016100a79061014d565b60405180910390fd5b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561011c578081fd5b81356001600160a01b0381168114610132578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60208082526013908201527221b0b63632b91034b9903737ba1037bbb732b960691b60408201526060019056fea26469706673582212208da1548384789aff4990abe9e44905eb6ff918a87ec2eea05412bc27f4bd856e64736f6c63430008010033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER OR DUP1 DUP3 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND SWAP2 SWAP1 PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 SWAP1 DUP3 SWAP1 LOG3 PUSH2 0x1B0 DUP1 PUSH2 0x69 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 0x6E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x139 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x67 CALLDATASIZE PUSH1 0x4 PUSH2 0x10B JUMP JUMPDEST PUSH2 0x7D JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xB0 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA7 SWAP1 PUSH2 0x14D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND SWAP4 SWAP3 AND SWAP2 PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 SWAP2 LOG3 PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x11C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x132 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x13 SWAP1 DUP3 ADD MSTORE PUSH19 0x21B0B63632B91034B9903737BA1037BBB732B9 PUSH1 0x69 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP14 LOG1 SLOAD DUP4 DUP5 PUSH25 0x9AFF4990ABE9E44905EB6FF918A87EC2EEA05412BC27F4BD85 PUSH15 0x64736F6C6343000801003300000000 ",
"sourceMap": "121:1361:0:-:0;;;923:170;;;;;;;;;-1:-1:-1;947:5:0;:18;;-1:-1:-1;;;;;;947:18:0;955:10;947:18;;;;1059:27;;-1:-1:-1;;;;;1080:5:0;;;;;947;1059:27;;947:5;;1059:27;121:1361;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:878:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:236:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "139:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "147:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "105:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "114:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "101:3:1"
},
"nodeType": "YulFunctionCall",
"src": "101:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "126:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "97:3:1"
},
"nodeType": "YulFunctionCall",
"src": "97:32:1"
},
"nodeType": "YulIf",
"src": "94:2:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "165:36:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "191:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "178:12:1"
},
"nodeType": "YulFunctionCall",
"src": "178:23:1"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "169:5:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "264:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "273:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "281:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "266:6:1"
},
"nodeType": "YulFunctionCall",
"src": "266:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "223:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "234:5:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "249:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "254:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "245:3:1"
},
"nodeType": "YulFunctionCall",
"src": "245:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "258:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "241:3:1"
},
"nodeType": "YulFunctionCall",
"src": "241:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "230:3:1"
},
"nodeType": "YulFunctionCall",
"src": "230:31:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "220:2:1"
},
"nodeType": "YulFunctionCall",
"src": "220:42:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "213:6:1"
},
"nodeType": "YulFunctionCall",
"src": "213:50:1"
},
"nodeType": "YulIf",
"src": "210:2:1"
},
{
"nodeType": "YulAssignment",
"src": "299:15:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "309:5:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "299:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "50:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "61:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "73:6:1",
"type": ""
}
],
"src": "14:306:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "426:102:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "436:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "448:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "459:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "444:3:1"
},
"nodeType": "YulFunctionCall",
"src": "444:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "436:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "478:9:1"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "493:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "509:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "514:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "505:3:1"
},
"nodeType": "YulFunctionCall",
"src": "505:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "518:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "501:3:1"
},
"nodeType": "YulFunctionCall",
"src": "501:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "489:3:1"
},
"nodeType": "YulFunctionCall",
"src": "489:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "471:6:1"
},
"nodeType": "YulFunctionCall",
"src": "471:51:1"
},
"nodeType": "YulExpressionStatement",
"src": "471:51:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "395:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "406:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "417:4:1",
"type": ""
}
],
"src": "325:203:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "707:169:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "724:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "735:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "717:6:1"
},
"nodeType": "YulFunctionCall",
"src": "717:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "717:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "758:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "769:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "754:3:1"
},
"nodeType": "YulFunctionCall",
"src": "754:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "774:2:1",
"type": "",
"value": "19"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "747:6:1"
},
"nodeType": "YulFunctionCall",
"src": "747:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "747:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "797:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "808:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "793:3:1"
},
"nodeType": "YulFunctionCall",
"src": "793:18:1"
},
{
"kind": "string",
"nodeType": "YulLiteral",
"src": "813:21:1",
"type": "",
"value": "Caller is not owner"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "786:6:1"
},
"nodeType": "YulFunctionCall",
"src": "786:49:1"
},
"nodeType": "YulExpressionStatement",
"src": "786:49:1"
},
{
"nodeType": "YulAssignment",
"src": "844:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "856:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "867:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "852:3:1"
},
"nodeType": "YulFunctionCall",
"src": "852:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "844:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "684:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "698:4:1",
"type": ""
}
],
"src": "533:343:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(value0, value0) }\n value0 := value\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"Caller is not owner\")\n tail := add(headStart, 96)\n }\n}",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b61004361006e565b6040516100509190610139565b60405180910390f35b61006c61006736600461010b565b61007d565b005b6000546001600160a01b031690565b6000546001600160a01b031633146100b05760405162461bcd60e51b81526004016100a79061014d565b60405180910390fd5b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561011c578081fd5b81356001600160a01b0381168114610132578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60208082526013908201527221b0b63632b91034b9903737ba1037bbb732b960691b60408201526060019056fea26469706673582212208da1548384789aff4990abe9e44905eb6ff918a87ec2eea05412bc27f4bd856e64736f6c63430008010033",
"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 0x6E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x139 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x67 CALLDATASIZE PUSH1 0x4 PUSH2 0x10B JUMP JUMPDEST PUSH2 0x7D JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xB0 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA7 SWAP1 PUSH2 0x14D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND SWAP4 SWAP3 AND SWAP2 PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 SWAP2 LOG3 PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x11C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x132 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0x13 SWAP1 DUP3 ADD MSTORE PUSH19 0x21B0B63632B91034B9903737BA1037BBB732B9 PUSH1 0x69 SHL PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP14 LOG1 SLOAD DUP4 DUP5 PUSH25 0x9AFF4990ABE9E44905EB6FF918A87EC2EEA05412BC27F4BD85 PUSH15 0x64736F6C6343000801003300000000 ",
"sourceMap": "121:1361:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:81;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1184:127;;;;;;:::i;:::-;;:::i;:::-;;1399:81;1442:7;1468:5;-1:-1:-1;;;;;1468:5:0;1399:81;:::o;1184:127::-;807:5;;-1:-1:-1;;;;;807:5:0;793:10;:19;785:51;;;;-1:-1:-1;;;785:51:0;;;;;;;:::i;:::-;;;;;;;;;1262:5:::1;::::0;;1253:25:::1;::::0;-1:-1:-1;;;;;1253:25:0;;::::1;::::0;1262:5;::::1;::::0;1253:25:::1;::::0;::::1;1288:5;:16:::0;;-1:-1:-1;;;;;;1288:16:0::1;-1:-1:-1::0;;;;;1288:16:0;;;::::1;::::0;;;::::1;::::0;;1184:127::o;14:306:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;178:23;;-1:-1:-1;;;;;230:31:1;;220:42;;210:2;;281:6;273;266:22;210:2;309:5;84:236;-1:-1:-1;;;84:236:1:o;325:203::-;-1:-1:-1;;;;;489:32:1;;;;471:51;;459:2;444:18;;426:102::o;533:343::-;735:2;717:21;;;774:2;754:18;;;747:30;-1:-1:-1;;;808:2:1;793:18;;786:49;867:2;852:18;;707:169::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "86400",
"executionCost": "22524",
"totalCost": "108924"
},
"external": {
"changeOwner(address)": "24330",
"getOwner()": "1048"
}
},
"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.1+commit.df193b15"
},
"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": true,
"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": {
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b5060c38061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d146051575b600080fd5b603d6062565b604051604891906084565b60405180910390f35b6060605c366004606d565b6068565b005b60005490565b600055565b600060208284031215607d578081fd5b5035919050565b9081526020019056fea2646970667358221220c9edf0753ebb2592ddc4c6536325ad80c9b3d8b1a123d7ede7daf4127006681964736f6c63430008010033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xC3 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x62 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0x84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x5C CALLDATASIZE PUSH1 0x4 PUSH1 0x6D JUMP JUMPDEST PUSH1 0x68 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0x7D JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC9 0xED CREATE PUSH22 0x3EBB2592DDC4C6536325AD80C9B3D8B1A123D7EDE7DA DELEGATECALL SLT PUSH17 0x6681964736F6C63430008010033000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:388:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:120:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:26:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "139:6:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "147:6:1"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:22:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "105:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "114:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "101:3:1"
},
"nodeType": "YulFunctionCall",
"src": "101:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "126:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "97:3:1"
},
"nodeType": "YulFunctionCall",
"src": "97:32:1"
},
"nodeType": "YulIf",
"src": "94:2:1"
},
{
"nodeType": "YulAssignment",
"src": "165:33:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "188:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "175:12:1"
},
"nodeType": "YulFunctionCall",
"src": "175:23:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "165:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "50:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "61:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "73:6:1",
"type": ""
}
],
"src": "14:190:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "310:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "320:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "332:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "343:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "328:3:1"
},
"nodeType": "YulFunctionCall",
"src": "328:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "320:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "362:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "373:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "355:6:1"
},
"nodeType": "YulFunctionCall",
"src": "355:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "355:25:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "279:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "290:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "301:4:1",
"type": ""
}
],
"src": "209:177:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(value0, value0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n}",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d146051575b600080fd5b603d6062565b604051604891906084565b60405180910390f35b6060605c366004606d565b6068565b005b60005490565b600055565b600060208284031215607d578081fd5b5035919050565b9081526020019056fea2646970667358221220c9edf0753ebb2592ddc4c6536325ad80c9b3d8b1a123d7ede7daf4127006681964736f6c63430008010033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x62 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0x84 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x5C CALLDATASIZE PUSH1 0x4 PUSH1 0x6D JUMP JUMPDEST PUSH1 0x68 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0x7D JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC9 0xED CREATE PUSH22 0x3EBB2592DDC4C6536325AD80C9B3D8B1A123D7EDE7DA DELEGATECALL SLT PUSH17 0x6681964736F6C63430008010033000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;271:64;;;;;;:::i;:::-;;:::i;:::-;;416:79;457:7;482:6;416:79;:::o;271:64::-;316:6;:12;271:64::o;14:190:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;-1:-1:-1;175:23:1;;84:120;-1:-1:-1;84:120:1:o;209:177::-;355:25;;;343:2;328:18;;310:76::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "39000",
"executionCost": "93",
"totalCost": "39093"
},
"external": {
"retrieve()": "1006",
"store(uint256)": "20224"
}
},
"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.1+commit.df193b15"
},
"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": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
"license": "GPL-3.0",
"urls": [
"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1",
"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA"
]
}
},
"version": 1
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
// Import here the file to test.
// File name has to end with '_test.sol', this file can contain more than one testSuite contracts
contract testSuite {
/// 'beforeAll' runs before all other tests
/// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'
function beforeAll() public {
// Here should instantiate tested contract
Assert.equal(uint(1), uint(1), "1 should be equal to 1");
}
function checkSuccess() public {
// Use 'Assert' to test the contract,
// See documentation: https://remix-ide.readthedocs.io/en/latest/assert_library.html
Assert.equal(uint(2), uint(2), "2 should be equal to 2");
Assert.notEqual(uint(2), uint(3), "2 should not be equal to 3");
}
function checkSuccess2() public pure returns (bool) {
// Use the return value (true or false) to test the contract
return true;
}
function checkFailure() public {
Assert.equal(uint(1), uint(2), "1 is not equal to 2");
}
/// Custom Transaction Context
/// See more: https://remix-ide.readthedocs.io/en/latest/unittesting.html#customization
/// #sender: account-1
/// #value: 100
function checkSenderAndValue() public payable {
// account index varies 0-9, value is in wei
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "Invalid sender");
Assert.equal(msg.value, 100, "Invalid value");
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
// Import here the file to test.
// File name has to end with '_test.sol', this file can contain more than one testSuite contracts
contract testSuite {
/// 'beforeAll' runs before all other tests
/// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'
function beforeAll() public {
// Here should instantiate tested contract
Assert.equal(uint(1), uint(1), "1 should be equal to 1");
}
function checkSuccess() public {
// Use 'Assert' to test the contract,
// See documentation: https://remix-ide.readthedocs.io/en/latest/assert_library.html
Assert.equal(uint(2), uint(2), "2 should be equal to 2");
Assert.notEqual(uint(2), uint(3), "2 should not be equal to 3");
}
function checkSuccess2() public pure returns (bool) {
// Use the return value (true or false) to test the contract
return true;
}
function checkFailure() public {
Assert.equal(uint(1), uint(2), "1 is not equal to 2");
}
/// Custom Transaction Context
/// See more: https://remix-ide.readthedocs.io/en/latest/unittesting.html#customization
/// #sender: account-1
/// #value: 100
function checkSenderAndValue() public payable {
// account index varies 0-9, value is in wei
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "Invalid sender");
Assert.equal(msg.value, 100, "Invalid value");
}
}
{
"accounts": {
"account{0}": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
},
"linkReferences": {},
"transactions": [
{
"timestamp": 1619963782346,
"record": {
"value": "0",
"parameters": [],
"abi": "0xc360c586262124d3cd7ee973d0b20bbc3ed7e3ef25d4060ac86a84b209acd54a",
"contractName": "Owner",
"bytecode": "608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735908290a36101b0806100696000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae114610059575b600080fd5b61004361006e565b6040516100509190610139565b60405180910390f35b61006c61006736600461010b565b61007d565b005b6000546001600160a01b031690565b6000546001600160a01b031633146100b05760405162461bcd60e51b81526004016100a79061014d565b60405180910390fd5b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561011c578081fd5b81356001600160a01b0381168114610132578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60208082526013908201527221b0b63632b91034b9903737ba1037bbb732b960691b60408201526060019056fea26469706673582212208da1548384789aff4990abe9e44905eb6ff918a87ec2eea05412bc27f4bd856e64736f6c63430008010033",
"linkReferences": {},
"name": "",
"inputs": "()",
"type": "constructor",
"from": "account{0}"
}
}
],
"abis": {
"0xc360c586262124d3cd7ee973d0b20bbc3ed7e3ef25d4060ac86a84b209acd54a": [
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "changeOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"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": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
}
// 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;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
// Import here the file to test.
// File name has to end with '_test.sol', this file can contain more than one testSuite contracts
contract testSuite {
/// 'beforeAll' runs before all other tests
/// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'
function beforeAll() public {
// Here should instantiate tested contract
Assert.equal(uint(1), uint(1), "1 should be equal to 1");
}
function checkSuccess() public {
// Use 'Assert' to test the contract,
// See documentation: https://remix-ide.readthedocs.io/en/latest/assert_library.html
Assert.equal(uint(2), uint(2), "2 should be equal to 2");
Assert.notEqual(uint(2), uint(3), "2 should not be equal to 3");
}
function checkSuccess2() public pure returns (bool) {
// Use the return value (true or false) to test the contract
return true;
}
function checkFailure() public {
Assert.equal(uint(1), uint(2), "1 is not equal to 2");
}
/// Custom Transaction Context
/// See more: https://remix-ide.readthedocs.io/en/latest/unittesting.html#customization
/// #sender: account-1
/// #value: 100
function checkSenderAndValue() public payable {
// account index varies 0-9, value is in wei
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "Invalid sender");
Assert.equal(msg.value, 100, "Invalid value");
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
import "./newFile_test.sol";
// File name has to end with '_test.sol', this file can contain more than one testSuite contracts
contract testSuite {
/// 'beforeAll' runs before all other tests
/// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'
function beforeAll() public {
// Here should instantiate tested contract
Assert.equal(uint(1), uint(1), "1 should be equal to 1");
}
function checkSuccess() public {
// Use 'Assert' to test the contract,
// See documentation: https://remix-ide.readthedocs.io/en/latest/assert_library.html
Assert.equal(uint(2), uint(2), "2 should be equal to 2");
Assert.notEqual(uint(2), uint(3), "2 should not be equal to 3");
}
function checkSuccess2() public pure returns (bool) {
// Use the return value (true or false) to test the contract
return true;
}
function checkFailure() public {
Assert.equal(uint(1), uint(2), "1 is not equal to 2");
}
/// Custom Transaction Context
/// See more: https://remix-ide.readthedocs.io/en/latest/unittesting.html#customization
/// #sender: account-1
/// #value: 100
function checkSenderAndValue() public payable {
// account index varies 0-9, value is in wei
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "Invalid sender");
Assert.equal(msg.value, 100, "Invalid value");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment