block-accounting/artifacts/build-info/22662767f8b1a09e64d324318d70c2ac.json

1 line
91 KiB
JSON
Raw Normal View History

2024-05-01 21:02:09 +00:00
{"id":"22662767f8b1a09e64d324318d70c2ac","_format":"hh-sol-build-info-1","solcVersion":"0.8.24","solcLongVersion":"0.8.24+commit.e11b9ed9","input":{"language":"Solidity","sources":{"contracts/Lock.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.24;\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":{"evmVersion":"paris","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",".24"],"nodeType":"PragmaDirective","src":"39:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Lock","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":78,"linearizedBaseContracts":[78],"name":"Lock","nameLocation":"150:4:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"251c1aa3","id":3,"mutability":"mutable","name":"unlockTime","nameLocation":"173:10:0","nodeType":"VariableDeclaration","scope":78,"src":"161:22:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2,"name":"uint","nodeType":"ElementaryTypeName","src":"161:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"8da5cb5b","id":5,"mutability":"mutable","name":"owner","nameLocation":"212:5:0","nodeType":"VariableDeclaration","scope":78,"src":"189:28:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"189:15:0","stateMutability":"payable","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"visibility":"public"},{"anonymous":false,"eventSelector":"bf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93","id":11,"name":"Withdrawal","nameLocation":"230:10:0","nodeType":"EventDefinition","parameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"indexed":false,"mutability":"mutable","name":"amount","nameLocation":"246:6:0","nodeType":"VariableDeclaration","scope":11,"src":"241:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":9,"indexed":false,"mutability":"mutable","name":"when","nameLocation":"259:4:0","nodeType":"VariableDeclaration","scope":11,"src":"254:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint","nodeType":"ElementaryTypeName