diff --git a/packages/core/.prettierignore b/packages/core/.prettierignore index 494507c07..faea8b6ac 100644 --- a/packages/core/.prettierignore +++ b/packages/core/.prettierignore @@ -5,5 +5,4 @@ /temp /test-integrations/fixture-projects/*/artifacts /test-integrations/fixture-projects/*/cache -/test/mocks/verify/*/artifacts -/test/mocks/verify/*/build-info +/test/mocks/* diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index dbbe347f5..c2e063414 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -4,6 +4,7 @@ export { deploy } from "./deploy"; export * from "./errors"; export { IgnitionModuleSerializer } from "./ignition-module-serializer"; export { formatSolidityParameter } from "./internal/formatters"; +export { listDeployments } from "./list-deployments"; export { status } from "./status"; export * from "./type-guards"; export * from "./types/artifact"; diff --git a/packages/core/src/internal/views/find-status.ts b/packages/core/src/internal/views/find-status.ts index 0f2bfdbe6..a80ecf652 100644 --- a/packages/core/src/internal/views/find-status.ts +++ b/packages/core/src/internal/views/find-status.ts @@ -16,14 +16,16 @@ import { assertIgnitionInvariant } from "../utils/assertions"; export function findStatus( deploymentState: DeploymentState ): Omit { + const executionStates = Object.values(deploymentState.executionStates); + return { - started: Object.values(deploymentState.executionStates) + started: executionStates .filter((ex) => ex.status === ExecutionStatus.STARTED) .map((ex) => ex.id), - successful: Object.values(deploymentState.executionStates) + successful: executionStates .filter((ex) => ex.status === ExecutionStatus.SUCCESS) .map((ex) => ex.id), - held: Object.values(deploymentState.executionStates) + held: executionStates .filter(canFail) .filter((ex) => ex.status === ExecutionStatus.HELD) .map((ex) => { @@ -43,14 +45,14 @@ export function findStatus( reason: ex.result.reason, }; }), - timedOut: Object.values(deploymentState.executionStates) + timedOut: executionStates .filter(canTimeout) .filter((ex) => ex.status === ExecutionStatus.TIMEOUT) .map((ex) => ({ futureId: ex.id, networkInteractionId: ex.networkInteractions.at(-1)!.id, })), - failed: Object.values(deploymentState.executionStates) + failed: executionStates .filter(canFail) .filter((ex) => ex.status === ExecutionStatus.FAILED) .map((ex) => { diff --git a/packages/core/src/list-deployments.ts b/packages/core/src/list-deployments.ts new file mode 100644 index 000000000..064b44696 --- /dev/null +++ b/packages/core/src/list-deployments.ts @@ -0,0 +1,18 @@ +import { readdir, pathExists } from "fs-extra"; + +/** + * Return a list of all deployments in the deployment directory. + * + * @param deploymentDir - the directory of the deployments + * + * @beta + */ +export async function listDeployments( + deploymentDir: string +): Promise { + if (!(await pathExists(deploymentDir))) { + return []; + } + + return readdir(deploymentDir); +} diff --git a/packages/core/src/status.ts b/packages/core/src/status.ts index 7ec89f2d8..2222dc996 100644 --- a/packages/core/src/status.ts +++ b/packages/core/src/status.ts @@ -4,16 +4,22 @@ import { ERRORS } from "./internal/errors-list"; import { loadDeploymentState } from "./internal/execution/deployment-state-helpers"; import { findDeployedContracts } from "./internal/views/find-deployed-contracts"; import { findStatus } from "./internal/views/find-status"; +import { ArtifactResolver } from "./types/artifact"; import { StatusResult } from "./types/status"; /** * Show the status of a deployment. * * @param deploymentDir - the directory of the deployment to get the status of + * @param artifactResolver - the artifact resolver to use when loading artifacts + * for a future * * @beta */ -export async function status(deploymentDir: string): Promise { +export async function status( + deploymentDir: string, + artifactResolver: Omit +): Promise { const deploymentLoader = new FileDeploymentLoader(deploymentDir); const deploymentState = await loadDeploymentState(deploymentLoader); @@ -25,7 +31,24 @@ export async function status(deploymentDir: string): Promise { } const futureStatuses = findStatus(deploymentState); - const contracts = findDeployedContracts(deploymentState); + const deployedContracts = findDeployedContracts(deploymentState); + + const contracts: StatusResult["contracts"] = {}; + + for (const [futureId, deployedContract] of Object.entries( + deployedContracts + )) { + const artifact = await artifactResolver.loadArtifact( + deployedContract.contractName + ); + + contracts[futureId] = { + ...deployedContract, + contractName: artifact.contractName, + sourceName: artifact.sourceName, + abi: artifact.abi, + }; + } const statusResult: StatusResult = { ...futureStatuses, diff --git a/packages/core/src/types/status.ts b/packages/core/src/types/status.ts index f50264042..c1005591a 100644 --- a/packages/core/src/types/status.ts +++ b/packages/core/src/types/status.ts @@ -1,5 +1,16 @@ +import { Abi } from "./artifact"; import { DeployedContract, ExecutionErrorDeploymentResult } from "./deploy"; +/** + * The information of a deployed contract. + * + * @beta + */ +export interface GenericContractInfo extends DeployedContract { + sourceName: string; + abi: Abi; +} + /** * The result of requesting the status of a deployment. It lists the futures * broken down by their status, and includes the deployed contracts. @@ -9,6 +20,6 @@ import { DeployedContract, ExecutionErrorDeploymentResult } from "./deploy"; export interface StatusResult extends Omit { contracts: { - [key: string]: DeployedContract; + [key: string]: GenericContractInfo; }; } diff --git a/packages/core/test/listDeployments.ts b/packages/core/test/listDeployments.ts new file mode 100644 index 000000000..e6b46ac6f --- /dev/null +++ b/packages/core/test/listDeployments.ts @@ -0,0 +1,38 @@ +import { assert } from "chai"; +import path from "path"; + +import { listDeployments } from "../src"; + +describe("listDeployments", () => { + it("should return an empty array if given a directory that doesn't exist", async () => { + const result = await listDeployments("nonexistant"); + + assert.deepEqual(result, []); + }); + + it("should return an empty array if given a directory containing no deployments", async () => { + const deploymentDir = path.join( + __dirname, + "mocks", + "listDeployments", + "no-deployments" + ); + + const result = await listDeployments(deploymentDir); + + assert.deepEqual(result, []); + }); + + it("should return an array of deployment IDs if given a directory containing deployments", async () => { + const deploymentDir = path.join( + __dirname, + "mocks", + "listDeployments", + "has-deployments" + ); + + const result = await listDeployments(deploymentDir); + + assert.deepEqual(result, ["chain-1", "chain-2"]); + }); +}); diff --git a/packages/core/test/mocks/listDeployments/has-deployments/chain-1/blank b/packages/core/test/mocks/listDeployments/has-deployments/chain-1/blank new file mode 100644 index 000000000..e69de29bb diff --git a/packages/core/test/mocks/listDeployments/has-deployments/chain-2/blank b/packages/core/test/mocks/listDeployments/has-deployments/chain-2/blank new file mode 100644 index 000000000..e69de29bb diff --git a/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.dbg.json b/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.dbg.json new file mode 100644 index 000000000..cc601cb6f --- /dev/null +++ b/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/a119b7bb4b3dd21e4ae94d5054092087.json" +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.json b/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.json new file mode 100644 index 000000000..81cc1e2c3 --- /dev/null +++ b/packages/core/test/mocks/status/success/artifacts/LockModule#Lock.json @@ -0,0 +1,74 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Lock", + "sourceName": "contracts/Lock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/success/build-info/a119b7bb4b3dd21e4ae94d5054092087.json b/packages/core/test/mocks/status/success/build-info/a119b7bb4b3dd21e4ae94d5054092087.json new file mode 100644 index 000000000..b757a976d --- /dev/null +++ b/packages/core/test/mocks/status/success/build-info/a119b7bb4b3dd21e4ae94d5054092087.json @@ -0,0 +1,3792 @@ +{ + "id": "a119b7bb4b3dd21e4ae94d5054092087", + "_format": "hh-sol-build-info-1", + "solcVersion": "0.8.19", + "solcLongVersion": "0.8.19+commit.7dd6d404", + "input": { + "language": "Solidity", + "sources": { + "contracts/Lock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\n// Uncomment this line to use console.log\n// import \"hardhat/console.sol\";\n\ncontract Lock {\n uint public unlockTime;\n address payable public owner;\n\n event Withdrawal(uint amount, uint when);\n\n constructor(uint _unlockTime) payable {\n require(\n block.timestamp < _unlockTime,\n \"Unlock time should be in the future\"\n );\n\n unlockTime = _unlockTime;\n owner = payable(msg.sender);\n }\n\n function withdraw() public {\n // Uncomment this line, and the import of \"hardhat/console.sol\", to print a log in your terminal\n // console.log(\"Unlock time is %o and block timestamp is %o\", unlockTime, block.timestamp);\n\n require(block.timestamp >= unlockTime, \"You can't withdraw yet\");\n require(msg.sender == owner, \"You aren't the owner\");\n\n emit Withdrawal(address(this).balance, block.timestamp);\n\n owner.transfer(address(this).balance);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ], + "": [ + "ast" + ] + } + } + } + }, + "output": { + "sources": { + "contracts/Lock.sol": { + "ast": { + "absolutePath": "contracts/Lock.sol", + "exportedSymbols": { + "Lock": [ + 78 + ] + }, + "id": 79, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".9" + ], + "nodeType": "PragmaDirective", + "src": "39:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Lock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 78, + "linearizedBaseContracts": [ + 78 + ], + "name": "Lock", + "nameLocation": "149:4:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "251c1aa3", + "id": 3, + "mutability": "mutable", + "name": "unlockTime", + "nameLocation": "170:10:0", + "nodeType": "VariableDeclaration", + "scope": 78, + "src": "158:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "158:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8da5cb5b", + "id": 5, + "mutability": "mutable", + "name": "owner", + "nameLocation": "207:5:0", + "nodeType": "VariableDeclaration", + "scope": 78, + "src": "184:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "184:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "eventSelector": "bf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93", + "id": 11, + "name": "Withdrawal", + "nameLocation": "223:10:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 10, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "239:6:0", + "nodeType": "VariableDeclaration", + "scope": 11, + "src": "234:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "234:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 9, + "indexed": false, + "mutability": "mutable", + "name": "when", + "nameLocation": "252:4:0", + "nodeType": "VariableDeclaration", + "scope": 11, + "src": "247:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "247:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "233:24:0" + }, + "src": "217:41:0" + }, + { + "body": { + "id": 36, + "nodeType": "Block", + "src": "300:170:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 17, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "321:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "327:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "321:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 19, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "339:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "321:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574757265", + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "358:37:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + }, + "value": "Unlock time should be in the future" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + } + ], + "id": 16, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "306:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "306:95:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 23, + "nodeType": "ExpressionStatement", + "src": "306:95:0" + }, + { + "expression": { + "id": 26, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 24, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "408:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 25, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "421:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "408:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27, + "nodeType": "ExpressionStatement", + "src": "408:24:0" + }, + { + "expression": { + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 28, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "438:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 31, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "454:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "458:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "454:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 30, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "446:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "446:8:0", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 33, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "446:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "438:27:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 35, + "nodeType": "ExpressionStatement", + "src": "438:27:0" + } + ] + }, + "id": 37, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 14, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13, + "mutability": "mutable", + "name": "_unlockTime", + "nameLocation": "279:11:0", + "nodeType": "VariableDeclaration", + "scope": 37, + "src": "274:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "274:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "273:18:0" + }, + "returnParameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:0:0" + }, + "scope": 78, + "src": "262:208:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 76, + "nodeType": "Block", + "src": "501:437:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 41, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "713:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "719:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "713:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 43, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "732:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "713:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "744:24:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + }, + "value": "You can't withdraw yet" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + } + ], + "id": 40, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "705:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47, + "nodeType": "ExpressionStatement", + "src": "705:64:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 49, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "783:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "787:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "783:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 51, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "797:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "783:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:22:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + }, + "value": "You aren't the owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + } + ], + "id": 48, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "775:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "775:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 55, + "nodeType": "ExpressionStatement", + "src": "775:52:0" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 59, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "858:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$78", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$78", + "typeString": "contract Lock" + } + ], + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "850:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "850:7:0", + "typeDescriptions": {} + } + }, + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "850:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "864:7:0", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "850:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 62, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "873:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "879:9:0", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "873:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 56, + "name": "Withdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "839:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "839:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65, + "nodeType": "EmitStatement", + "src": "834:55:0" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 71, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "919:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$78", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$78", + "typeString": "contract Lock" + } + ], + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "911:7:0", + "typeDescriptions": {} + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "911:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 73, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "925:7:0", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "911:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 66, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "896:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "902:8:0", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "896:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 75, + "nodeType": "ExpressionStatement", + "src": "896:37:0" + } + ] + }, + "functionSelector": "3ccfd60b", + "id": 77, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "483:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 38, + "nodeType": "ParameterList", + "parameters": [], + "src": "491:2:0" + }, + "returnParameters": { + "id": 39, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:0" + }, + "scope": 78, + "src": "474:464:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 79, + "src": "140:800:0", + "usedErrors": [] + } + ], + "src": "39:902:0" + }, + "id": 0 + } + }, + "contracts": { + "contracts/Lock.sol": { + "Lock": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": { + "@_37": { + "entryPoint": null, + "id": 37, + "parameterSlots": 1, + "returnSlots": 0 + }, + "abi_decode_t_uint256_fromMemory": { + "entryPoint": 219, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 240, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack": { + "entryPoint": 381, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 416, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "allocate_unbounded": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 285, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 186, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "entryPoint": 181, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413": { + "entryPoint": 302, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "validator_revert_t_uint256": { + "entryPoint": 196, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:2248: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:32:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:1", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:1" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:1" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:1", + "type": "" + } + ], + "src": "334:77:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:1", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:1" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:1" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:1" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:1" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:1" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:1" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:1" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:1" + }, + "nodeType": "YulIf", + "src": "470:63:1" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:1", + "type": "" + } + ], + "src": "417:122:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "608:80:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "618:22:1", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "633:6:1" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "627:5:1" + }, + "nodeType": "YulFunctionCall", + "src": "627:13:1" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "618:5:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "676:5:1" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "649:26:1" + }, + "nodeType": "YulFunctionCall", + "src": "649:33:1" + }, + "nodeType": "YulExpressionStatement", + "src": "649:33:1" + } + ] + }, + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "586:6:1", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "594:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "602:5:1", + "type": "" + } + ], + "src": "545:143:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "771:274:1", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "817:83:1", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "819:77:1" + }, + "nodeType": "YulFunctionCall", + "src": "819:79:1" + }, + "nodeType": "YulExpressionStatement", + "src": "819:79:1" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "792:7:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "801:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "788:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "788:23:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "813:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "784:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "784:32:1" + }, + "nodeType": "YulIf", + "src": "781:119:1" + }, + { + "nodeType": "YulBlock", + "src": "910:128:1", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "925:15:1", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "939:1:1", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "929:6:1", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "954:74:1", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1000:9:1" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1011:6:1" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "996:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "996:22:1" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1020:7:1" + } + ], + "functionName": { + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulIdentifier", + "src": "964:31:1" + }, + "nodeType": "YulFunctionCall", + "src": "964:64:1" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "954:6:1" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "741:9:1", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "752:7:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "764:6:1", + "type": "" + } + ], + "src": "694:351:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1147:73:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1164:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1169:6:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1157:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1157:19:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1157:19:1" + }, + { + "nodeType": "YulAssignment", + "src": "1185:29:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1204:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1209:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1200:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1200:14:1" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1185:11:1" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1119:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1124:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1135:11:1", + "type": "" + } + ], + "src": "1051:169:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1332:116:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1354:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1362:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1350:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1350:14:1" + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1366:34:1", + "type": "", + "value": "Unlock time should be in the fut" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1343:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1343:58:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1343:58:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1422:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1430:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1418:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1418:15:1" + }, + { + "hexValue": "757265", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1435:5:1", + "type": "", + "value": "ure" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1411:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1411:30:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1411:30:1" + } + ] + }, + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1324:6:1", + "type": "" + } + ], + "src": "1226:222:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1600:220:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1610:74:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1676:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1681:2:1", + "type": "", + "value": "35" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1617:58:1" + }, + "nodeType": "YulFunctionCall", + "src": "1617:67:1" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1610:3:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1782:3:1" + } + ], + "functionName": { + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulIdentifier", + "src": "1693:88:1" + }, + "nodeType": "YulFunctionCall", + "src": "1693:93:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1693:93:1" + }, + { + "nodeType": "YulAssignment", + "src": "1795:19:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1806:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1811:2:1", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1802:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1802:12:1" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1795:3:1" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1588:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1596:3:1", + "type": "" + } + ], + "src": "1454:366:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1997:248:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2007:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2019:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2030:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2015:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2015:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2007:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2054:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2065:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2050:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2050:17:1" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2073:4:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2079:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2069:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2069:20:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2043:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "2043:47:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2043:47:1" + }, + { + "nodeType": "YulAssignment", + "src": "2099:139:1", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2233:4:1" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2107:124:1" + }, + "nodeType": "YulFunctionCall", + "src": "2107:131:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2099:4:1" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1977:9:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1992:4:1", + "type": "" + } + ], + "src": "1826:419: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_uint256(value) -> cleaned {\n cleaned := value\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_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_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_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\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_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(memPtr) {\n\n mstore(add(memPtr, 0), \"Unlock time should be in the fut\")\n\n mstore(add(memPtr, 32), \"ure\")\n\n }\n\n function abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__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_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n", + "id": 1, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5D8 CODESIZE SUB DUP1 PUSH2 0x5D8 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x25 SWAP2 SWAP1 PUSH2 0xF0 JUMP JUMPDEST DUP1 TIMESTAMP LT PUSH2 0x67 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5E SWAP1 PUSH2 0x1A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP CALLER PUSH1 0x1 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP PUSH2 0x1C0 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xCD DUP2 PUSH2 0xBA JUMP JUMPDEST DUP2 EQ PUSH2 0xD8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xEA DUP2 PUSH2 0xC4 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x106 JUMPI PUSH2 0x105 PUSH2 0xB5 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x114 DUP5 DUP3 DUP6 ADD PUSH2 0xDB JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x556E6C6F636B2074696D652073686F756C6420626520696E2074686520667574 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x7572650000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x18A PUSH1 0x23 DUP4 PUSH2 0x11D JUMP JUMPDEST SWAP2 POP PUSH2 0x195 DUP3 PUSH2 0x12E 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 0x1B9 DUP2 PUSH2 0x17D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x409 DUP1 PUSH2 0x1CF 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 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 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 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 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 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E 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 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:0:-:0;;;262:208;;;;;;;;;;;;;;;;;;;;;:::i;:::-;339:11;321:15;:29;306:95;;;;;;;;;;;;:::i;:::-;;;;;;;;;421:11;408:10;:24;;;;454:10;438:5;;:27;;;;;;;;;;;;;;;;;;262:208;140:800;;88:117:1;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:143::-;602:5;633:6;627:13;618:22;;649:33;676:5;649:33;:::i;:::-;545:143;;;;:::o;694:351::-;764:6;813:2;801:9;792:7;788:23;784:32;781:119;;;819:79;;:::i;:::-;781:119;939:1;964:64;1020:7;1011:6;1000:9;996:22;964:64;:::i;:::-;954:74;;910:128;694:351;;;;:::o;1051:169::-;1135:11;1169:6;1164:3;1157:19;1209:4;1204:3;1200:14;1185:29;;1051:169;;;;:::o;1226:222::-;1366:34;1362:1;1354:6;1350:14;1343:58;1435:5;1430:2;1422:6;1418:15;1411:30;1226:222;:::o;1454:366::-;1596:3;1617:67;1681:2;1676:3;1617:67;:::i;:::-;1610:74;;1693:93;1782:3;1693:93;:::i;:::-;1811:2;1806:3;1802:12;1795:19;;1454:366;;;:::o;1826:419::-;1992:4;2030:2;2019:9;2015:18;2007:26;;2079:9;2073:4;2069:20;2065:1;2054:9;2050:17;2043:47;2107:131;2233:4;2107:131;:::i;:::-;2099:139;;1826:419;;;:::o;140:800:0:-;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@owner_5": { + "entryPoint": 523, + "id": 5, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@unlockTime_3": { + "entryPoint": 140, + "id": 3, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdraw_77": { + "entryPoint": 146, + "id": 77, + "parameterSlots": 0, + "returnSlots": 0 + }, + "abi_encode_t_address_payable_to_t_address_payable_fromStack": { + "entryPoint": 663, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack": { + "entryPoint": 763, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack": { + "entryPoint": 871, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "entryPoint": 571, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed": { + "entryPoint": 678, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 798, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 906, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": 586, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed": { + "entryPoint": 938, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 705, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_address_payable": { + "entryPoint": 645, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint160": { + "entryPoint": 613, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 561, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8": { + "entryPoint": 722, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a": { + "entryPoint": 830, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:3550: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": "627:51:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "637:35:1", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "666:5:1" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "648:17:1" + }, + "nodeType": "YulFunctionCall", + "src": "648:24:1" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "637:7:1" + } + ] + } + ] + }, + "name": "cleanup_t_address_payable", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "609:5:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "619:7:1", + "type": "" + } + ], + "src": "574:104:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "765:61:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "782:3:1" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "813:5:1" + } + ], + "functionName": { + "name": "cleanup_t_address_payable", + "nodeType": "YulIdentifier", + "src": "787:25:1" + }, + "nodeType": "YulFunctionCall", + "src": "787:32:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "775:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "775:45:1" + }, + "nodeType": "YulExpressionStatement", + "src": "775:45:1" + } + ] + }, + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "753:5:1", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "760:3:1", + "type": "" + } + ], + "src": "684:142:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "946:140:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "956:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "968:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "979:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "964:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "964:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "956:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1052:6:1" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1065:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1076:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1061:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1061:17:1" + } + ], + "functionName": { + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulIdentifier", + "src": "992:59:1" + }, + "nodeType": "YulFunctionCall", + "src": "992:87:1" + }, + "nodeType": "YulExpressionStatement", + "src": "992:87:1" + } + ] + }, + "name": "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "918:9:1", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "930:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "941:4:1", + "type": "" + } + ], + "src": "832:254:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1188:73:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1205:3:1" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1210:6:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1198:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1198:19:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1198:19:1" + }, + { + "nodeType": "YulAssignment", + "src": "1226:29:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1245:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1250:4:1", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1241:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1241:14:1" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1226:11:1" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1160:3:1", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1165:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1176:11:1", + "type": "" + } + ], + "src": "1092:169:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1373:66:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1395:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1403:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1391:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1391:14:1" + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1407:24:1", + "type": "", + "value": "You can't withdraw yet" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1384:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "1384:48:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1384:48:1" + } + ] + }, + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1365:6:1", + "type": "" + } + ], + "src": "1267:172:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1591:220:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1601:74:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1667:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1672:2:1", + "type": "", + "value": "22" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1608:58:1" + }, + "nodeType": "YulFunctionCall", + "src": "1608:67:1" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1601:3:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1773:3:1" + } + ], + "functionName": { + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulIdentifier", + "src": "1684:88:1" + }, + "nodeType": "YulFunctionCall", + "src": "1684:93:1" + }, + "nodeType": "YulExpressionStatement", + "src": "1684:93:1" + }, + { + "nodeType": "YulAssignment", + "src": "1786:19:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1797:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1802:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1793:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "1793:12:1" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1786:3:1" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1579:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1587:3:1", + "type": "" + } + ], + "src": "1445:366:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1988:248:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1998:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2010:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2021:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2006:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2006:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1998:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2045:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2056:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2041:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2041:17:1" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2064:4:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2070:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2060:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2060:20:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2034:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "2034:47:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2034:47:1" + }, + { + "nodeType": "YulAssignment", + "src": "2090:139:1", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2224:4:1" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2098:124:1" + }, + "nodeType": "YulFunctionCall", + "src": "2098:131:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2090:4:1" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1968:9:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1983:4:1", + "type": "" + } + ], + "src": "1817:419:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2348:64:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2370:6:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2378:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2366:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2366:14:1" + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "2382:22:1", + "type": "", + "value": "You aren't the owner" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2359:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "2359:46:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2359:46:1" + } + ] + }, + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2340:6:1", + "type": "" + } + ], + "src": "2242:170:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2564:220:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2574:74:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2640:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2645:2:1", + "type": "", + "value": "20" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2581:58:1" + }, + "nodeType": "YulFunctionCall", + "src": "2581:67:1" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2574:3:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2746:3:1" + } + ], + "functionName": { + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulIdentifier", + "src": "2657:88:1" + }, + "nodeType": "YulFunctionCall", + "src": "2657:93:1" + }, + "nodeType": "YulExpressionStatement", + "src": "2657:93:1" + }, + { + "nodeType": "YulAssignment", + "src": "2759:19:1", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2770:3:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2775:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2766:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2766:12:1" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2759:3:1" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2552:3:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2560:3:1", + "type": "" + } + ], + "src": "2418:366:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2961:248:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2971:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2983:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2994:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2979:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "2979:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2971:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3018:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3029:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3014:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3014:17:1" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3037:4:1" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3043:9:1" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3033:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3033:20:1" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3007:6:1" + }, + "nodeType": "YulFunctionCall", + "src": "3007:47:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3007:47:1" + }, + { + "nodeType": "YulAssignment", + "src": "3063:139:1", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3197:4:1" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3071:124:1" + }, + "nodeType": "YulFunctionCall", + "src": "3071:131:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3063:4:1" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2941:9:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2956:4:1", + "type": "" + } + ], + "src": "2790:419:1" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3341:206:1", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3351:26:1", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3363:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3374:2:1", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3359:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3359:18:1" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3351:4:1" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "3431:6:1" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3444:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3455:1:1", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3440:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3440:17:1" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3387:43:1" + }, + "nodeType": "YulFunctionCall", + "src": "3387:71:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3387:71:1" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "3512:6:1" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3525:9:1" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3536:2:1", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3521:3:1" + }, + "nodeType": "YulFunctionCall", + "src": "3521:18:1" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3468:43:1" + }, + "nodeType": "YulFunctionCall", + "src": "3468:72:1" + }, + "nodeType": "YulExpressionStatement", + "src": "3468:72:1" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3305:9:1", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "3317:6:1", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "3325:6:1", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3336:4:1", + "type": "" + } + ], + "src": "3215:332: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_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_payable_to_t_address_payable_fromStack(value, pos) {\n mstore(pos, cleanup_t_address_payable(value))\n }\n\n function abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_payable_to_t_address_payable_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_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(memPtr) {\n\n mstore(add(memPtr, 0), \"You can't withdraw yet\")\n\n }\n\n function abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 22)\n store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__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_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(memPtr) {\n\n mstore(add(memPtr, 0), \"You aren't the owner\")\n\n }\n\n function abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 20)\n store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__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_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n }\n\n}\n", + "id": 1, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": {}, + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 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 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 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 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E 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 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;474:464;;;:::i;:::-;;184:28;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;158:22;;;;:::o;474:464::-;732:10;;713:15;:29;;705:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;797:5;;;;;;;;;;;783:19;;:10;:19;;;775:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;839:50;850:21;873:15;839:50;;;;;;;:::i;:::-;;;;;;;;896:5;;;;;;;;;;;:14;;:37;911:21;896:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;474:464::o;184:28::-;;;;;;;;;;;;;:::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:104::-;619:7;648:24;666:5;648:24;:::i;:::-;637:35;;574:104;;;:::o;684:142::-;787:32;813:5;787:32;:::i;:::-;782:3;775:45;684:142;;:::o;832:254::-;941:4;979:2;968:9;964:18;956:26;;992:87;1076:1;1065:9;1061:17;1052:6;992:87;:::i;:::-;832:254;;;;:::o;1092:169::-;1176:11;1210:6;1205:3;1198:19;1250:4;1245:3;1241:14;1226:29;;1092:169;;;;:::o;1267:172::-;1407:24;1403:1;1395:6;1391:14;1384:48;1267:172;:::o;1445:366::-;1587:3;1608:67;1672:2;1667:3;1608:67;:::i;:::-;1601:74;;1684:93;1773:3;1684:93;:::i;:::-;1802:2;1797:3;1793:12;1786:19;;1445:366;;;:::o;1817:419::-;1983:4;2021:2;2010:9;2006:18;1998:26;;2070:9;2064:4;2060:20;2056:1;2045:9;2041:17;2034:47;2098:131;2224:4;2098:131;:::i;:::-;2090:139;;1817:419;;;:::o;2242:170::-;2382:22;2378:1;2370:6;2366:14;2359:46;2242:170;:::o;2418:366::-;2560:3;2581:67;2645:2;2640:3;2581:67;:::i;:::-;2574:74;;2657:93;2746:3;2657:93;:::i;:::-;2775:2;2770:3;2766:12;2759:19;;2418:366;;;:::o;2790:419::-;2956:4;2994:2;2983:9;2979:18;2971:26;;3043:9;3037:4;3033:20;3029:1;3018:9;3014:17;3007:47;3071:131;3197:4;3071:131;:::i;:::-;3063:139;;2790:419;;;:::o;3215:332::-;3336:4;3374:2;3363:9;3359:18;3351:26;;3387:71;3455:1;3444:9;3440:17;3431:6;3387:71;:::i;:::-;3468:72;3536:2;3525:9;3521:18;3512:6;3468:72;:::i;:::-;3215:332;;;;;:::o" + }, + "methodIdentifiers": { + "owner()": "8da5cb5b", + "unlockTime()": "251c1aa3", + "withdraw()": "3ccfd60b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unlockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"when\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Lock.sol\":\"Lock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Lock.sol\":{\"keccak256\":\"0x290d672235b22ec4740c076ad0108b37f5d3073810f5c7d502d90c72591ee9dc\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3d74a8be6305243875a1e4bb2c8fcbd29672aa20a3781595cfbee6b743358b6b\",\"dweb:/ipfs/QmVWAacJB7wL7fBhAyvyqJLWDCEL9vMfwEeR3ydxtsprLf\"]}},\"version\":1}" + } + } + } + } +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/success/deployed_addresses.json b/packages/core/test/mocks/status/success/deployed_addresses.json new file mode 100644 index 000000000..c9458b58b --- /dev/null +++ b/packages/core/test/mocks/status/success/deployed_addresses.json @@ -0,0 +1,3 @@ +{ + "LockModule#Lock": "0x5FbDB2315678afecb367f032d93F642f64180aa3" +} diff --git a/packages/core/test/mocks/status/success/journal.jsonl b/packages/core/test/mocks/status/success/journal.jsonl new file mode 100644 index 000000000..960fcf146 --- /dev/null +++ b/packages/core/test/mocks/status/success/journal.jsonl @@ -0,0 +1,7 @@ + +{"chainId":1,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"LockModule#Lock","constructorArgs":[1987909200],"contractName":"Lock","dependencies":[],"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","futureId":"LockModule#Lock","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"1000000000"}} +{"futureId":"LockModule#Lock","networkInteraction":{"data":"0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c6343000813003300000000000000000000000000000000000000000000000000000000767d1650","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"1000000000"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"LockModule#Lock","networkInteractionId":1,"nonce":0,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"3000000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000000"}},"hash":"0x785b3940e12d7876bd3dfc01b906ebd9faf7438a0e35eda5323ac3c6c5ca0b9e"},"type":"TRANSACTION_SEND"} +{"futureId":"LockModule#Lock","hash":"0x785b3940e12d7876bd3dfc01b906ebd9faf7438a0e35eda5323ac3c6c5ca0b9e","networkInteractionId":1,"receipt":{"blockHash":"0xb4d7a7cb1e9c67a4fa86f0ff358243f756201a7e2200f45b9c1b0d97c251151a","blockNumber":1,"contractAddress":"0x5FbDB2315678afecb367f032d93F642f64180aa3","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"LockModule#Lock","result":{"address":"0x5FbDB2315678afecb367f032d93F642f64180aa3","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/packages/core/test/status.ts b/packages/core/test/status.ts new file mode 100644 index 000000000..118823081 --- /dev/null +++ b/packages/core/test/status.ts @@ -0,0 +1,52 @@ +import { assert } from "chai"; +import path from "path"; + +import { Artifact, status } from "../src"; + +import { setupMockArtifactResolver } from "./helpers"; + +describe("status", () => { + it("should return a status result for a successful deployment", async () => { + const expectedResult = { + started: [], + successful: ["LockModule#Lock"], + held: [], + timedOut: [], + failed: [], + contracts: { + "LockModule#Lock": { + id: "LockModule#Lock", + contractName: "ArtifactLock", + address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", + sourceName: "contracts/ArtifactLock.sol", + abi: ["test"], + }, + }, + }; + + const fakeArtifact: Artifact = { + abi: ["test"], + contractName: "ArtifactLock", + sourceName: "contracts/ArtifactLock.sol", + bytecode: "", + linkReferences: {}, + }; + + const deploymentDir = path.join(__dirname, "mocks", "status", "success"); + + const artifactResolver = setupMockArtifactResolver({ Lock: fakeArtifact }); + + const result = await status(deploymentDir, artifactResolver); + + assert.deepEqual(result, expectedResult); + }); + + it("should throw an error if the deployment is not initialized", async () => { + const artifactResolver = setupMockArtifactResolver(); + + await assert.isRejected( + status("fake", artifactResolver), + /IGN800: Cannot get status for nonexistant deployment at fake/ + ); + }); +}); diff --git a/packages/hardhat-plugin/src/index.ts b/packages/hardhat-plugin/src/index.ts index 7b1090cb7..5037e6a0c 100644 --- a/packages/hardhat-plugin/src/index.ts +++ b/packages/hardhat-plugin/src/index.ts @@ -334,15 +334,21 @@ ignitionScope .setAction(async ({ deploymentId }: { deploymentId: string }, hre) => { const { status } = await import("@nomicfoundation/ignition-core"); + const { HardhatArtifactResolver } = await import( + "./hardhat-artifact-resolver" + ); + const deploymentDir = path.join( hre.config.paths.ignition, "deployments", deploymentId ); + const artifactResolver = new HardhatArtifactResolver(hre); + let statusResult: StatusResult; try { - statusResult = await status(deploymentDir); + statusResult = await status(deploymentDir, artifactResolver); } catch (e) { if (e instanceof IgnitionError && shouldBeHardhatPluginError(e)) { throw new NomicLabsHardhatPluginError("hardhat-ignition", e.message, e); @@ -354,6 +360,29 @@ ignitionScope console.log(calculateDeploymentStatusDisplay(deploymentId, statusResult)); }); +ignitionScope + .task("deployments") + .setDescription("List all deployment IDs") + .setAction(async (_, hre) => { + const { listDeployments } = await import("@nomicfoundation/ignition-core"); + + const deploymentDir = path.join(hre.config.paths.ignition, "deployments"); + + try { + const deployments = await listDeployments(deploymentDir); + + for (const deploymentId of deployments) { + console.log(deploymentId); + } + } catch (e) { + if (e instanceof IgnitionError && shouldBeHardhatPluginError(e)) { + throw new NomicLabsHardhatPluginError("hardhat-ignition", e.message, e); + } + + throw e; + } + }); + ignitionScope .task("wipe") .addPositionalParam( diff --git a/packages/hardhat-plugin/test/deploy/reset.ts b/packages/hardhat-plugin/test/deploy/reset.ts index b7155c129..2615060f1 100644 --- a/packages/hardhat-plugin/test/deploy/reset.ts +++ b/packages/hardhat-plugin/test/deploy/reset.ts @@ -1,6 +1,7 @@ import { status } from "@nomicfoundation/ignition-core"; import { assert } from "chai"; +import { HardhatArtifactResolver } from "../../src/hardhat-artifact-resolver"; import { useFileIgnitionProject } from "../test-helpers/use-ignition-project"; describe("reset flag", function () { @@ -27,7 +28,8 @@ describe("reset flag", function () { } ); - const result = await status(this.deploymentDir!); + const artifactResolver = new HardhatArtifactResolver(this.hre); + const result = await status(this.deploymentDir!, artifactResolver); // ResetModule#B will only be in the success list if the second // run ran without any reconciliation errors - so the retry diff --git a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts index b226bbb67..a93878848 100644 --- a/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts +++ b/packages/hardhat-plugin/test/ui/helpers/calculate-deployment-status-display.ts @@ -37,11 +37,15 @@ describe("ui - calculate deployment status display", () => { id: "MyModule#Token", address: exampleAddress, contractName: "Token", + sourceName: "contracts/Token.sol", + abi: [], }, "MyModule#AnotherToken": { id: "MyModule#AnotherToken", address: differentAddress, contractName: "AnotherToken", + sourceName: "contracts/AnotherToken.sol", + abi: [], }, }, }; @@ -130,11 +134,15 @@ describe("ui - calculate deployment status display", () => { id: "MyModule#Token", address: exampleAddress, contractName: "Token", + sourceName: "contracts/Token.sol", + abi: [], }, "MyModule#AnotherToken": { id: "MyModule#AnotherToken", address: differentAddress, contractName: "AnotherToken", + sourceName: "contracts/AnotherToken.sol", + abi: [], }, }, };