Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save samuelajala01/009db1642e08ac81f6aef7d3902aa3ad to your computer and use it in GitHub Desktop.
Save samuelajala01/009db1642e08ac81f6aef7d3902aa3ad to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db;
accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB;
accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2;
accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372;
accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678;
accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7;
accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C;
accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC;
accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;
accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C;
accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB;
accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225;
accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148;
return accounts[index];
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library Assert {
event AssertionEvent(
bool passed,
string message,
string methodName
);
event AssertionEventUint(
bool passed,
string message,
string methodName,
uint256 returned,
uint256 expected
);
event AssertionEventInt(
bool passed,
string message,
string methodName,
int256 returned,
int256 expected
);
event AssertionEventBool(
bool passed,
string message,
string methodName,
bool returned,
bool expected
);
event AssertionEventAddress(
bool passed,
string message,
string methodName,
address returned,
address expected
);
event AssertionEventBytes32(
bool passed,
string message,
string methodName,
bytes32 returned,
bytes32 expected
);
event AssertionEventString(
bool passed,
string message,
string methodName,
string returned,
string expected
);
event AssertionEventUintInt(
bool passed,
string message,
string methodName,
uint256 returned,
int256 expected
);
event AssertionEventIntUint(
bool passed,
string message,
string methodName,
int256 returned,
uint256 expected
);
function ok(bool a, string memory message) public returns (bool result) {
result = a;
emit AssertionEvent(result, message, "ok");
}
function equal(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventUint(result, message, "equal", a, b);
}
function equal(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventInt(result, message, "equal", a, b);
}
function equal(bool a, bool b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBool(result, message, "equal", a, b);
}
// TODO: only for certain versions of solc
//function equal(fixed a, fixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function equal(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
function equal(address a, address b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventAddress(result, message, "equal", a, b);
}
function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a == b);
emit AssertionEventBytes32(result, message, "equal", a, b);
}
function equal(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "equal", a, b);
}
function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventUint(result, message, "notEqual", a, b);
}
function notEqual(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventInt(result, message, "notEqual", a, b);
}
function notEqual(bool a, bool b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBool(result, message, "notEqual", a, b);
}
// TODO: only for certain versions of solc
//function notEqual(fixed a, fixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
function notEqual(address a, address b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventAddress(result, message, "notEqual", a, b);
}
function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) {
result = (a != b);
emit AssertionEventBytes32(result, message, "notEqual", a, b);
}
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b)));
emit AssertionEventString(result, message, "notEqual", a, b);
}
/*----------------- Greater than --------------------*/
function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventUint(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a > b);
emit AssertionEventInt(result, message, "greaterThan", a, b);
}
// TODO: safely compare between uint and int
function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative uint "a" always greater
result = true;
} else {
result = (a > uint(b));
}
emit AssertionEventUintInt(result, message, "greaterThan", a, b);
}
function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative uint "b" always greater
result = false;
} else {
result = (uint(a) > b);
}
emit AssertionEventIntUint(result, message, "greaterThan", a, b);
}
/*----------------- Lesser than --------------------*/
function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventUint(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) {
result = (a < b);
emit AssertionEventInt(result, message, "lesserThan", a, b);
}
// TODO: safely compare between uint and int
function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) {
if(b < int(0)) {
// int is negative int "b" always lesser
result = false;
} else {
result = (a < uint(b));
}
emit AssertionEventUintInt(result, message, "lesserThan", a, b);
}
function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) {
if(a < int(0)) {
// int is negative int "a" always lesser
result = true;
} else {
result = (uint(a) < b);
}
emit AssertionEventIntUint(result, message, "lesserThan", a, b);
}
}
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads for the 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": {
"@_11": {
"entryPoint": null,
"id": 11,
"parameterSlots": 0,
"returnSlots": 0
},
"extract_byte_array_length": {
"entryPoint": 261,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"panic_error_0x22": {
"entryPoint": 311,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:516:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "58:269:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "68:22:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "82:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "88:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "78:3:1"
},
"nodeType": "YulFunctionCall",
"src": "78:12:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "68:6:1"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "99:38:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "129:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "135:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "125:3:1"
},
"nodeType": "YulFunctionCall",
"src": "125:12:1"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulTypedName",
"src": "103:18:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "176:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "190:27:1",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "204:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "212:4:1",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "200:3:1"
},
"nodeType": "YulFunctionCall",
"src": "200:17:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "190:6:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "156:18:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "149:6:1"
},
"nodeType": "YulFunctionCall",
"src": "149:26:1"
},
"nodeType": "YulIf",
"src": "146:81:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "279:42:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nodeType": "YulIdentifier",
"src": "293:16:1"
},
"nodeType": "YulFunctionCall",
"src": "293:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "293:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "243:18:1"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "266:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "274:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "263:2:1"
},
"nodeType": "YulFunctionCall",
"src": "263:14:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "240:2:1"
},
"nodeType": "YulFunctionCall",
"src": "240:38:1"
},
"nodeType": "YulIf",
"src": "237:84:1"
}
]
},
"name": "extract_byte_array_length",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "42:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "51:6:1",
"type": ""
}
],
"src": "7:320:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "361:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "378:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "381:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "371:6:1"
},
"nodeType": "YulFunctionCall",
"src": "371:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "371:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "475:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "478:4:1",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "468:6:1"
},
"nodeType": "YulFunctionCall",
"src": "468:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "468:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "499:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "502:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "492:6:1"
},
"nodeType": "YulFunctionCall",
"src": "492:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "492:15:1"
}
]
},
"name": "panic_error_0x22",
"nodeType": "YulFunctionDefinition",
"src": "333:180:1"
}
]
},
"contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506040518060400160405280600b81526020017f48656c6c6f20576f726c640000000000000000000000000000000000000000008152506000908051906020019061005c929190610062565b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6104a8806101756000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063b8d64ad81461003b578063f20eaeb814610057575b600080fd5b61005560048036038101906100509190610234565b610075565b005b61005f61008f565b60405161006c91906102b6565b60405180910390f35b806000908051906020019061008b929190610121565b5050565b60606000805461009e9061038c565b80601f01602080910402602001604051908101604052809291908181526020018280546100ca9061038c565b80156101175780601f106100ec57610100808354040283529160200191610117565b820191906000526020600020905b8154815290600101906020018083116100fa57829003601f168201915b5050505050905090565b82805461012d9061038c565b90600052602060002090601f01602090048101928261014f5760008555610196565b82601f1061016857805160ff1916838001178555610196565b82800160010185558215610196579182015b8281111561019557825182559160200191906001019061017a565b5b5090506101a391906101a7565b5090565b5b808211156101c05760008160009055506001016101a8565b5090565b60006101d76101d2846102fd565b6102d8565b9050828152602081018484840111156101f3576101f2610452565b5b6101fe84828561034a565b509392505050565b600082601f83011261021b5761021a61044d565b5b813561022b8482602086016101c4565b91505092915050565b60006020828403121561024a5761024961045c565b5b600082013567ffffffffffffffff81111561026857610267610457565b5b61027484828501610206565b91505092915050565b60006102888261032e565b6102928185610339565b93506102a2818560208601610359565b6102ab81610461565b840191505092915050565b600060208201905081810360008301526102d0818461027d565b905092915050565b60006102e26102f3565b90506102ee82826103be565b919050565b6000604051905090565b600067ffffffffffffffff8211156103185761031761041e565b5b61032182610461565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b82818337600083830152505050565b60005b8381101561037757808201518184015260208101905061035c565b83811115610386576000848401525b50505050565b600060028204905060018216806103a457607f821691505b602082108114156103b8576103b76103ef565b5b50919050565b6103c782610461565b810181811067ffffffffffffffff821117156103e6576103e561041e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f830116905091905056fea26469706673582212206b87cca34f85c7e953d2f3e3d508c02e7fa197a7635cc40f1949364f4cf407de64736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xB DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x48656C6C6F20576F726C64000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x5C SWAP3 SWAP2 SWAP1 PUSH2 0x62 JUMP JUMPDEST POP PUSH2 0x166 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x6E SWAP1 PUSH2 0x105 JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x90 JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0xD7 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0xA9 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0xD7 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0xD7 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0xD6 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xBB JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0xE4 SWAP2 SWAP1 PUSH2 0xE8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x101 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0xE9 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x11D JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x131 JUMPI PUSH2 0x130 PUSH2 0x137 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x4A8 DUP1 PUSH2 0x175 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 0xB8D64AD8 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xF20EAEB8 EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x234 JUMP JUMPDEST PUSH2 0x75 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6C SWAP2 SWAP1 PUSH2 0x2B6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x8B SWAP3 SWAP2 SWAP1 PUSH2 0x121 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH2 0x9E SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0xCA SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 ISZERO PUSH2 0x117 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xEC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x117 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xFA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x12D SWAP1 PUSH2 0x38C JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x14F JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x168 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x196 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x195 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x17A JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x1A3 SWAP2 SWAP1 PUSH2 0x1A7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1C0 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1A8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D7 PUSH2 0x1D2 DUP5 PUSH2 0x2FD JUMP JUMPDEST PUSH2 0x2D8 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1F3 JUMPI PUSH2 0x1F2 PUSH2 0x452 JUMP JUMPDEST JUMPDEST PUSH2 0x1FE DUP5 DUP3 DUP6 PUSH2 0x34A JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21B JUMPI PUSH2 0x21A PUSH2 0x44D JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x22B DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1C4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24A JUMPI PUSH2 0x249 PUSH2 0x45C JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x268 JUMPI PUSH2 0x267 PUSH2 0x457 JUMP JUMPDEST JUMPDEST PUSH2 0x274 DUP5 DUP3 DUP6 ADD PUSH2 0x206 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288 DUP3 PUSH2 0x32E JUMP JUMPDEST PUSH2 0x292 DUP2 DUP6 PUSH2 0x339 JUMP JUMPDEST SWAP4 POP PUSH2 0x2A2 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x359 JUMP JUMPDEST PUSH2 0x2AB DUP2 PUSH2 0x461 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2D0 DUP2 DUP5 PUSH2 0x27D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 PUSH2 0x2F3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2EE DUP3 DUP3 PUSH2 0x3BE JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x318 JUMPI PUSH2 0x317 PUSH2 0x41E JUMP JUMPDEST JUMPDEST PUSH2 0x321 DUP3 PUSH2 0x461 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x377 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x35C JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x386 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x3A4 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x3B8 JUMPI PUSH2 0x3B7 PUSH2 0x3EF JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x3C7 DUP3 PUSH2 0x461 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x3E6 JUMPI PUSH2 0x3E5 PUSH2 0x41E JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH12 0x87CCA34F85C7E953D2F3E3D5 ADDMOD 0xC0 0x2E PUSH32 0xA197A7635CC40F1949364F4CF407DE64736F6C63430008070033000000000000 ",
"sourceMap": "63:495:0:-:0;;;146:124;;;;;;;;;;178:24;;;;;;;;;;;;;;;;;:8;:24;;;;;;;;;;;;:::i;:::-;;63:495;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:1:-;51:6;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:81;;212:4;204:6;200:17;190:27;;146:81;274:2;266:6;263:14;243:18;240:38;237:84;;;293:18;;:::i;:::-;237:84;58:269;7:320;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;63:495:0;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@output_29": {
"entryPoint": 143,
"id": 29,
"parameterSlots": 0,
"returnSlots": 1
},
"@setWelcomeText_21": {
"entryPoint": 117,
"id": 21,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_available_length_t_string_memory_ptr": {
"entryPoint": 452,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_decode_t_string_memory_ptr": {
"entryPoint": 518,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_string_memory_ptr": {
"entryPoint": 564,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 637,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 694,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_memory": {
"entryPoint": 728,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": 755,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_allocation_size_t_string_memory_ptr": {
"entryPoint": 765,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 814,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 825,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"copy_calldata_to_memory": {
"entryPoint": 842,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"copy_memory_to_memory": {
"entryPoint": 857,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"extract_byte_array_length": {
"entryPoint": 908,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"finalize_allocation": {
"entryPoint": 958,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"panic_error_0x22": {
"entryPoint": 1007,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 1054,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": {
"entryPoint": 1101,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae": {
"entryPoint": 1106,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": 1111,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 1116,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 1121,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4854:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "91:328:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "101:75:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "168:6:1"
}
],
"functionName": {
"name": "array_allocation_size_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "126:41:1"
},
"nodeType": "YulFunctionCall",
"src": "126:49:1"
}
],
"functionName": {
"name": "allocate_memory",
"nodeType": "YulIdentifier",
"src": "110:15:1"
},
"nodeType": "YulFunctionCall",
"src": "110:66:1"
},
"variableNames": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "101:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "192:5:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "199:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "185:6:1"
},
"nodeType": "YulFunctionCall",
"src": "185:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "185:21:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "215:27:1",
"value": {
"arguments": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "230:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "237:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "226:3:1"
},
"nodeType": "YulFunctionCall",
"src": "226:16:1"
},
"variables": [
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "219:3:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "280:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nodeType": "YulIdentifier",
"src": "282:77:1"
},
"nodeType": "YulFunctionCall",
"src": "282:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "282:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "261:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "266:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "257:3:1"
},
"nodeType": "YulFunctionCall",
"src": "257:16:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "275:3:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "254:2:1"
},
"nodeType": "YulFunctionCall",
"src": "254:25:1"
},
"nodeType": "YulIf",
"src": "251:112:1"
},
{
"expression": {
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "396:3:1"
},
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "401:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "406:6:1"
}
],
"functionName": {
"name": "copy_calldata_to_memory",
"nodeType": "YulIdentifier",
"src": "372:23:1"
},
"nodeType": "YulFunctionCall",
"src": "372:41:1"
},
"nodeType": "YulExpressionStatement",
"src": "372:41:1"
}
]
},
"name": "abi_decode_available_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "64:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "69:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "77:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nodeType": "YulTypedName",
"src": "85:5:1",
"type": ""
}
],
"src": "7:412:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "501:278:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "550:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nodeType": "YulIdentifier",
"src": "552:77:1"
},
"nodeType": "YulFunctionCall",
"src": "552:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "552:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "529:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "537:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "525:3:1"
},
"nodeType": "YulFunctionCall",
"src": "525:17:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "544:3:1"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "521:3:1"
},
"nodeType": "YulFunctionCall",
"src": "521:27:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "514:6:1"
},
"nodeType": "YulFunctionCall",
"src": "514:35:1"
},
"nodeType": "YulIf",
"src": "511:122:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "642:34:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "669:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "656:12:1"
},
"nodeType": "YulFunctionCall",
"src": "656:20:1"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "646:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "685:88:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "746:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "754:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "742:3:1"
},
"nodeType": "YulFunctionCall",
"src": "742:17:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "761:6:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "769:3:1"
}
],
"functionName": {
"name": "abi_decode_available_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "694:47:1"
},
"nodeType": "YulFunctionCall",
"src": "694:79:1"
},
"variableNames": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "685:5:1"
}
]
}
]
},
"name": "abi_decode_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "479:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "487:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nodeType": "YulTypedName",
"src": "495:5:1",
"type": ""
}
],
"src": "439:340:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "861:433:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "907:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "909:77:1"
},
"nodeType": "YulFunctionCall",
"src": "909:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "909:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "882:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "891:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "878:3:1"
},
"nodeType": "YulFunctionCall",
"src": "878:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "903:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "874:3:1"
},
"nodeType": "YulFunctionCall",
"src": "874:32:1"
},
"nodeType": "YulIf",
"src": "871:119:1"
},
{
"nodeType": "YulBlock",
"src": "1000:287:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1015:45:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1046:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1057:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1042:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1042:17:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "1029:12:1"
},
"nodeType": "YulFunctionCall",
"src": "1029:31:1"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1019:6:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1107:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulIdentifier",
"src": "1109:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1109:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1109:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1079:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1087:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "1076:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1076:30:1"
},
"nodeType": "YulIf",
"src": "1073:117:1"
},
{
"nodeType": "YulAssignment",
"src": "1204:73:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1249:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1260:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1245:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1245:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1269:7:1"
}
],
"functionName": {
"name": "abi_decode_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "1214:30:1"
},
"nodeType": "YulFunctionCall",
"src": "1214:63:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1204:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "831:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "842:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "854:6:1",
"type": ""
}
],
"src": "785:509:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1392:272:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1402:53:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1449:5:1"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "1416:32:1"
},
"nodeType": "YulFunctionCall",
"src": "1416:39:1"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1406:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1464:78:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1530:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1535:6:1"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1471:58:1"
},
"nodeType": "YulFunctionCall",
"src": "1471:71:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1464:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1577:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1584:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1573:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1573:16:1"
},
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1591:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1596:6:1"
}
],
"functionName": {
"name": "copy_memory_to_memory",
"nodeType": "YulIdentifier",
"src": "1551:21:1"
},
"nodeType": "YulFunctionCall",
"src": "1551:52:1"
},
"nodeType": "YulExpressionStatement",
"src": "1551:52:1"
},
{
"nodeType": "YulAssignment",
"src": "1612:46:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1623:3:1"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1650:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "1628:21:1"
},
"nodeType": "YulFunctionCall",
"src": "1628:29:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1619:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1619:39:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "1612:3:1"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1373:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1380:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1388:3:1",
"type": ""
}
],
"src": "1300:364:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1788:195:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1798:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1810:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1821:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1806:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1806:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1798:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1845:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1856:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1841:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1841:17:1"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1864:4:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1870:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1860:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1860:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1834:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1834:47:1"
},
"nodeType": "YulExpressionStatement",
"src": "1834:47:1"
},
{
"nodeType": "YulAssignment",
"src": "1890:86:1",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1962:6:1"
},
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1971:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1898:63:1"
},
"nodeType": "YulFunctionCall",
"src": "1898:78:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1890:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1760:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1772:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1783:4:1",
"type": ""
}
],
"src": "1670:313:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2030:88:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2040:30:1",
"value": {
"arguments": [],
"functionName": {
"name": "allocate_unbounded",
"nodeType": "YulIdentifier",
"src": "2050:18:1"
},
"nodeType": "YulFunctionCall",
"src": "2050:20:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2040:6:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2099:6:1"
},
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2107:4:1"
}
],
"functionName": {
"name": "finalize_allocation",
"nodeType": "YulIdentifier",
"src": "2079:19:1"
},
"nodeType": "YulFunctionCall",
"src": "2079:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "2079:33:1"
}
]
},
"name": "allocate_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "size",
"nodeType": "YulTypedName",
"src": "2014:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2023:6:1",
"type": ""
}
],
"src": "1989:129:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2164:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2174:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2190:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2184:5:1"
},
"nodeType": "YulFunctionCall",
"src": "2184:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2174:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2157:6:1",
"type": ""
}
],
"src": "2124:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2272:241:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2377:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "2379:16:1"
},
"nodeType": "YulFunctionCall",
"src": "2379:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "2379:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2349:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2357:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "2346:2:1"
},
"nodeType": "YulFunctionCall",
"src": "2346:30:1"
},
"nodeType": "YulIf",
"src": "2343:56:1"
},
{
"nodeType": "YulAssignment",
"src": "2409:37:1",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2439:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "2417:21:1"
},
"nodeType": "YulFunctionCall",
"src": "2417:29:1"
},
"variableNames": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2409:4:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "2483:23:1",
"value": {
"arguments": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2495:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2501:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2491:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2491:15:1"
},
"variableNames": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2483:4:1"
}
]
}
]
},
"name": "array_allocation_size_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2256:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "size",
"nodeType": "YulTypedName",
"src": "2267:4:1",
"type": ""
}
],
"src": "2205:308:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2578:40:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2589:22:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2605:5:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2599:5:1"
},
"nodeType": "YulFunctionCall",
"src": "2599:12:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2589:6:1"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2561:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2571:6:1",
"type": ""
}
],
"src": "2519:99:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2720:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2737:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2742:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2730:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2730:19:1"
},
"nodeType": "YulExpressionStatement",
"src": "2730:19:1"
},
{
"nodeType": "YulAssignment",
"src": "2758:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2777:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2782:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2773:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2773:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "2758:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "2692:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2697:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "2708:11:1",
"type": ""
}
],
"src": "2624:169:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2850:103:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "2873:3:1"
},
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "2878:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2883:6:1"
}
],
"functionName": {
"name": "calldatacopy",
"nodeType": "YulIdentifier",
"src": "2860:12:1"
},
"nodeType": "YulFunctionCall",
"src": "2860:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2860:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "2931:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2936:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2927:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2927:16:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2945:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2920:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2920:27:1"
},
"nodeType": "YulExpressionStatement",
"src": "2920:27:1"
}
]
},
"name": "copy_calldata_to_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "2832:3:1",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "2837:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2842:6:1",
"type": ""
}
],
"src": "2799:154:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3008:258:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3018:10:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "3027:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "3022:1:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3087:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "3112:3:1"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3117:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3108:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3108:11:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "3131:3:1"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3136:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3127:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3127:11:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3121:5:1"
},
"nodeType": "YulFunctionCall",
"src": "3121:18:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3101:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3101:39:1"
},
"nodeType": "YulExpressionStatement",
"src": "3101:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3048:1:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3051:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3045:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3045:13:1"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "3059:19:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3061:15:1",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3070:1:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3073:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3066:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3066:10:1"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3061:1:1"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "3041:3:1",
"statements": []
},
"src": "3037:113:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3184:76:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "3234:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3239:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3230:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3230:16:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3248:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3223:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3223:27:1"
},
"nodeType": "YulExpressionStatement",
"src": "3223:27:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3165:1:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3168:6:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "3162:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3162:13:1"
},
"nodeType": "YulIf",
"src": "3159:101:1"
}
]
},
"name": "copy_memory_to_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "2990:3:1",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "2995:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "3000:6:1",
"type": ""
}
],
"src": "2959:307:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3323:269:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3333:22:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "3347:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3353:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "3343:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3343:12:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3333:6:1"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "3364:38:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "3394:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3400:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3390:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3390:12:1"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulTypedName",
"src": "3368:18:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3441:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3455:27:1",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3469:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3477:4:1",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3465:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3465:17:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3455:6:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "3421:18:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "3414:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3414:26:1"
},
"nodeType": "YulIf",
"src": "3411:81:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3544:42:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nodeType": "YulIdentifier",
"src": "3558:16:1"
},
"nodeType": "YulFunctionCall",
"src": "3558:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "3558:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "3508:18:1"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3531:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3539:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3528:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3528:14:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "3505:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3505:38:1"
},
"nodeType": "YulIf",
"src": "3502:84:1"
}
]
},
"name": "extract_byte_array_length",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "3307:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "3316:6:1",
"type": ""
}
],
"src": "3272:320:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3641:238:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3651:58:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "3673:6:1"
},
{
"arguments": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "3703:4:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "3681:21:1"
},
"nodeType": "YulFunctionCall",
"src": "3681:27:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3669:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3669:40:1"
},
"variables": [
{
"name": "newFreePtr",
"nodeType": "YulTypedName",
"src": "3655:10:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3820:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "3822:16:1"
},
"nodeType": "YulFunctionCall",
"src": "3822:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "3822:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3763:10:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3775:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "3760:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3760:34:1"
},
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3799:10:1"
},
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "3811:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3796:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3796:22:1"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "3757:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3757:62:1"
},
"nodeType": "YulIf",
"src": "3754:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3858:2:1",
"type": "",
"value": "64"
},
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3862:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3851:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3851:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "3851:22:1"
}
]
},
"name": "finalize_allocation",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "3627:6:1",
"type": ""
},
{
"name": "size",
"nodeType": "YulTypedName",
"src": "3635:4:1",
"type": ""
}
],
"src": "3598:281:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3913:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3930:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3933:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3923:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3923:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "3923:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4027:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4030:4:1",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4020:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4020:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4020:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4051:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4054:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4044:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4044:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4044:15:1"
}
]
},
"name": "panic_error_0x22",
"nodeType": "YulFunctionDefinition",
"src": "3885:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4099:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4116:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4119:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4109:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4109:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "4109:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4213:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4216:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4206:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4206:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4206:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4237:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4240:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4230:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4230:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4230:15:1"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "4071:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4346:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4363:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4366:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4356:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4356:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4356:12:1"
}
]
},
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nodeType": "YulFunctionDefinition",
"src": "4257:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4469:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4486:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4489:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4479:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4479:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4479:12:1"
}
]
},
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nodeType": "YulFunctionDefinition",
"src": "4380:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4592:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4609:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4612:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4602:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4602:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4602:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "4503:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4715:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4732:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4735:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4725:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4725:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4725:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "4626:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4797:54:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4807:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4825:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4832:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4821:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4821:14:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4841:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4837:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4837:7:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "4817:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4817:28:1"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "4807:6:1"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "4780:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "4790:6:1",
"type": ""
}
],
"src": "4749:102:1"
}
]
},
"contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocate_memory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function allocate_memory(size) -> memPtr {\n memPtr := allocate_unbounded()\n finalize_allocation(memPtr, size)\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n size := round_up_to_mul_of_32(length)\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function finalize_allocation(memPtr, size) {\n let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c8063b8d64ad81461003b578063f20eaeb814610057575b600080fd5b61005560048036038101906100509190610234565b610075565b005b61005f61008f565b60405161006c91906102b6565b60405180910390f35b806000908051906020019061008b929190610121565b5050565b60606000805461009e9061038c565b80601f01602080910402602001604051908101604052809291908181526020018280546100ca9061038c565b80156101175780601f106100ec57610100808354040283529160200191610117565b820191906000526020600020905b8154815290600101906020018083116100fa57829003601f168201915b5050505050905090565b82805461012d9061038c565b90600052602060002090601f01602090048101928261014f5760008555610196565b82601f1061016857805160ff1916838001178555610196565b82800160010185558215610196579182015b8281111561019557825182559160200191906001019061017a565b5b5090506101a391906101a7565b5090565b5b808211156101c05760008160009055506001016101a8565b5090565b60006101d76101d2846102fd565b6102d8565b9050828152602081018484840111156101f3576101f2610452565b5b6101fe84828561034a565b509392505050565b600082601f83011261021b5761021a61044d565b5b813561022b8482602086016101c4565b91505092915050565b60006020828403121561024a5761024961045c565b5b600082013567ffffffffffffffff81111561026857610267610457565b5b61027484828501610206565b91505092915050565b60006102888261032e565b6102928185610339565b93506102a2818560208601610359565b6102ab81610461565b840191505092915050565b600060208201905081810360008301526102d0818461027d565b905092915050565b60006102e26102f3565b90506102ee82826103be565b919050565b6000604051905090565b600067ffffffffffffffff8211156103185761031761041e565b5b61032182610461565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b82818337600083830152505050565b60005b8381101561037757808201518184015260208101905061035c565b83811115610386576000848401525b50505050565b600060028204905060018216806103a457607f821691505b602082108114156103b8576103b76103ef565b5b50919050565b6103c782610461565b810181811067ffffffffffffffff821117156103e6576103e561041e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f830116905091905056fea26469706673582212206b87cca34f85c7e953d2f3e3d508c02e7fa197a7635cc40f1949364f4cf407de64736f6c63430008070033",
"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 0xB8D64AD8 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0xF20EAEB8 EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x234 JUMP JUMPDEST PUSH2 0x75 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6C SWAP2 SWAP1 PUSH2 0x2B6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x8B SWAP3 SWAP2 SWAP1 PUSH2 0x121 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH2 0x9E SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0xCA SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 ISZERO PUSH2 0x117 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xEC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x117 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xFA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x12D SWAP1 PUSH2 0x38C JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x14F JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x168 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x196 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x195 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x17A JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x1A3 SWAP2 SWAP1 PUSH2 0x1A7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1C0 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1A8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D7 PUSH2 0x1D2 DUP5 PUSH2 0x2FD JUMP JUMPDEST PUSH2 0x2D8 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1F3 JUMPI PUSH2 0x1F2 PUSH2 0x452 JUMP JUMPDEST JUMPDEST PUSH2 0x1FE DUP5 DUP3 DUP6 PUSH2 0x34A JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21B JUMPI PUSH2 0x21A PUSH2 0x44D JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x22B DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1C4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24A JUMPI PUSH2 0x249 PUSH2 0x45C JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x268 JUMPI PUSH2 0x267 PUSH2 0x457 JUMP JUMPDEST JUMPDEST PUSH2 0x274 DUP5 DUP3 DUP6 ADD PUSH2 0x206 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288 DUP3 PUSH2 0x32E JUMP JUMPDEST PUSH2 0x292 DUP2 DUP6 PUSH2 0x339 JUMP JUMPDEST SWAP4 POP PUSH2 0x2A2 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x359 JUMP JUMPDEST PUSH2 0x2AB DUP2 PUSH2 0x461 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2D0 DUP2 DUP5 PUSH2 0x27D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 PUSH2 0x2F3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2EE DUP3 DUP3 PUSH2 0x3BE JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x318 JUMPI PUSH2 0x317 PUSH2 0x41E JUMP JUMPDEST JUMPDEST PUSH2 0x321 DUP3 PUSH2 0x461 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x377 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x35C JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x386 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x3A4 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x3B8 JUMPI PUSH2 0x3B7 PUSH2 0x3EF JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x3C7 DUP3 PUSH2 0x461 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x3E6 JUMPI PUSH2 0x3E5 PUSH2 0x41E JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH12 0x87CCA34F85C7E953D2F3E3D5 ADDMOD 0xC0 0x2E PUSH32 0xA197A7635CC40F1949364F4CF407DE64736F6C63430008070033000000000000 ",
"sourceMap": "63:495:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;278:144;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;430:125;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;278:144;353:8;342;:19;;;;;;;;;;;;:::i;:::-;;278:144;:::o;430:125::-;468:13;501:8;494:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;430:125;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:412:1:-;85:5;110:66;126:49;168:6;126:49;:::i;:::-;110:66;:::i;:::-;101:75;;199:6;192:5;185:21;237:4;230:5;226:16;275:3;266:6;261:3;257:16;254:25;251:112;;;282:79;;:::i;:::-;251:112;372:41;406:6;401:3;396;372:41;:::i;:::-;91:328;7:412;;;;;:::o;439:340::-;495:5;544:3;537:4;529:6;525:17;521:27;511:122;;552:79;;:::i;:::-;511:122;669:6;656:20;694:79;769:3;761:6;754:4;746:6;742:17;694:79;:::i;:::-;685:88;;501:278;439:340;;;;:::o;785:509::-;854:6;903:2;891:9;882:7;878:23;874:32;871:119;;;909:79;;:::i;:::-;871:119;1057:1;1046:9;1042:17;1029:31;1087:18;1079:6;1076:30;1073:117;;;1109:79;;:::i;:::-;1073:117;1214:63;1269:7;1260:6;1249:9;1245:22;1214:63;:::i;:::-;1204:73;;1000:287;785:509;;;;:::o;1300:364::-;1388:3;1416:39;1449:5;1416:39;:::i;:::-;1471:71;1535:6;1530:3;1471:71;:::i;:::-;1464:78;;1551:52;1596:6;1591:3;1584:4;1577:5;1573:16;1551:52;:::i;:::-;1628:29;1650:6;1628:29;:::i;:::-;1623:3;1619:39;1612:46;;1392:272;1300:364;;;;:::o;1670:313::-;1783:4;1821:2;1810:9;1806:18;1798:26;;1870:9;1864:4;1860:20;1856:1;1845:9;1841:17;1834:47;1898:78;1971:4;1962:6;1898:78;:::i;:::-;1890:86;;1670:313;;;;:::o;1989:129::-;2023:6;2050:20;;:::i;:::-;2040:30;;2079:33;2107:4;2099:6;2079:33;:::i;:::-;1989:129;;;:::o;2124:75::-;2157:6;2190:2;2184:9;2174:19;;2124:75;:::o;2205:308::-;2267:4;2357:18;2349:6;2346:30;2343:56;;;2379:18;;:::i;:::-;2343:56;2417:29;2439:6;2417:29;:::i;:::-;2409:37;;2501:4;2495;2491:15;2483:23;;2205:308;;;:::o;2519:99::-;2571:6;2605:5;2599:12;2589:22;;2519:99;;;:::o;2624:169::-;2708:11;2742:6;2737:3;2730:19;2782:4;2777:3;2773:14;2758:29;;2624:169;;;;:::o;2799:154::-;2883:6;2878:3;2873;2860:30;2945:1;2936:6;2931:3;2927:16;2920:27;2799:154;;;:::o;2959:307::-;3027:1;3037:113;3051:6;3048:1;3045:13;3037:113;;;3136:1;3131:3;3127:11;3121:18;3117:1;3112:3;3108:11;3101:39;3073:2;3070:1;3066:10;3061:15;;3037:113;;;3168:6;3165:1;3162:13;3159:101;;;3248:1;3239:6;3234:3;3230:16;3223:27;3159:101;3008:258;2959:307;;;:::o;3272:320::-;3316:6;3353:1;3347:4;3343:12;3333:22;;3400:1;3394:4;3390:12;3421:18;3411:81;;3477:4;3469:6;3465:17;3455:27;;3411:81;3539:2;3531:6;3528:14;3508:18;3505:38;3502:84;;;3558:18;;:::i;:::-;3502:84;3323:269;3272:320;;;:::o;3598:281::-;3681:27;3703:4;3681:27;:::i;:::-;3673:6;3669:40;3811:6;3799:10;3796:22;3775:18;3763:10;3760:34;3757:62;3754:88;;;3822:18;;:::i;:::-;3754:88;3862:10;3858:2;3851:22;3641:238;3598:281;;:::o;3885:180::-;3933:77;3930:1;3923:88;4030:4;4027:1;4020:15;4054:4;4051:1;4044:15;4071:180;4119:77;4116:1;4109:88;4216:4;4213:1;4206:15;4240:4;4237:1;4230:15;4257:117;4366:1;4363;4356:12;4380:117;4489:1;4486;4479:12;4503:117;4612:1;4609;4602:12;4626:117;4735:1;4732;4725:12;4749:102;4790:6;4841:2;4837:7;4832:2;4825:5;4821:14;4817:28;4807:38;;4749:102;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "238400",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"output()": "infinite",
"setWelcomeText(string)": "infinite"
}
},
"methodIdentifiers": {
"output()": "f20eaeb8",
"setWelcomeText(string)": "b8d64ad8"
}
},
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "output",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_message",
"type": "string"
}
],
"name": "setWelcomeText",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "output",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_message",
"type": "string"
}
],
"name": "setWelcomeText",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/HelloWorld.sol": "HelloWorld"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/HelloWorld.sol": {
"keccak256": "0x4c5efc8a7b14d1a47f880096618966ebdf15e0f8b60b6808812b5f69a5a323d4",
"license": "MIT",
"urls": [
"bzz-raw://8617835f3444ecc2e1cf458806e5a8dcd1a26f5cecc9a7234bd23927887e2f6a",
"dweb:/ipfs/QmVCcWn38XgUAgJiKrnNGW5QPqieEhRDjrPxea431VWnC7"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.7;
contract HelloWorld {
string greeting; // Initializing the string type
constructor() public {
greeting = "Hello World"; //calling the string type and setting it to a default value
}
function setWelcomeText(string memory _message) public{
greeting = _message; // setting input to change default value of greeting
}
function output() public view returns(string memory) {
return greeting; // new input will be returned to user
}
}
// 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