Skip to content

Instantly share code, notes, and snippets.

@sandywall26
Created October 15, 2021 11:18
Show Gist options
  • Save sandywall26/8bf4202cee12b9fbf3a956a0b3970629 to your computer and use it in GitHub Desktop.
Save sandywall26/8bf4202cee12b9fbf3a956a0b3970629 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=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": {
"functionDebugData": {
"@_71": {
"entryPoint": null,
"id": 71,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_tuple_t_array$_t_bytes32_$dyn_memory_ptr_fromMemory": {
"entryPoint": 204,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"increment_t_uint256": {
"entryPoint": 400,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"panic_error_0x32": {
"entryPoint": 441,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 463,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1633:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "120:1010: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:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "196:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "199:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "189:6:1"
},
"nodeType": "YulFunctionCall",
"src": "189:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "189:12: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:52:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "212:30:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "232:9:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "226:5:1"
},
"nodeType": "YulFunctionCall",
"src": "226:16:1"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "216:6:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "251:28:1",
"value": {
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "269:2:1",
"type": "",
"value": "64"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "273:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "265:3:1"
},
"nodeType": "YulFunctionCall",
"src": "265:10:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "277:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "261:3:1"
},
"nodeType": "YulFunctionCall",
"src": "261:18:1"
},
"variables": [
{
"name": "_2",
"nodeType": "YulTypedName",
"src": "255:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "306:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "315:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "318:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "308:6:1"
},
"nodeType": "YulFunctionCall",
"src": "308:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "308:12:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "294:6:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "302:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "291:2:1"
},
"nodeType": "YulFunctionCall",
"src": "291:14:1"
},
"nodeType": "YulIf",
"src": "288:34:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "331:32:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "345:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "356:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "341:3:1"
},
"nodeType": "YulFunctionCall",
"src": "341:22:1"
},
"variables": [
{
"name": "_3",
"nodeType": "YulTypedName",
"src": "335:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "411:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "420:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "423:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "413:6:1"
},
"nodeType": "YulFunctionCall",
"src": "413:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "413:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "390:2:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "394:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "386:3:1"
},
"nodeType": "YulFunctionCall",
"src": "386:13:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "401:7:1"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "382:3:1"
},
"nodeType": "YulFunctionCall",
"src": "382:27:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "375:6:1"
},
"nodeType": "YulFunctionCall",
"src": "375:35:1"
},
"nodeType": "YulIf",
"src": "372:55:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "436:19:1",
"value": {
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "452:2:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "446:5:1"
},
"nodeType": "YulFunctionCall",
"src": "446:9:1"
},
"variables": [
{
"name": "_4",
"nodeType": "YulTypedName",
"src": "440:2:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "478:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "480:16:1"
},
"nodeType": "YulFunctionCall",
"src": "480:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "480:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "470:2:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "474:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "467:2:1"
},
"nodeType": "YulFunctionCall",
"src": "467:10:1"
},
"nodeType": "YulIf",
"src": "464:36:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "509:20:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "523:1:1",
"type": "",
"value": "5"
},
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "526:2:1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "519:3:1"
},
"nodeType": "YulFunctionCall",
"src": "519:10:1"
},
"variables": [
{
"name": "_5",
"nodeType": "YulTypedName",
"src": "513:2:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "538:23:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "558:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "552:5:1"
},
"nodeType": "YulFunctionCall",
"src": "552:9:1"
},
"variables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "542:6:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "570:56:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "592:6:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "_5",
"nodeType": "YulIdentifier",
"src": "608:2:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "612:2:1",
"type": "",
"value": "63"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "604:3:1"
},
"nodeType": "YulFunctionCall",
"src": "604:11:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "621:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "617:3:1"
},
"nodeType": "YulFunctionCall",
"src": "617:7:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "600:3:1"
},
"nodeType": "YulFunctionCall",
"src": "600:25:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "588:3:1"
},
"nodeType": "YulFunctionCall",
"src": "588:38:1"
},
"variables": [
{
"name": "newFreePtr",
"nodeType": "YulTypedName",
"src": "574:10:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "685:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "687:16:1"
},
"nodeType": "YulFunctionCall",
"src": "687:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "687:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "644:10:1"
},
{
"name": "_2",
"nodeType": "YulIdentifier",
"src": "656:2:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "641:2:1"
},
"nodeType": "YulFunctionCall",
"src": "641:18:1"
},
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "664:10:1"
},
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "676:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "661:2:1"
},
"nodeType": "YulFunctionCall",
"src": "661:22:1"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "638:2:1"
},
"nodeType": "YulFunctionCall",
"src": "638:46:1"
},
"nodeType": "YulIf",
"src": "635:72:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "723:2:1",
"type": "",
"value": "64"
},
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "727:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "716:6:1"
},
"nodeType": "YulFunctionCall",
"src": "716:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "716:22:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "747:17:1",
"value": {
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "758:6:1"
},
"variables": [
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "751:3:1",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "780:6:1"
},
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "788:2:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "773:6:1"
},
"nodeType": "YulFunctionCall",
"src": "773:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "773:18:1"
},
{
"nodeType": "YulAssignment",
"src": "800:22:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "811:6:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "819:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "807:3:1"
},
"nodeType": "YulFunctionCall",
"src": "807:15:1"
},
"variableNames": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "800:3:1"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "831:22:1",
"value": {
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "846:2:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "850:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "842:3:1"
},
"nodeType": "YulFunctionCall",
"src": "842:11:1"
},
"variables": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "835:3:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "899:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "908:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "911:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "901:6:1"
},
"nodeType": "YulFunctionCall",
"src": "901:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "901:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_3",
"nodeType": "YulIdentifier",
"src": "876:2:1"
},
{
"name": "_5",
"nodeType": "YulIdentifier",
"src": "880:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "872:3:1"
},
"nodeType": "YulFunctionCall",
"src": "872:11:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "885:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "868:3:1"
},
"nodeType": "YulFunctionCall",
"src": "868:20:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "890:7:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "865:2:1"
},
"nodeType": "YulFunctionCall",
"src": "865:33:1"
},
"nodeType": "YulIf",
"src": "862:53:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "924:10:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "933:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "928:1:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "988:111:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1009:3:1"
},
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1020:3:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1014:5:1"
},
"nodeType": "YulFunctionCall",
"src": "1014:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1002:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1002:23:1"
},
"nodeType": "YulExpressionStatement",
"src": "1002:23:1"
},
{
"nodeType": "YulAssignment",
"src": "1038:19:1",
"value": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1049:3:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "1054:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1045:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1045:12:1"
},
"variableNames": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "1038:3:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "1070:19:1",
"value": {
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1081:3:1"
},
{
"name": "_1",
"nodeType": "YulIdentifier",
"src": "1086:2:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1077:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1077:12:1"
},
"variableNames": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "1070:3:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "954:1:1"
},
{
"name": "_4",
"nodeType": "YulIdentifier",
"src": "957:2:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "951:2:1"
},
"nodeType": "YulFunctionCall",
"src": "951:9:1"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "961:18:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "963:14:1",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "972:1:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "975:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "968:3:1"
},
"nodeType": "YulFunctionCall",
"src": "968:9:1"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "963:1:1"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "947:3:1",
"statements": []
},
"src": "943:156:1"
},
{
"nodeType": "YulAssignment",
"src": "1108:16:1",
"value": {
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "1118:6:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1108: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:1116:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1182:185:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1221:111:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1242:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1249:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1254:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1245:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1245:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1235:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1235:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "1235:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1286:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1289:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1279:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1279:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1279:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1314:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1317:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1307:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1307:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1307:15:1"
}
]
},
"condition": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1198:5:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1209:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "1205:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1205:6:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1195:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1195:17:1"
},
"nodeType": "YulIf",
"src": "1192:140:1"
},
{
"nodeType": "YulAssignment",
"src": "1341:20:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1352:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1359:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1348:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1348:13:1"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "1341:3:1"
}
]
}
]
},
"name": "increment_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1164:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "1174:3:1",
"type": ""
}
],
"src": "1135:232:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1404:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1421:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1428:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1433:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1424:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1424:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1414:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1414:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "1414:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1461:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1464:4:1",
"type": "",
"value": "0x32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1454:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1454:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1454:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1485:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1488:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1478:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1478:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1478:15:1"
}
]
},
"name": "panic_error_0x32",
"nodeType": "YulFunctionDefinition",
"src": "1372:127:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1536:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1553:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1560:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1565:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1556:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1556:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1546:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1546:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "1546:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1593:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1596:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1586:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1586:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1586:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1617:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1620:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1610:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1610:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1610:15:1"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "1504: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(0, 0) }\n let offset := mload(headStart)\n let _2 := sub(shl(64, 1), 1)\n if gt(offset, _2) { revert(0, 0) }\n let _3 := add(headStart, offset)\n if iszero(slt(add(_3, 0x1f), dataEnd)) { revert(0, 0) }\n let _4 := mload(_3)\n if gt(_4, _2) { panic_error_0x41() }\n let _5 := shl(5, _4)\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(0, 0) }\n let i := 0\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(0, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n ret := add(value, 1)\n }\n function panic_error_0x32()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x32)\n revert(0, 0x24)\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": "608060405234801561001057600080fd5b5060405161096d38038061096d83398101604081905261002f916100cc565b600080546001600160a01b03191633908117825581526001602081905260408220555b81518110156100c5576002604051806040016040528084848151811061007a5761007a6101b9565b602090810291909101810151825260009181018290528354600181810186559483529181902083516002909302019182559190910151910155806100bd81610190565b915050610052565b50506101e5565b600060208083850312156100df57600080fd5b82516001600160401b03808211156100f657600080fd5b818501915085601f83011261010a57600080fd5b81518181111561011c5761011c6101cf565b8060051b604051601f19603f83011681018181108582111715610141576101416101cf565b604052828152858101935084860182860187018a101561016057600080fd5b600095505b83861015610183578051855260019590950194938601938601610165565b5098975050505050505050565b60006000198214156101b257634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b610779806101f46000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd1461010d5780639e7b8d6114610123578063a3ec138d14610136578063e2ba53f0146101a757600080fd5b80630121b93f1461008d578063013cf08b146100a25780632e4176cf146100cf5780635c19a95c146100fa575b600080fd5b6100a061009b3660046106cb565b6101af565b005b6100b56100b03660046106cb565b6102a6565b604080519283526020830191909152015b60405180910390f35b6000546100e2906001600160a01b031681565b6040516001600160a01b0390911681526020016100c6565b6100a061010836600461069b565b6102d4565b6101156104d3565b6040519081526020016100c6565b6100a061013136600461069b565b610550565b61017861014436600461069b565b600160208190526000918252604090912080549181015460029091015460ff82169161010090046001600160a01b03169084565b6040516100c6949392919093845291151560208401526001600160a01b03166040830152606082015260800190565b610115610668565b33600090815260016020526040902080546102085760405162461bcd60e51b8152602060048201526014602482015273486173206e6f20726967687420746f20766f746560601b60448201526064015b60405180910390fd5b600181015460ff161561024e5760405162461bcd60e51b815260206004820152600e60248201526d20b63932b0b23c903b37ba32b21760911b60448201526064016101ff565b6001818101805460ff191690911790556002808201839055815481549091908490811061027d5761027d61072d565b9060005260206000209060020201600101600082825461029d91906106e4565b90915550505050565b600281815481106102b657600080fd5b60009182526020909120600290910201805460019091015490915082565b3360009081526001602081905260409091209081015460ff161561032f5760405162461bcd60e51b81526020600482015260126024820152712cb7ba9030b63932b0b23c903b37ba32b21760711b60448201526064016101ff565b6001600160a01b0382163314156103885760405162461bcd60e51b815260206004820152601e60248201527f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e000060448201526064016101ff565b6001600160a01b03828116600090815260016020819052604090912001546101009004161561042d576001600160a01b0391821660009081526001602081905260409091200154610100900490911690338214156104285760405162461bcd60e51b815260206004820152601960248201527f466f756e64206c6f6f7020696e2064656c65676174696f6e2e0000000000000060448201526064016101ff565b610388565b600181810180546001600160a81b0319166101006001600160a01b03861690810291909117831790915560009081526020829052604090209081015460ff16156104b4578154600282810154815481106104895761048961072d565b906000526020600020906002020160010160008282546104a991906106e4565b909155506104ce9050565b8154815482906000906104c89084906106e4565b90915550505b505050565b600080805b60025481101561054b5781600282815481106104f6576104f661072d565b906000526020600020906002020160010154111561053957600281815481106105215761052161072d565b90600052602060002090600202016001015491508092505b80610543816106fc565b9150506104d8565b505090565b6000546001600160a01b031633146105bb5760405162461bcd60e51b815260206004820152602860248201527f4f6e6c79206368616972706572736f6e2063616e2067697665207269676874206044820152673a37903b37ba329760c11b60648201526084016101ff565b6001600160a01b0381166000908152600160208190526040909120015460ff16156106285760405162461bcd60e51b815260206004820152601860248201527f54686520766f74657220616c726561647920766f7465642e000000000000000060448201526064016101ff565b6001600160a01b0381166000908152600160205260409020541561064b57600080fd5b6001600160a01b0316600090815260016020819052604090912055565b600060026106746104d3565b815481106106845761068461072d565b906000526020600020906002020160000154905090565b6000602082840312156106ad57600080fd5b81356001600160a01b03811681146106c457600080fd5b9392505050565b6000602082840312156106dd57600080fd5b5035919050565b600082198211156106f7576106f7610717565b500190565b600060001982141561071057610710610717565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220db31f7ee9972f79116f430753197082b191101114740c5a378f9fdb1564d858e64736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x96D CODESIZE SUB DUP1 PUSH2 0x96D DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0xCC JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND CALLER SWAP1 DUP2 OR DUP3 SSTORE DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 KECCAK256 SSTORE JUMPDEST DUP2 MLOAD DUP2 LT ISZERO PUSH2 0xC5 JUMPI PUSH1 0x2 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 DUP5 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x7A JUMPI PUSH2 0x7A PUSH2 0x1B9 JUMP 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 0xBD DUP2 PUSH2 0x190 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x52 JUMP JUMPDEST POP POP PUSH2 0x1E5 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xDF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0xF6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x10A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD DUP2 DUP2 GT ISZERO PUSH2 0x11C JUMPI PUSH2 0x11C PUSH2 0x1CF JUMP JUMPDEST DUP1 PUSH1 0x5 SHL PUSH1 0x40 MLOAD PUSH1 0x1F NOT PUSH1 0x3F DUP4 ADD AND DUP2 ADD DUP2 DUP2 LT DUP6 DUP3 GT OR ISZERO PUSH2 0x141 JUMPI PUSH2 0x141 PUSH2 0x1CF 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 0x160 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x183 JUMPI DUP1 MLOAD DUP6 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP7 ADD SWAP4 DUP7 ADD PUSH2 0x165 JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x1B2 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x779 DUP1 PUSH2 0x1F4 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 0x10D JUMPI DUP1 PUSH4 0x9E7B8D61 EQ PUSH2 0x123 JUMPI DUP1 PUSH4 0xA3EC138D EQ PUSH2 0x136 JUMPI DUP1 PUSH4 0xE2BA53F0 EQ PUSH2 0x1A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x121B93F EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x13CF08B EQ PUSH2 0xA2 JUMPI DUP1 PUSH4 0x2E4176CF EQ PUSH2 0xCF JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0xFA JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA0 PUSH2 0x9B CALLDATASIZE PUSH1 0x4 PUSH2 0x6CB JUMP JUMPDEST PUSH2 0x1AF JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0xB0 CALLDATASIZE PUSH1 0x4 PUSH2 0x6CB JUMP JUMPDEST PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD PUSH2 0xE2 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x108 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B JUMP JUMPDEST PUSH2 0x2D4 JUMP JUMPDEST PUSH2 0x115 PUSH2 0x4D3 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x131 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B JUMP JUMPDEST PUSH2 0x550 JUMP JUMPDEST PUSH2 0x178 PUSH2 0x144 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B 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 0x40 MLOAD PUSH2 0xC6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 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 PUSH2 0x115 PUSH2 0x668 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x208 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x486173206E6F20726967687420746F20766F7465 PUSH1 0x60 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x24E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xE PUSH1 0x24 DUP3 ADD MSTORE PUSH14 0x20B63932B0B23C903B37BA32B217 PUSH1 0x91 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x27D JUMPI PUSH2 0x27D PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x29D SWAP2 SWAP1 PUSH2 0x6E4 JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x2B6 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 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 0x32F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH18 0x2CB7BA9030B63932B0B23C903B37BA32B217 PUSH1 0x71 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ ISZERO PUSH2 0x388 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1E PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x53656C662D64656C65676174696F6E20697320646973616C6C6F7765642E0000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x42D 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 0x428 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x19 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x466F756E64206C6F6F7020696E2064656C65676174696F6E2E00000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF JUMP JUMPDEST PUSH2 0x388 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0x1 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 DUP4 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 0x4B4 JUMPI DUP2 SLOAD PUSH1 0x2 DUP3 DUP2 ADD SLOAD DUP2 SLOAD DUP2 LT PUSH2 0x489 JUMPI PUSH2 0x489 PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x4A9 SWAP2 SWAP1 PUSH2 0x6E4 JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP PUSH2 0x4CE SWAP1 POP JUMP JUMPDEST DUP2 SLOAD DUP2 SLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x4C8 SWAP1 DUP5 SWAP1 PUSH2 0x6E4 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 0x54B JUMPI DUP2 PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x4F6 JUMPI PUSH2 0x4F6 PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD GT ISZERO PUSH2 0x539 JUMPI PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x521 JUMPI PUSH2 0x521 PUSH2 0x72D JUMP 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 0x543 DUP2 PUSH2 0x6FC JUMP JUMPDEST SWAP2 POP POP PUSH2 0x4D8 JUMP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x5BB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F6E6C79206368616972706572736F6E2063616E206769766520726967687420 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x3A37903B37BA3297 PUSH1 0xC1 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x1FF 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 0x628 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54686520766F74657220616C726561647920766F7465642E0000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x64B 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 0x0 PUSH1 0x2 PUSH2 0x674 PUSH2 0x4D3 JUMP JUMPDEST DUP2 SLOAD DUP2 LT PUSH2 0x684 JUMPI PUSH2 0x684 PUSH2 0x72D JUMP 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 0x6AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x6C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 NOT DUP3 GT ISZERO PUSH2 0x6F7 JUMPI PUSH2 0x6F7 PUSH2 0x717 JUMP JUMPDEST POP ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x710 JUMPI PUSH2 0x710 PUSH2 0x717 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 JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xDB BALANCE 0xF7 0xEE SWAP10 PUSH19 0xF79116F430753197082B191101114740C5A378 0xF9 REVERT 0xB1 JUMP 0x4D DUP6 DUP15 PUSH5 0x736F6C6343 STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "157:4362:0:-:0;;;958:481;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1012:11;:24;;-1:-1:-1;;;;;;1012:24:0;1026:10;1012:24;;;;;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;;;;;;;;:::i;:::-;;;;;;;;;;;;1327:94;;1405:1;1327:94;;;;;;1312:110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1130:3;;;;:::i;:::-;;;;1087:346;;;;958:481;157:4362;;14:1116:1;109:6;140:2;183;171:9;162:7;158:23;154:32;151:52;;;199:1;196;189:12;151:52;226:16;;-1:-1:-1;;;;;291:14:1;;;288:34;;;318:1;315;308:12;288:34;356:6;345:9;341:22;331:32;;401:7;394:4;390:2;386:13;382:27;372:55;;423:1;420;413:12;372:55;452:2;446:9;474:2;470;467:10;464:36;;;480:18;;:::i;:::-;526:2;523:1;519:10;558:2;552:9;621:2;617:7;612:2;608;604:11;600:25;592:6;588:38;676:6;664:10;661:22;656:2;644:10;641:18;638:46;635:72;;;687:18;;:::i;:::-;723:2;716:22;773:18;;;807:15;;;;-1:-1:-1;842:11:1;;;872;;;868:20;;865:33;-1:-1:-1;862:53:1;;;911:1;908;901:12;862:53;933:1;924:10;;943:156;957:2;954:1;951:9;943:156;;;1014:10;;1002:23;;975:1;968:9;;;;;1045:12;;;;1077;;943:156;;;-1:-1:-1;1118:6:1;14:1116;-1:-1:-1;;;;;;;;14:1116:1:o;1135:232::-;1174:3;-1:-1:-1;;1195:17:1;;1192:140;;;1254:10;1249:3;1245:20;1242:1;1235:31;1289:4;1286:1;1279:15;1317:4;1314:1;1307:15;1192:140;-1:-1:-1;1359:1:1;1348:13;;1135:232::o;1372:127::-;1433:10;1428:3;1424:20;1421:1;1414:31;1464:4;1461:1;1454:15;1488:4;1485:1;1478:15;1504:127;1565:10;1560:3;1556:20;1553:1;1546:31;1596:4;1593:1;1586:15;1620:4;1617:1;1610:15;1504:127;157:4362:0;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@chairperson_18": {
"entryPoint": null,
"id": 18,
"parameterSlots": 0,
"returnSlots": 0
},
"@delegate_207": {
"entryPoint": 724,
"id": 207,
"parameterSlots": 1,
"returnSlots": 0
},
"@giveRightToVote_111": {
"entryPoint": 1360,
"id": 111,
"parameterSlots": 1,
"returnSlots": 0
},
"@proposals_27": {
"entryPoint": 678,
"id": 27,
"parameterSlots": 0,
"returnSlots": 0
},
"@vote_257": {
"entryPoint": 431,
"id": 257,
"parameterSlots": 1,
"returnSlots": 0
},
"@voters_23": {
"entryPoint": null,
"id": 23,
"parameterSlots": 0,
"returnSlots": 0
},
"@winnerName_315": {
"entryPoint": 1640,
"id": 315,
"parameterSlots": 0,
"returnSlots": 1
},
"@winningProposal_300": {
"entryPoint": 1235,
"id": 300,
"parameterSlots": 0,
"returnSlots": 1
},
"abi_decode_tuple_t_address": {
"entryPoint": 1691,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 1739,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_bytes32_t_uint256__to_t_bytes32_t_uint256__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_0dc527e8fa9b76c996eb5eda9ddb749b21540f5509781b94e1e37f7027e7f50e__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_56aab92b7164a4ea72a098d2d95a5e763b71d07f265e8d46fc7240404017fa84__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_657c6119c4ed567c60278fba62242b17c2fedf38962e651040dabfb3c9e15a5f__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_80126ce3251ab2b6e4ade14fe5b2bc11f593510cbe9e3550c09bff1989e33b95__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_8bd75322489f7ff7ab0b18506f4dcde935a32eca2a506b00f4d21b0becfa093c__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_d39b1db28626750c546703ffb72f30ea3facdfed1bebd47408e22ef18a76ba2d__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_f37bf1aca80f8fa291a40f639db6aeaa1425ceb0e8c61c8648f0e2efa282a947__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256_t_bool_t_address_t_uint256__to_t_uint256_t_bool_t_address_t_uint256__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 5,
"returnSlots": 1
},
"checked_add_t_uint256": {
"entryPoint": 1764,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"increment_t_uint256": {
"entryPoint": 1788,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"panic_error_0x11": {
"entryPoint": 1815,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x32": {
"entryPoint": 1837,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4795:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:216:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "139:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "142:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:12: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:52:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "155:36:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "181:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "168:12:1"
},
"nodeType": "YulFunctionCall",
"src": "168:23:1"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "159:5:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "254:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "263:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "266:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "256:6:1"
},
"nodeType": "YulFunctionCall",
"src": "256:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "256:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "213:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "224:5:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "239:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "244:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "248:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "220:3:1"
},
"nodeType": "YulFunctionCall",
"src": "220:31:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "210:2:1"
},
"nodeType": "YulFunctionCall",
"src": "210:42:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "203:6:1"
},
"nodeType": "YulFunctionCall",
"src": "203:50:1"
},
"nodeType": "YulIf",
"src": "200:70:1"
},
{
"nodeType": "YulAssignment",
"src": "279:15:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "289:5:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "279: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:286:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "375:110:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "421:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "430:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "433:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "423:6:1"
},
"nodeType": "YulFunctionCall",
"src": "423:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "423:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "396:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "405:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "392:3:1"
},
"nodeType": "YulFunctionCall",
"src": "392:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "417:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "388:3:1"
},
"nodeType": "YulFunctionCall",
"src": "388:32:1"
},
"nodeType": "YulIf",
"src": "385:52:1"
},
{
"nodeType": "YulAssignment",
"src": "446:33:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "469:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "456:12:1"
},
"nodeType": "YulFunctionCall",
"src": "456:23:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "446:6:1"
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "341:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "352:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "364:6:1",
"type": ""
}
],
"src": "305:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "591:102:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "601:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "613:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "624:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "609:3:1"
},
"nodeType": "YulFunctionCall",
"src": "609:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "601:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "643:9:1"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "658:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "674:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "679:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "670:3:1"
},
"nodeType": "YulFunctionCall",
"src": "670:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "683:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "666:3:1"
},
"nodeType": "YulFunctionCall",
"src": "666:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "654:3:1"
},
"nodeType": "YulFunctionCall",
"src": "654:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "636:6:1"
},
"nodeType": "YulFunctionCall",
"src": "636:51:1"
},
"nodeType": "YulExpressionStatement",
"src": "636:51:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "560:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "571:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "582:4:1",
"type": ""
}
],
"src": "490:203:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "799:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "809:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "821:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "832:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "817:3:1"
},
"nodeType": "YulFunctionCall",
"src": "817:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "809:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "851:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "862:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "844:6:1"
},
"nodeType": "YulFunctionCall",
"src": "844:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "844:25:1"
}
]
},
"name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "768:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "779:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "790:4:1",
"type": ""
}
],
"src": "698:177:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1009:119:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1019:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1031:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1042:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1027:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1027:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1019:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1061:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1072:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1054:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1054:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "1054:25:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1099:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1110:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1095:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1095:18:1"
},
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1115:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1088:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1088:34:1"
},
"nodeType": "YulExpressionStatement",
"src": "1088: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": "970:9:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "981:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "989:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1000:4:1",
"type": ""
}
],
"src": "880:248:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1307:170:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1324:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1335:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1317:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1317:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "1317:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1358:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1369:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1354:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1354:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1374:2:1",
"type": "",
"value": "20"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1347:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1347:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "1347:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1397:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1408:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1393:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1393:18:1"
},
{
"hexValue": "486173206e6f20726967687420746f20766f7465",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1413:22:1",
"type": "",
"value": "Has no right to vote"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1386:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1386:50:1"
},
"nodeType": "YulExpressionStatement",
"src": "1386:50:1"
},
{
"nodeType": "YulAssignment",
"src": "1445:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1457:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1468:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1453:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1453:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1445:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_0dc527e8fa9b76c996eb5eda9ddb749b21540f5509781b94e1e37f7027e7f50e__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1284:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1298:4:1",
"type": ""
}
],
"src": "1133:344:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1656:164:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1673:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1684:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1666:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1666:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "1666:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1707:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1718:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1703:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1703:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1723:2:1",
"type": "",
"value": "14"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1696:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1696:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "1696:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1746:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1757:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1742:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1742:18:1"
},
{
"hexValue": "416c726561647920766f7465642e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1762:16:1",
"type": "",
"value": "Already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1735:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1735:44:1"
},
"nodeType": "YulExpressionStatement",
"src": "1735:44:1"
},
{
"nodeType": "YulAssignment",
"src": "1788:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1800:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1811:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1796:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1796:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1788:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_56aab92b7164a4ea72a098d2d95a5e763b71d07f265e8d46fc7240404017fa84__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1633:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1647:4:1",
"type": ""
}
],
"src": "1482:338:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1999:168:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2016:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2027:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2009:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2009:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2009:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2050:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2061:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2046:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2046:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2066:2:1",
"type": "",
"value": "18"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2039:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2039:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2039:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2089:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2100:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2085:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2085:18:1"
},
{
"hexValue": "596f7520616c726561647920766f7465642e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2105:20:1",
"type": "",
"value": "You already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2078:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2078:48:1"
},
"nodeType": "YulExpressionStatement",
"src": "2078:48:1"
},
{
"nodeType": "YulAssignment",
"src": "2135:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2147:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2158:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2143:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2143:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2135:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_657c6119c4ed567c60278fba62242b17c2fedf38962e651040dabfb3c9e15a5f__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1976:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1990:4:1",
"type": ""
}
],
"src": "1825:342:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2346:230:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2363:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2374:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2356:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2356:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2356:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2397:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2408:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2393:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2393:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2413:2:1",
"type": "",
"value": "40"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2386:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2386:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2386:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2436:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2447:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2432:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2432:18:1"
},
{
"hexValue": "4f6e6c79206368616972706572736f6e2063616e206769766520726967687420",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2452:34:1",
"type": "",
"value": "Only chairperson can give right "
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2425:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2425:62:1"
},
"nodeType": "YulExpressionStatement",
"src": "2425:62:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2507:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2518:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2503:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2503:18:1"
},
{
"hexValue": "746f20766f74652e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2523:10:1",
"type": "",
"value": "to vote."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2496:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2496:38:1"
},
"nodeType": "YulExpressionStatement",
"src": "2496:38:1"
},
{
"nodeType": "YulAssignment",
"src": "2543:27:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2555:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2566:3:1",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2551:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2551:19:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2543:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_80126ce3251ab2b6e4ade14fe5b2bc11f593510cbe9e3550c09bff1989e33b95__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2323:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2337:4:1",
"type": ""
}
],
"src": "2172:404:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2755:175:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2772:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2783:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2765:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2765:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "2765:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2806:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2817:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2802:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2802:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2822:2:1",
"type": "",
"value": "25"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2795:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2795:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2795:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2845:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2856:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2841:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2841:18:1"
},
{
"hexValue": "466f756e64206c6f6f7020696e2064656c65676174696f6e2e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2861:27:1",
"type": "",
"value": "Found loop in delegation."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2834:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2834:55:1"
},
"nodeType": "YulExpressionStatement",
"src": "2834:55:1"
},
{
"nodeType": "YulAssignment",
"src": "2898:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2910:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2921:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2906:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2906:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2898:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_8bd75322489f7ff7ab0b18506f4dcde935a32eca2a506b00f4d21b0becfa093c__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2732:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2746:4:1",
"type": ""
}
],
"src": "2581:349:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3109:174:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3126:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3137:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3119:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3119:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "3119:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3160:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3171:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3156:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3156:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3176:2:1",
"type": "",
"value": "24"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3149:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3149:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "3149:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3199:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3210:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3195:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3195:18:1"
},
{
"hexValue": "54686520766f74657220616c726561647920766f7465642e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "3215:26:1",
"type": "",
"value": "The voter already voted."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3188:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3188:54:1"
},
"nodeType": "YulExpressionStatement",
"src": "3188:54:1"
},
{
"nodeType": "YulAssignment",
"src": "3251:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3263:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3274:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3259:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3259:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3251:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_d39b1db28626750c546703ffb72f30ea3facdfed1bebd47408e22ef18a76ba2d__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3086:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3100:4:1",
"type": ""
}
],
"src": "2935:348:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3462:180:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3479:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3490:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3472:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3472:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "3472:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3513:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3524:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3509:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3509:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3529:2:1",
"type": "",
"value": "30"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3502:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3502:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "3502:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3552:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3563:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3548:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3548:18:1"
},
{
"hexValue": "53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e",
"kind": "string",
"nodeType": "YulLiteral",
"src": "3568:32:1",
"type": "",
"value": "Self-delegation is disallowed."
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3541:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3541:60:1"
},
"nodeType": "YulExpressionStatement",
"src": "3541:60:1"
},
{
"nodeType": "YulAssignment",
"src": "3610:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3622:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3633:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3618:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3618:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3610:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_f37bf1aca80f8fa291a40f639db6aeaa1425ceb0e8c61c8648f0e2efa282a947__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3439:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3453:4:1",
"type": ""
}
],
"src": "3288:354:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3748:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3758:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3770:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3781:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3766:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3766:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "3758:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "3800:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "3811:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3793:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3793:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "3793:25:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3717:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "3728:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3739:4:1",
"type": ""
}
],
"src": "3647:177:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4008:248:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4018:27:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4030:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4041:3:1",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4026:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4026:19:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4018:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4061:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "4072:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4054:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4054:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "4054:25:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4099:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4110:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4095:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4095:18:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "4129:6:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "4122:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4122:14:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "4115:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4115:22:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4088:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4088:50:1"
},
"nodeType": "YulExpressionStatement",
"src": "4088:50:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4158:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4169:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4154:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4154:18:1"
},
{
"arguments": [
{
"name": "value2",
"nodeType": "YulIdentifier",
"src": "4178:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4194:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4199:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4190:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4190:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4203:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "4186:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4186:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "4174:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4174:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4147:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4147:60:1"
},
"nodeType": "YulExpressionStatement",
"src": "4147:60:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4227:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4238:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4223:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4223:18:1"
},
{
"name": "value3",
"nodeType": "YulIdentifier",
"src": "4243:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4216:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4216:34:1"
},
"nodeType": "YulExpressionStatement",
"src": "4216: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": "3953:9:1",
"type": ""
},
{
"name": "value3",
"nodeType": "YulTypedName",
"src": "3964:6:1",
"type": ""
},
{
"name": "value2",
"nodeType": "YulTypedName",
"src": "3972:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "3980:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "3988:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "3999:4:1",
"type": ""
}
],
"src": "3829:427:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4309:80:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4336:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "4338:16:1"
},
"nodeType": "YulFunctionCall",
"src": "4338:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "4338:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "4325:1:1"
},
{
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "4332:1:1"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4328:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4328:6:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "4322:2:1"
},
"nodeType": "YulFunctionCall",
"src": "4322:13:1"
},
"nodeType": "YulIf",
"src": "4319:39:1"
},
{
"nodeType": "YulAssignment",
"src": "4367:16:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "4378:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "4381:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4374:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4374:9:1"
},
"variableNames": [
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "4367:3:1"
}
]
}
]
},
"name": "checked_add_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "4292:1:1",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "4295:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nodeType": "YulTypedName",
"src": "4301:3:1",
"type": ""
}
],
"src": "4261:128:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4441:88:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "4472:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "4474:16:1"
},
"nodeType": "YulFunctionCall",
"src": "4474:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "4474:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4457:5:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4468:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4464:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4464:6:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "4454:2:1"
},
"nodeType": "YulFunctionCall",
"src": "4454:17:1"
},
"nodeType": "YulIf",
"src": "4451:43:1"
},
{
"nodeType": "YulAssignment",
"src": "4503:20:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4514:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4521:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4510:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4510:13:1"
},
"variableNames": [
{
"name": "ret",
"nodeType": "YulIdentifier",
"src": "4503:3:1"
}
]
}
]
},
"name": "increment_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "4423:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "ret",
"nodeType": "YulTypedName",
"src": "4433:3:1",
"type": ""
}
],
"src": "4394:135:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4566:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4583:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4590:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4595:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4586:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4586:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4576:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4576:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "4576:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4623:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4626:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4616:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4616:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4616:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4647:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4650:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4640:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4640:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4640:15:1"
}
]
},
"name": "panic_error_0x11",
"nodeType": "YulFunctionDefinition",
"src": "4534:127:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4698:95:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4715:1:1",
"type": "",
"value": "0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4722:3:1",
"type": "",
"value": "224"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4727:10:1",
"type": "",
"value": "0x4e487b71"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "4718:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4718:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4708:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4708:31:1"
},
"nodeType": "YulExpressionStatement",
"src": "4708:31:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4755:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4758:4:1",
"type": "",
"value": "0x32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4748:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4748:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4748:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4779:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4782:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4772:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4772:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4772:15:1"
}
]
},
"name": "panic_error_0x32",
"nodeType": "YulFunctionDefinition",
"src": "4666:127:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\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 function panic_error_0x32()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n}",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd1461010d5780639e7b8d6114610123578063a3ec138d14610136578063e2ba53f0146101a757600080fd5b80630121b93f1461008d578063013cf08b146100a25780632e4176cf146100cf5780635c19a95c146100fa575b600080fd5b6100a061009b3660046106cb565b6101af565b005b6100b56100b03660046106cb565b6102a6565b604080519283526020830191909152015b60405180910390f35b6000546100e2906001600160a01b031681565b6040516001600160a01b0390911681526020016100c6565b6100a061010836600461069b565b6102d4565b6101156104d3565b6040519081526020016100c6565b6100a061013136600461069b565b610550565b61017861014436600461069b565b600160208190526000918252604090912080549181015460029091015460ff82169161010090046001600160a01b03169084565b6040516100c6949392919093845291151560208401526001600160a01b03166040830152606082015260800190565b610115610668565b33600090815260016020526040902080546102085760405162461bcd60e51b8152602060048201526014602482015273486173206e6f20726967687420746f20766f746560601b60448201526064015b60405180910390fd5b600181015460ff161561024e5760405162461bcd60e51b815260206004820152600e60248201526d20b63932b0b23c903b37ba32b21760911b60448201526064016101ff565b6001818101805460ff191690911790556002808201839055815481549091908490811061027d5761027d61072d565b9060005260206000209060020201600101600082825461029d91906106e4565b90915550505050565b600281815481106102b657600080fd5b60009182526020909120600290910201805460019091015490915082565b3360009081526001602081905260409091209081015460ff161561032f5760405162461bcd60e51b81526020600482015260126024820152712cb7ba9030b63932b0b23c903b37ba32b21760711b60448201526064016101ff565b6001600160a01b0382163314156103885760405162461bcd60e51b815260206004820152601e60248201527f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e000060448201526064016101ff565b6001600160a01b03828116600090815260016020819052604090912001546101009004161561042d576001600160a01b0391821660009081526001602081905260409091200154610100900490911690338214156104285760405162461bcd60e51b815260206004820152601960248201527f466f756e64206c6f6f7020696e2064656c65676174696f6e2e0000000000000060448201526064016101ff565b610388565b600181810180546001600160a81b0319166101006001600160a01b03861690810291909117831790915560009081526020829052604090209081015460ff16156104b4578154600282810154815481106104895761048961072d565b906000526020600020906002020160010160008282546104a991906106e4565b909155506104ce9050565b8154815482906000906104c89084906106e4565b90915550505b505050565b600080805b60025481101561054b5781600282815481106104f6576104f661072d565b906000526020600020906002020160010154111561053957600281815481106105215761052161072d565b90600052602060002090600202016001015491508092505b80610543816106fc565b9150506104d8565b505090565b6000546001600160a01b031633146105bb5760405162461bcd60e51b815260206004820152602860248201527f4f6e6c79206368616972706572736f6e2063616e2067697665207269676874206044820152673a37903b37ba329760c11b60648201526084016101ff565b6001600160a01b0381166000908152600160208190526040909120015460ff16156106285760405162461bcd60e51b815260206004820152601860248201527f54686520766f74657220616c726561647920766f7465642e000000000000000060448201526064016101ff565b6001600160a01b0381166000908152600160205260409020541561064b57600080fd5b6001600160a01b0316600090815260016020819052604090912055565b600060026106746104d3565b815481106106845761068461072d565b906000526020600020906002020160000154905090565b6000602082840312156106ad57600080fd5b81356001600160a01b03811681146106c457600080fd5b9392505050565b6000602082840312156106dd57600080fd5b5035919050565b600082198211156106f7576106f7610717565b500190565b600060001982141561071057610710610717565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220db31f7ee9972f79116f430753197082b191101114740c5a378f9fdb1564d858e64736f6c63430008070033",
"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 0x10D JUMPI DUP1 PUSH4 0x9E7B8D61 EQ PUSH2 0x123 JUMPI DUP1 PUSH4 0xA3EC138D EQ PUSH2 0x136 JUMPI DUP1 PUSH4 0xE2BA53F0 EQ PUSH2 0x1A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x121B93F EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0x13CF08B EQ PUSH2 0xA2 JUMPI DUP1 PUSH4 0x2E4176CF EQ PUSH2 0xCF JUMPI DUP1 PUSH4 0x5C19A95C EQ PUSH2 0xFA JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xA0 PUSH2 0x9B CALLDATASIZE PUSH1 0x4 PUSH2 0x6CB JUMP JUMPDEST PUSH2 0x1AF JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0xB0 CALLDATASIZE PUSH1 0x4 PUSH2 0x6CB JUMP JUMPDEST PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD PUSH2 0xE2 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x108 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B JUMP JUMPDEST PUSH2 0x2D4 JUMP JUMPDEST PUSH2 0x115 PUSH2 0x4D3 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xC6 JUMP JUMPDEST PUSH2 0xA0 PUSH2 0x131 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B JUMP JUMPDEST PUSH2 0x550 JUMP JUMPDEST PUSH2 0x178 PUSH2 0x144 CALLDATASIZE PUSH1 0x4 PUSH2 0x69B 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 0x40 MLOAD PUSH2 0xC6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 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 PUSH2 0x115 PUSH2 0x668 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x208 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x14 PUSH1 0x24 DUP3 ADD MSTORE PUSH20 0x486173206E6F20726967687420746F20766F7465 PUSH1 0x60 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x24E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xE PUSH1 0x24 DUP3 ADD MSTORE PUSH14 0x20B63932B0B23C903B37BA32B217 PUSH1 0x91 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x27D JUMPI PUSH2 0x27D PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x29D SWAP2 SWAP1 PUSH2 0x6E4 JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x2B6 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 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 0x32F JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x12 PUSH1 0x24 DUP3 ADD MSTORE PUSH18 0x2CB7BA9030B63932B0B23C903B37BA32B217 PUSH1 0x71 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ ISZERO PUSH2 0x388 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1E PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x53656C662D64656C65676174696F6E20697320646973616C6C6F7765642E0000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x42D 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 0x428 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x19 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x466F756E64206C6F6F7020696E2064656C65676174696F6E2E00000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF JUMP JUMPDEST PUSH2 0x388 JUMP JUMPDEST PUSH1 0x1 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0x1 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 DUP4 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 0x4B4 JUMPI DUP2 SLOAD PUSH1 0x2 DUP3 DUP2 ADD SLOAD DUP2 SLOAD DUP2 LT PUSH2 0x489 JUMPI PUSH2 0x489 PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x4A9 SWAP2 SWAP1 PUSH2 0x6E4 JUMP JUMPDEST SWAP1 SWAP2 SSTORE POP PUSH2 0x4CE SWAP1 POP JUMP JUMPDEST DUP2 SLOAD DUP2 SLOAD DUP3 SWAP1 PUSH1 0x0 SWAP1 PUSH2 0x4C8 SWAP1 DUP5 SWAP1 PUSH2 0x6E4 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 0x54B JUMPI DUP2 PUSH1 0x2 DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x4F6 JUMPI PUSH2 0x4F6 PUSH2 0x72D JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x2 MUL ADD PUSH1 0x1 ADD SLOAD GT ISZERO PUSH2 0x539 JUMPI PUSH1 0x2 DUP2 DUP2 SLOAD DUP2 LT PUSH2 0x521 JUMPI PUSH2 0x521 PUSH2 0x72D JUMP 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 0x543 DUP2 PUSH2 0x6FC JUMP JUMPDEST SWAP2 POP POP PUSH2 0x4D8 JUMP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x5BB JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4F6E6C79206368616972706572736F6E2063616E206769766520726967687420 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x3A37903B37BA3297 PUSH1 0xC1 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x1FF 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 0x628 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x54686520766F74657220616C726561647920766F7465642E0000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x1FF 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 0x64B 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 0x0 PUSH1 0x2 PUSH2 0x674 PUSH2 0x4D3 JUMP JUMPDEST DUP2 SLOAD DUP2 LT PUSH2 0x684 JUMPI PUSH2 0x684 PUSH2 0x72D JUMP 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 0x6AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x6C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x6DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 NOT DUP3 GT ISZERO PUSH2 0x6F7 JUMPI PUSH2 0x6F7 PUSH2 0x717 JUMP JUMPDEST POP ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x0 NOT DUP3 EQ ISZERO PUSH2 0x710 JUMPI PUSH2 0x710 PUSH2 0x717 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 JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xDB BALANCE 0xF7 0xEE SWAP10 PUSH19 0xF79116F430753197082B191101114740C5A378 0xF9 REVERT 0xB1 JUMP 0x4D DUP6 DUP15 PUSH5 0x736F6C6343 STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "157:4362:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3173:458;;;;;;:::i;:::-;;:::i;:::-;;794:27;;;;;;:::i;:::-;;:::i;:::-;;;;1054:25:1;;;1110:2;1095:18;;1088:34;;;;1027:18;794:27:0;;;;;;;;715:26;;;;;-1:-1:-1;;;;;715:26:0;;;;;;-1:-1:-1;;;;;654:32:1;;;636:51;;624:2;609:18;715:26:0;490:203:1;2078:907:0;;;;;;:::i;:::-;;:::i;3817:365::-;;;:::i;:::-;;;844:25:1;;;832:2;817:18;3817:365:0;698:177:1;1599:355:0;;;;;;:::i;:::-;;:::i;748:39::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;748:39:0;;;;;;;;;;;;;4054:25:1;;;4122:14;;4115:22;4110:2;4095:18;;4088:50;-1:-1:-1;;;;;4174:32:1;4169:2;4154:18;;4147:60;4238:2;4223:18;;4216:34;4041:3;4026:19;;3829:427;4373:144:0;;;:::i;3173:458::-;3249:10;3219:20;3242:18;;;:6;:18;;;;;3278:13;;3270:51;;;;-1:-1:-1;;;3270:51:0;;1335:2:1;3270:51:0;;;1317:21:1;1374:2;1354:18;;;1347:30;-1:-1:-1;;;1393:18:1;;;1386:50;1453:18;;3270:51:0;;;;;;;;;3340:12;;;;;;3339:13;3331:40;;;;-1:-1:-1;;;3331:40:0;;1684:2:1;3331:40:0;;;1666:21:1;1723:2;1703:18;;;1696:30;-1:-1:-1;;;1742:18:1;;;1735:44;1796:18;;3331:40:0;1482:338:1;3331:40:0;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;;;;;;:::i;:::-;;;;;;;;;;;:29;;;:46;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;3173:458:0:o;794:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;794:27:0;:::o;2078:907::-;2155:10;2125:20;2148:18;;;:6;:18;;;;;;;;2185:12;;;;;;2184:13;2176:44;;;;-1:-1:-1;;;2176:44:0;;2027:2:1;2176:44:0;;;2009:21:1;2066:2;2046:18;;;2039:30;-1:-1:-1;;;2085:18:1;;;2078:48;2143:18;;2176:44:0;1825:342:1;2176:44:0;-1:-1:-1;;;;;2238:16:0;;2244:10;2238:16;;2230:59;;;;-1:-1:-1;;;2230:59:0;;3490:2:1;2230:59:0;;;3472:21:1;3529:2;3509:18;;;3502:30;3568:32;3548:18;;;3541:60;3618:18;;2230:59:0;3288:354:1;2230:59:0;-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;;2783:2:1;2458:54:0;;;2765:21:1;2822:2;2802:18;;;2795:30;2861:27;2841:18;;;2834:55;2906:18;;2458:54:0;2581:349:1;2458:54:0;2300:223;;;2547:4;2532:12;;;:19;;-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;;;;;;;;:::i;:::-;;;;;;;;;;;: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;2115:870;;2078:907;:::o;3817:365::-;3877:21;;;3949:227;3970:9;:16;3966:20;;3949:227;;;4036:16;4011:9;4021:1;4011:12;;;;;;;;:::i;:::-;;;;;;;;;;;:22;;;:41;4007:159;;;4091:9;4101:1;4091:12;;;;;;;;:::i;:::-;;;;;;;;;;;:22;;;4072:41;;4150:1;4131:20;;4007:159;3988:3;;;;:::i;:::-;;;;3949:227;;;;3904:278;3817:365;:::o;1599:355::-;1691:11;;-1:-1:-1;;;;;1691:11:0;1677:10;:25;1656:112;;;;-1:-1:-1;;;1656:112:0;;2374:2:1;1656:112:0;;;2356:21:1;2413:2;2393:18;;;2386:30;2452:34;2432:18;;;2425:62;-1:-1:-1;;;2503:18:1;;;2496:38;2551:19;;1656:112:0;2172:404:1;1656:112:0;-1:-1:-1;;;;;1800:13:0;;;;;;:6;:13;;;;;;;;:19;;;;1799:20;1778:91;;;;-1:-1:-1;;;1778:91:0;;3137:2:1;1778:91:0;;;3119:21:1;3176:2;3156:18;;;3149:30;3215:26;3195:18;;;3188:54;3259:18;;1778:91:0;2935:348:1;1778:91:0;-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;4373:144::-;4428:19;4477:9;4487:17;:15;:17::i;:::-;4477:28;;;;;;;;:::i;:::-;;;;;;;;;;;:33;;;4463:47;;4373:144;:::o;14:286:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;168:23;;-1:-1:-1;;;;;220:31:1;;210:42;;200:70;;266:1;263;256:12;200:70;289:5;14:286;-1:-1:-1;;;14:286:1:o;305:180::-;364:6;417:2;405:9;396:7;392:23;388:32;385:52;;;433:1;430;423:12;385:52;-1:-1:-1;456:23:1;;305:180;-1:-1:-1;305:180:1:o;4261:128::-;4301:3;4332:1;4328:6;4325:1;4322:13;4319:39;;;4338:18;;:::i;:::-;-1:-1:-1;4374:9:1;;4261:128::o;4394:135::-;4433:3;-1:-1:-1;;4454:17:1;;4451:43;;;4474:18;;:::i;:::-;-1:-1:-1;4521:1:1;4510:13;;4394:135::o;4534:127::-;4595:10;4590:3;4586:20;4583:1;4576:31;4626:4;4623:1;4616:15;4650:4;4647:1;4640:15;4666:127;4727:10;4722:3;4718:20;4715:1;4708:31;4758:4;4755:1;4748:15;4782:4;4779:1;4772:15"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "382600",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"chairperson()": "2382",
"delegate(address)": "infinite",
"giveRightToVote(address)": "29057",
"proposals(uint256)": "6743",
"vote(uint256)": "79501",
"voters(address)": "6895",
"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.7+commit.e28d00a7"
},
"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": "london",
"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": {
"functionDebugData": {
"@_40": {
"entryPoint": null,
"id": 40,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600080546001600160a01b0319163390811782556040519091907f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735908290a36101848061005f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae11461005a575b600080fd5b600054604080516001600160a01b039092168252519081900360200190f35b61006d61006836600461011e565b61006f565b005b6000546001600160a01b031633146100c35760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b604482015260640160405180910390fd5b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561013057600080fd5b81356001600160a01b038116811461014757600080fd5b939250505056fea26469706673582212200d0b176a2e2404d3b74ebd2595ad354800037cbfe29c5ef1d570d24687c0335964736f6c63430008070033",
"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 SWAP1 DUP2 OR DUP3 SSTORE PUSH1 0x40 MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0x342827C97908E5E2F71151C08502A66D44B6F758E3AC2F1DE95F02EB95F0A735 SWAP1 DUP3 SWAP1 LOG3 PUSH2 0x184 DUP1 PUSH2 0x5F 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 0x5A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x6D PUSH2 0x68 CALLDATASIZE PUSH1 0x4 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x6F JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x21B0B63632B91034B9903737BA1037BBB732B9 PUSH1 0x69 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD 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 0x130 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x147 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD SIGNEXTEND OR PUSH11 0x2E2404D3B74EBD2595AD35 BASEFEE STOP SUB PUSH29 0xBFE29C5EF1D570D24687C0335964736F6C634300080700330000000000 ",
"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;;955:10;;947:5;1059:27;;947:5;;1059:27;121:1361;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@changeOwner_58": {
"entryPoint": 111,
"id": 58,
"parameterSlots": 1,
"returnSlots": 0
},
"@getOwner_67": {
"entryPoint": null,
"id": 67,
"parameterSlots": 0,
"returnSlots": 1
},
"abi_decode_tuple_t_address": {
"entryPoint": 286,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:858:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:216:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "139:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "142:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:12: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:52:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "155:36:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "181:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "168:12:1"
},
"nodeType": "YulFunctionCall",
"src": "168:23:1"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "159:5:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "254:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "263:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "266:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "256:6:1"
},
"nodeType": "YulFunctionCall",
"src": "256:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "256:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "213:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "224:5:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "239:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "244:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "248:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "220:3:1"
},
"nodeType": "YulFunctionCall",
"src": "220:31:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "210:2:1"
},
"nodeType": "YulFunctionCall",
"src": "210:42:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "203:6:1"
},
"nodeType": "YulFunctionCall",
"src": "203:50:1"
},
"nodeType": "YulIf",
"src": "200:70:1"
},
{
"nodeType": "YulAssignment",
"src": "279:15:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "289:5:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "279: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:286:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "406:102:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "416:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "428:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "439:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "424:3:1"
},
"nodeType": "YulFunctionCall",
"src": "424:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "416:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "458:9:1"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "473:6:1"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "489:3:1",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "494:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "485:3:1"
},
"nodeType": "YulFunctionCall",
"src": "485:11:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "498:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "481:3:1"
},
"nodeType": "YulFunctionCall",
"src": "481:19:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "469:3:1"
},
"nodeType": "YulFunctionCall",
"src": "469:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "451:6:1"
},
"nodeType": "YulFunctionCall",
"src": "451:51:1"
},
"nodeType": "YulExpressionStatement",
"src": "451:51:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "375:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "386:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "397:4:1",
"type": ""
}
],
"src": "305:203:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "687:169:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "704:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "715:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "697:6:1"
},
"nodeType": "YulFunctionCall",
"src": "697:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "697:21:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "738:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "749:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "734:3:1"
},
"nodeType": "YulFunctionCall",
"src": "734:18:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "754:2:1",
"type": "",
"value": "19"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "727:6:1"
},
"nodeType": "YulFunctionCall",
"src": "727:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "727:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "777:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "788:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "773:3:1"
},
"nodeType": "YulFunctionCall",
"src": "773:18:1"
},
{
"hexValue": "43616c6c6572206973206e6f74206f776e6572",
"kind": "string",
"nodeType": "YulLiteral",
"src": "793:21:1",
"type": "",
"value": "Caller is not owner"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "766:6:1"
},
"nodeType": "YulFunctionCall",
"src": "766:49:1"
},
"nodeType": "YulExpressionStatement",
"src": "766:49:1"
},
{
"nodeType": "YulAssignment",
"src": "824:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "836:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "847:2:1",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "832:3:1"
},
"nodeType": "YulFunctionCall",
"src": "832:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "824:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_2d10247a65709fdb3c0696b0ed760a0c246e12f8c496efb56291dd2fe3b0275d__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "664:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "678:4:1",
"type": ""
}
],
"src": "513:343:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\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": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063893d20e81461003b578063a6f9dae11461005a575b600080fd5b600054604080516001600160a01b039092168252519081900360200190f35b61006d61006836600461011e565b61006f565b005b6000546001600160a01b031633146100c35760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b604482015260640160405180910390fd5b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561013057600080fd5b81356001600160a01b038116811461014757600080fd5b939250505056fea26469706673582212200d0b176a2e2404d3b74ebd2595ad354800037cbfe29c5ef1d570d24687c0335964736f6c63430008070033",
"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 0x5A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x6D PUSH2 0x68 CALLDATASIZE PUSH1 0x4 PUSH2 0x11E JUMP JUMPDEST PUSH2 0x6F JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0xC3 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x21B0B63632B91034B9903737BA1037BBB732B9 PUSH1 0x69 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD 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 0x130 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x147 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD SIGNEXTEND OR PUSH11 0x2E2404D3B74EBD2595AD35 BASEFEE STOP SUB PUSH29 0xBFE29C5EF1D570D24687C0335964736F6C634300080700330000000000 ",
"sourceMap": "121:1361:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:81;1442:7;1468:5;1399:81;;;-1:-1:-1;;;;;1468:5:0;;;451:51:1;;1399:81:0;;;;;439:2:1;1399:81:0;;;1184:127;;;;;;:::i;:::-;;:::i;:::-;;;807:5;;-1:-1:-1;;;;;807:5:0;793:10;:19;785:51;;;;-1:-1:-1;;;785:51:0;;715:2:1;785:51:0;;;697:21:1;754:2;734:18;;;727:30;-1:-1:-1;;;773:18:1;;;766:49;832:18;;785:51:0;;;;;;;;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:286:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;168:23;;-1:-1:-1;;;;;220:31:1;;210:42;;200:70;;266:1;263;256:12;200:70;289:5;14:286;-1:-1:-1;;;14:286:1:o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "77600",
"executionCost": "25897",
"totalCost": "103497"
},
"external": {
"changeOwner(address)": "30330",
"getOwner()": "2270"
}
},
"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.7+commit.e28d00a7"
},
"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": "london",
"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": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b5060ac8061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d14604c575b600080fd5b60005460405190815260200160405180910390f35b605c6057366004605e565b600055565b005b600060208284031215606f57600080fd5b503591905056fea264697066735822122088b69ecd8d6e9a5e67034b7732d78e081ce4a8dfe2e6d9695578779cf618fbe564736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xAC DUP1 PUSH2 0x1E 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 0x4C JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x5C PUSH1 0x57 CALLDATASIZE PUSH1 0x4 PUSH1 0x5E JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0x6F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP9 0xB6 SWAP15 0xCD DUP14 PUSH15 0x9A5E67034B7732D78E081CE4A8DFE2 0xE6 0xD9 PUSH10 0x5578779CF618FBE56473 PUSH16 0x6C634300080700330000000000000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": null,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": null,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 94,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": null,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:378:1",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:1",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:110:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "139:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "142:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:1"
},
"nodeType": "YulFunctionCall",
"src": "132:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "132:12: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:52:1"
},
{
"nodeType": "YulAssignment",
"src": "155:33:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "178:9:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "165:12:1"
},
"nodeType": "YulFunctionCall",
"src": "165:23:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "155: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:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:76:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "310:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "322:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "333:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "318:3:1"
},
"nodeType": "YulFunctionCall",
"src": "318:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "310:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "352:9:1"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "363:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "345:6:1"
},
"nodeType": "YulFunctionCall",
"src": "345:25:1"
},
"nodeType": "YulExpressionStatement",
"src": "345:25:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "269:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "280:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "291:4:1",
"type": ""
}
],
"src": "199:177:1"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\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": "6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d14604c575b600080fd5b60005460405190815260200160405180910390f35b605c6057366004605e565b600055565b005b600060208284031215606f57600080fd5b503591905056fea264697066735822122088b69ecd8d6e9a5e67034b7732d78e081ce4a8dfe2e6d9695578779cf618fbe564736f6c63430008070033",
"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 0x4C JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x5C PUSH1 0x57 CALLDATASIZE PUSH1 0x4 PUSH1 0x5E JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0x6F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP9 0xB6 SWAP15 0xCD DUP14 PUSH15 0x9A5E67034B7732D78E081CE4A8DFE2 0xE6 0xD9 PUSH10 0x5578779CF618FBE56473 PUSH16 0x6C634300080700330000000000000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;457:7;482:6;416:79;;345:25:1;;;333:2;318:18;416:79:0;;;;;;;271:64;;;;;;:::i;:::-;316:6;:12;271:64;;;14:180:1;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "34400",
"executionCost": "87",
"totalCost": "34487"
},
"external": {
"retrieve()": "2246",
"store(uint256)": "22312"
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'number'"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/1_Storage.sol": "Storage"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
"license": "GPL-3.0",
"urls": [
"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1",
"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA"
]
}
},
"version": 1
}
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithEthers script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
// 'web3Provider' is a remix global variable object
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner()
let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer);
let contract = await factory.deploy(...constructorArgs);
console.log('Contract Address: ', contract.address);
// The contract is NOT deployed yet; we must wait until it is mined
await contract.deployed()
console.log('Deployment successful.')
} catch (e) {
console.log(e.message)
}
})()
// Right click on the script name and hit "Run" to execute
(async () => {
try {
console.log('Running deployWithWeb3 script...')
const contractName = 'Storage' // Change this for other contract
const constructorArgs = [] // Put constructor args (if any) here for your contract
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
const accounts = await web3.eth.getAccounts()
let contract = new web3.eth.Contract(metadata.abi)
contract = contract.deploy({
data: metadata.data.bytecode.object,
arguments: constructorArgs
})
const newContractInstance = await contract.send({
from: accounts[0],
gas: 1500000,
gasPrice: '30000000000'
})
console.log('Contract deployed at address: ', newContractInstance.options.address)
} catch (e) {
console.log(e.message)
}
})()
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/3_Ballot.sol";
contract BallotTest {
bytes32[] proposalNames;
Ballot ballotToTest;
function beforeAll () public {
proposalNames.push(bytes32("candidate1"));
ballotToTest = new Ballot(proposalNames);
}
function checkWinningProposal () public {
ballotToTest.vote(0);
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal");
Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name");
}
function checkWinninProposalWithReturnValue () public view returns (bool) {
return ballotToTest.winningProposal() == 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment