@atomicport/evm
Version:
Support Cross-Chain-Swap with HTLC on any blockchains
492 lines (491 loc) • 973 kB
JSON
{
"contractName": "HashedTimelock",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "hashlock",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timelock",
"type": "uint256"
}
],
"name": "LogHTLCNew",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"name": "LogHTLCRefund",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"name": "LogHTLCWithdraw",
"type": "event"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_receiver",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_hashlock",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_timelock",
"type": "uint256"
}
],
"name": "newContract",
"outputs": [
{
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"stateMutability": "payable",
"type": "function",
"payable": true
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_contractId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_preimage",
"type": "bytes32"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_contractId",
"type": "bytes32"
}
],
"name": "refund",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_contractId",
"type": "bytes32"
}
],
"name": "getContract",
"outputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "hashlock",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "timelock",
"type": "uint256"
},
{
"internalType": "bool",
"name": "withdrawn",
"type": "bool"
},
{
"internalType": "bool",
"name": "refunded",
"type": "bool"
},
{
"internalType": "bytes32",
"name": "preimage",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hashlock\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timelock\",\"type\":\"uint256\"}],\"name\":\"LogHTLCNew\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"LogHTLCRefund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"LogHTLCWithdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractId\",\"type\":\"bytes32\"}],\"name\":\"getContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hashlock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"timelock\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"withdrawn\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"refunded\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"preimage\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_hashlock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_timelock\",\"type\":\"uint256\"}],\"name\":\"newContract\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractId\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_preimage\",\"type\":\"bytes32\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getContract(bytes32)\":{\"details\":\"Get contract details.\",\"params\":{\"_contractId\":\"HTLC contract id\"}},\"newContract(address,bytes32,uint256)\":{\"details\":\"Sender sets up a new hash time lock contract depositing the ETH and providing the reciever lock terms.\",\"params\":{\"_hashlock\":\"A sha-2 sha256 hash hashlock.\",\"_receiver\":\"Receiver of the ETH.\",\"_timelock\":\"UNIX epoch seconds time that the lock expires at. Refunds can be made after this time.\"},\"returns\":{\"contractId\":\"Id of the new HTLC. This is needed for subsequent calls.\"}},\"refund(bytes32)\":{\"details\":\"Called by the sender if there was no withdraw AND the time lock has expired. This will refund the contract amount.\",\"params\":{\"_contractId\":\"Id of HTLC to refund from.\"},\"returns\":{\"_0\":\"bool true on success\"}},\"withdraw(bytes32,bytes32)\":{\"details\":\"Called by the receiver once they know the preimage of the hashlock. This will transfer the locked funds to their address.\",\"params\":{\"_contractId\":\"Id of the HTLC.\",\"_preimage\":\"sha256(_preimage) should equal the contract hashlock.\"},\"returns\":{\"_0\":\"bool true on success\"}}},\"title\":\"Hashed Timelock Contracts (HTLCs) on Ethereum ETH. This contract provides a way to create and keep HTLCs for ETH. See HashedTimelockERC20.sol for a contract that provides the same functions for ERC20 tokens. Protocol: 1) newContract(receiver, hashlock, timelock) - a sender calls this to create a new HTLC and gets back a 32 byte contract id 2) withdraw(contractId, preimage) - once the receiver knows the preimage of the hashlock hash they can claim the ETH with this function 3) refund() - after timelock has expired and if the receiver did not withdraw funds the sender / creator of the HTLC can get their ETH back with this function.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/HashedTimelock.sol\":\"HashedTimelock\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/HashedTimelock.sol\":{\"keccak256\":\"0x371d21359065cbe907adb145b956a8edf0f360e594fd36fd088a85dd6aefb301\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://74cfee6efac139f2ca4b1900bb2f6d19b8f17304eef9a8f45df97457ef026cb3\",\"dweb:/ipfs/Qma4vJs6yH7Fy7HfoPkVwAUVQ3h3ozn1Nn54eSDgqfUMaH\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50611730806100206000396000f3fe60806040526004361061003f5760003560e01c8063335ef5bd1461004457806363615149146100745780637249fbb6146100b1578063e16c7d98146100ee575b600080fd5b61005e60048036038101906100599190610d6b565b610132565b60405161006b9190610dcd565b60405180910390f35b34801561008057600080fd5b5061009b60048036038101906100969190610de8565b610467565b6040516100a89190610e43565b60405180910390f35b3480156100bd57600080fd5b506100d860048036038101906100d39190610e5e565b610838565b6040516100e59190610e43565b60405180910390f35b3480156100fa57600080fd5b5061011560048036038101906101109190610e5e565b610b2c565b604051610129989796959493929190610ebb565b60405180910390f35b6000803411610176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016d90610f96565b60405180910390fd5b814281116101b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b090611028565b60405180910390fd5b600233863487876040516020016101d49594939291906110fb565b6040516020818303038152906040526040516101f091906111cb565b602060405180830381855afa15801561020d573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061023091906111f7565b915061023b82610c2e565b1561027b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027290611270565b60405180910390fd5b6040518061010001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1681526020013481526020018581526020018481526020016000151581526020016000151581526020016000801b81525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160050160016101000a81548160ff02191690831515021790555060e082015181600601559050508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16837f329a8316ed9c3b2299597538371c2944c5026574e803b1ec31d6113e1cd67bde34888860405161045793929190611290565b60405180910390a4509392505050565b60008261047381610c2e565b6104b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a990611313565b60405180910390fd5b838360006002826040516020016104c99190611333565b6040516020818303038152906040526040516104e591906111cb565b602060405180830381855afa158015610502573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061052591906111f7565b905060028160405160200161053a9190611333565b60405160208183030381529060405260405161055691906111cb565b602060405180830381855afa158015610573573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061059691906111f7565b60008085815260200190815260200160002060030154146105ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e39061139a565b60405180910390fd5b863373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610690576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068790611406565b60405180910390fd5b6000151560008083815260200190815260200160002060050160009054906101000a900460ff161515146106f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f090611472565b60405180910390fd5b426000808381526020019081526020016000206004015411610750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074790611504565b60405180910390fd5b60008060008a8152602001908152602001600020905087816006018190555060018160050160006101000a81548160ff0219169083151502179055508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600201549081150290604051600060405180830381858888f193505050501580156107fa573d6000803e3d6000fd5b50887fd6fd4c8e45bf0c70693141c7ce46451b6a6a28ac8386fca2ba914044e0e2391660405160405180910390a26001965050505050505092915050565b60008161084481610c2e565b610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a90611313565b60405180910390fd5b823373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091e90611570565b60405180910390fd5b6000151560008083815260200190815260200160002060050160019054906101000a900460ff16151514610990576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610987906115dc565b60405180910390fd5b6000151560008083815260200190815260200160002060050160009054906101000a900460ff161515146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f090611648565b60405180910390fd5b42600080838152602001908152602001600020600401541115610a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a48906116da565b60405180910390fd5b6000806000868152602001908152602001600020905060018160050160016101000a81548160ff0219169083151502179055508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600201549081150290604051600060405180830381858888f19350505050158015610af2573d6000803e3d6000fd5b50847f989b3a845197c9aec15f8982bbb30b5da714050e662a7a287bb1a94c81e2e70e60405160405180910390a260019350505050919050565b60008060008060008060008060001515610b458a610c2e565b151503610b79576000806000806000806000808460001b94508060001b905097509750975097509750975097509750610c23565b60008060008b815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260020154836003015484600401548560050160009054906101000a900460ff168660050160019054906101000a900460ff16876006015498509850985098509850985098509850505b919395975091939597565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610ccc82610ca1565b9050919050565b610cdc81610cc1565b8114610ce757600080fd5b50565b600081359050610cf981610cd3565b92915050565b6000819050919050565b610d1281610cff565b8114610d1d57600080fd5b50565b600081359050610d2f81610d09565b92915050565b6000819050919050565b610d4881610d35565b8114610d5357600080fd5b50565b600081359050610d6581610d3f565b92915050565b600080600060608486031215610d8457610d83610c9c565b5b6000610d9286828701610cea565b9350506020610da386828701610d20565b9250506040610db486828701610d56565b9150509250925092565b610dc781610cff565b82525050565b6000602082019050610de26000830184610dbe565b92915050565b60008060408385031215610dff57610dfe610c9c565b5b6000610e0d85828601610d20565b9250506020610e1e85828601610d20565b9150509250929050565b60008115159050919050565b610e3d81610e28565b82525050565b6000602082019050610e586000830184610e34565b92915050565b600060208284031215610e7457610e73610c9c565b5b6000610e8284828501610d20565b91505092915050565b6000610e9682610ca1565b9050919050565b610ea681610e8b565b82525050565b610eb581610d35565b82525050565b600061010082019050610ed1600083018b610e9d565b610ede602083018a610e9d565b610eeb6040830189610eac565b610ef86060830188610dbe565b610f056080830187610eac565b610f1260a0830186610e34565b610f1f60c0830185610e34565b610f2c60e0830184610dbe565b9998505050505050505050565b600082825260208201905092915050565b7f6d73672e76616c7565206d757374206265203e20300000000000000000000000600082015250565b6000610f80601583610f39565b9150610f8b82610f4a565b602082019050919050565b60006020820190508181036000830152610faf81610f73565b9050919050565b7f74696d656c6f636b2074696d65206d75737420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b6000611012602383610f39565b915061101d82610fb6565b604082019050919050565b6000602082019050818103600083015261104181611005565b9050919050565b60008160601b9050919050565b600061106082611048565b9050919050565b600061107282611055565b9050919050565b61108a61108582610e8b565b611067565b82525050565b600061109b82611055565b9050919050565b6110b36110ae82610cc1565b611090565b82525050565b6000819050919050565b6110d46110cf82610d35565b6110b9565b82525050565b6000819050919050565b6110f56110f082610cff565b6110da565b82525050565b60006111078288611079565b60148201915061111782876110a2565b60148201915061112782866110c3565b60208201915061113782856110e4565b60208201915061114782846110c3565b6020820191508190509695505050505050565b600081519050919050565b600081905092915050565b60005b8381101561118e578082015181840152602081019050611173565b60008484015250505050565b60006111a58261115a565b6111af8185611165565b93506111bf818560208601611170565b80840191505092915050565b60006111d7828461119a565b915081905092915050565b6000815190506111f181610d09565b92915050565b60006020828403121561120d5761120c610c9c565b5b600061121b848285016111e2565b91505092915050565b7f436f6e747261637420616c726561647920657869737473000000000000000000600082015250565b600061125a601783610f39565b915061126582611224565b602082019050919050565b600060208201905081810360008301526112898161124d565b9050919050565b60006060820190506112a56000830186610eac565b6112b26020830185610dbe565b6112bf6040830184610eac565b949350505050565b7f636f6e7472616374496420646f6573206e6f7420657869737400000000000000600082015250565b60006112fd601983610f39565b9150611308826112c7565b602082019050919050565b6000602082019050818103600083015261132c816112f0565b9050919050565b600061133f82846110e4565b60208201915081905092915050565b7f686173686c6f636b206861736820646f6573206e6f74206d6174636800000000600082015250565b6000611384601c83610f39565b915061138f8261134e565b602082019050919050565b600060208201905081810360008301526113b381611377565b9050919050565b7f776974686472617761626c653a206e6f74207265636569766572000000000000600082015250565b60006113f0601a83610f39565b91506113fb826113ba565b602082019050919050565b6000602082019050818103600083015261141f816113e3565b9050919050565b7f776974686472617761626c653a20616c72656164792077697468647261776e00600082015250565b600061145c601f83610f39565b915061146782611426565b602082019050919050565b6000602082019050818103600083015261148b8161144f565b9050919050565b7f776974686472617761626c653a2074696d656c6f636b2074696d65206d75737460008201527f20626520696e2074686520667574757265000000000000000000000000000000602082015250565b60006114ee603183610f39565b91506114f982611492565b604082019050919050565b6000602082019050818103600083015261151d816114e1565b9050919050565b7f726566756e6461626c653a206e6f742073656e64657200000000000000000000600082015250565b600061155a601683610f39565b915061156582611524565b602082019050919050565b600060208201905081810360008301526115898161154d565b9050919050565b7f726566756e6461626c653a20616c726561647920726566756e64656400000000600082015250565b60006115c6601c83610f39565b91506115d182611590565b602082019050919050565b600060208201905081810360008301526115f5816115b9565b9050919050565b7f726566756e6461626c653a20616c72656164792077697468647261776e000000600082015250565b6000611632601d83610f39565b915061163d826115fc565b602082019050919050565b6000602082019050818103600083015261166181611625565b9050919050565b7f726566756e6461626c653a2074696d656c6f636b206e6f74207965742070617360008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b60006116c4602383610f39565b91506116cf82611668565b604082019050919050565b600060208201905081810360008301526116f3816116b7565b905091905056fea264697066735822122001882f168389f359d4677bcb263d846a2c2c0289d2664e81793c052c523f78b964736f6c63430008110033",
"deployedBytecode": "0x60806040526004361061003f5760003560e01c8063335ef5bd1461004457806363615149146100745780637249fbb6146100b1578063e16c7d98146100ee575b600080fd5b61005e60048036038101906100599190610d6b565b610132565b60405161006b9190610dcd565b60405180910390f35b34801561008057600080fd5b5061009b60048036038101906100969190610de8565b610467565b6040516100a89190610e43565b60405180910390f35b3480156100bd57600080fd5b506100d860048036038101906100d39190610e5e565b610838565b6040516100e59190610e43565b60405180910390f35b3480156100fa57600080fd5b5061011560048036038101906101109190610e5e565b610b2c565b604051610129989796959493929190610ebb565b60405180910390f35b6000803411610176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016d90610f96565b60405180910390fd5b814281116101b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b090611028565b60405180910390fd5b600233863487876040516020016101d49594939291906110fb565b6040516020818303038152906040526040516101f091906111cb565b602060405180830381855afa15801561020d573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061023091906111f7565b915061023b82610c2e565b1561027b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027290611270565b60405180910390fd5b6040518061010001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1681526020013481526020018581526020018481526020016000151581526020016000151581526020016000801b81525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160050160016101000a81548160ff02191690831515021790555060e082015181600601559050508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16837f329a8316ed9c3b2299597538371c2944c5026574e803b1ec31d6113e1cd67bde34888860405161045793929190611290565b60405180910390a4509392505050565b60008261047381610c2e565b6104b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a990611313565b60405180910390fd5b838360006002826040516020016104c99190611333565b6040516020818303038152906040526040516104e591906111cb565b602060405180830381855afa158015610502573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061052591906111f7565b905060028160405160200161053a9190611333565b60405160208183030381529060405260405161055691906111cb565b602060405180830381855afa158015610573573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061059691906111f7565b60008085815260200190815260200160002060030154146105ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e39061139a565b60405180910390fd5b863373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610690576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068790611406565b60405180910390fd5b6000151560008083815260200190815260200160002060050160009054906101000a900460ff161515146106f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f090611472565b60405180910390fd5b426000808381526020019081526020016000206004015411610750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074790611504565b60405180910390fd5b60008060008a8152602001908152602001600020905087816006018190555060018160050160006101000a81548160ff0219169083151502179055508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600201549081150290604051600060405180830381858888f193505050501580156107fa573d6000803e3d6000fd5b50887fd6fd4c8e45bf0c70693141c7ce46451b6a6a28ac8386fca2ba914044e0e2391660405160405180910390a26001965050505050505092915050565b60008161084481610c2e565b610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a90611313565b60405180910390fd5b823373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091e90611570565b60405180910390fd5b6000151560008083815260200190815260200160002060050160019054906101000a900460ff16151514610990576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610987906115dc565b60405180910390fd5b6000151560008083815260200190815260200160002060050160009054906101000a900460ff161515146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f090611648565b60405180910390fd5b42600080838152602001908152602001600020600401541115610a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a48906116da565b60405180910390fd5b6000806000868152602001908152602001600020905060018160050160016101000a81548160ff0219169083151502179055508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600201549081150290604051600060405180830381858888f19350505050158015610af2573d6000803e3d6000fd5b50847f989b3a845197c9aec15f8982bbb30b5da714050e662a7a287bb1a94c81e2e70e60405160405180910390a260019350505050919050565b60008060008060008060008060001515610b458a610c2e565b151503610b79576000806000806000806000808460001b94508060001b905097509750975097509750975097509750610c23565b60008060008b815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260020154836003015484600401548560050160009054906101000a900460ff168660050160019054906101000a900460ff16876006015498509850985098509850985098509850505b919395975091939597565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610ccc82610ca1565b9050919050565b610cdc81610cc1565b8114610ce757600080fd5b50565b600081359050610cf981610cd3565b92915050565b6000819050919050565b610d1281610cff565b8114610d1d57600080fd5b50565b600081359050610d2f81610d09565b92915050565b6000819050919050565b610d4881610d35565b8114610d5357600080fd5b50565b600081359050610d6581610d3f565b92915050565b600080600060608486031215610d8457610d83610c9c565b5b6000610d9286828701610cea565b9350506020610da386828701610d20565b9250506040610db486828701610d56565b9150509250925092565b610dc781610cff565b82525050565b6000602082019050610de26000830184610dbe565b92915050565b60008060408385031215610dff57610dfe610c9c565b5b6000610e0d85828601610d20565b9250506020610e1e85828601610d20565b9150509250929050565b60008115159050919050565b610e3d81610e28565b82525050565b6000602082019050610e586000830184610e34565b92915050565b600060208284031215610e7457610e73610c9c565b5b6000610e8284828501610d20565b91505092915050565b6000610e9682610ca1565b9050919050565b610ea681610e8b565b82525050565b610eb581610d35565b82525050565b600061010082019050610ed1600083018b610e9d565b610ede602083018a610e9d565b610eeb6040830189610eac565b610ef86060830188610dbe565b610f056080830187610eac565b610f1260a0830186610e34565b610f1f60c0830185610e34565b610f2c60e0830184610dbe565b9998505050505050505050565b600082825260208201905092915050565b7f6d73672e76616c7565206d757374206265203e20300000000000000000000000600082015250565b6000610f80601583610f39565b9150610f8b82610f4a565b602082019050919050565b60006020820190508181036000830152610faf81610f73565b9050919050565b7f74696d656c6f636b2074696d65206d75737420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b6000611012602383610f39565b915061101d82610fb6565b604082019050919050565b6000602082019050818103600083015261104181611005565b9050919050565b60008160601b9050919050565b600061106082611048565b9050919050565b600061107282611055565b9050919050565b61108a61108582610e8b565b611067565b82525050565b600061109b82611055565b9050919050565b6110b36110ae82610cc1565b611090565b82525050565b6000819050919050565b6110d46110cf82610d35565b6110b9565b82525050565b6000819050919050565b6110f56110f082610cff565b6110da565b82525050565b60006111078288611079565b60148201915061111782876110a2565b60148201915061112782866110c3565b60208201915061113782856110e4565b60208201915061114782846110c3565b6020820191508190509695505050505050565b600081519050919050565b600081905092915050565b60005b8381101561118e578082015181840152602081019050611173565b60008484015250505050565b60006111a58261115a565b6111af8185611165565b93506111bf818560208601611170565b80840191505092915050565b60006111d7828461119a565b915081905092915050565b6000815190506111f181610d09565b92915050565b60006020828403121561120d5761120c610c9c565b5b600061121b848285016111e2565b91505092915050565b7f436f6e747261637420616c726561647920657869737473000000000000000000600082015250565b600061125a601783610f39565b915061126582611224565b602082019050919050565b600060208201905081810360008301526112898161124d565b9050919050565b60006060820190506112a56000830186610eac565b6112b26020830185610dbe565b6112bf6040830184610eac565b949350505050565b7f636f6e7472616374496420646f6573206e6f7420657869737400000000000000600082015250565b60006112fd601983610f39565b9150611308826112c7565b602082019050919050565b6000602082019050818103600083015261132c816112f0565b9050919050565b600061133f82846110e4565b60208201915081905092915050565b7f686173686c6f636b206861736820646f6573206e6f74206d6174636800000000600082015250565b6000611384601c83610f39565b915061138f8261134e565b602082019050919050565b600060208201905081810360008301526113b381611377565b9050919050565b7f776974686472617761626c653a206e6f74207265636569766572000000000000600082015250565b60006113f0601a83610f39565b91506113fb826113ba565b602082019050919050565b6000602082019050818103600083015261141f816113e3565b9050919050565b7f776974686472617761626c653a20616c72656164792077697468647261776e00600082015250565b600061145c601f83610f39565b915061146782611426565b602082019050919050565b6000602082019050818103600083015261148b8161144f565b9050919050565b7f776974686472617761626c653a2074696d656c6f636b2074696d65206d75737460008201527f20626520696e2074686520667574757265000000000000000000000000000000602082015250565b60006114ee603183610f39565b91506114f982611492565b604082019050919050565b6000602082019050818103600083015261151d816114e1565b9050919050565b7f726566756e6461626c653a206e6f742073656e64657200000000000000000000600082015250565b600061155a601683610f39565b915061156582611524565b602082019050919050565b600060208201905081810360008301526115898161154d565b9050919050565b7f726566756e6461626c653a20616c726561647920726566756e64656400000000600082015250565b60006115c6601c83610f39565b91506115d182611590565b602082019050919050565b600060208201905081810360008301526115f5816115b9565b9050919050565b7f726566756e6461626c653a20616c72656164792077697468647261776e000000600082015250565b6000611632601d83610f39565b915061163d826115fc565b602082019050919050565b6000602082019050818103600083015261166181611625565b9050919050565b7f726566756e6461626c653a2074696d656c6f636b206e6f74207965742070617360008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b60006116c4602383610f39565b91506116cf82611668565b604082019050919050565b600060208201905081810360008301526116f3816116b7565b905091905056fea264697066735822122001882f168389f359d4677bcb263d846a2c2c0289d2664e81793c052c523f78b964736f6c63430008110033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:21754:17",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "47:35:17",
"statements": [
{
"nodeType": "YulAssignment",
"src": "57:19:17",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:2:17",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "67:5:17"
},
"nodeType": "YulFunctionCall",
"src": "67:9:17"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "57:6:17"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "40:6:17",
"type": ""
}
],
"src": "7:75:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "177:28:17",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "194:1:17",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "197:1:17",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "187:6:17"
},
"nodeType": "YulFunctionCall",
"src": "187:12:17"
},
"nodeType": "YulExpressionStatement",
"src": "187:12:17"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "88:117:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:28:17",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "317:1:17",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "320:1:17",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "310:6:17"
},
"nodeType": "YulFunctionCall",
"src": "310:12:17"
},
"nodeType": "YulExpressionStatement",
"src": "310:12:17"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "211:117:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "379:81:17",
"statements": [
{
"nodeType": "YulAssignment",
"src": "389:65:17",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "404:5:17"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "411:42:17",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "400:3:17"
},
"nodeType": "YulFunctionCall",
"src": "400:54:17"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "389:7:17"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "361:5:17",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "371:7:17",
"type": ""
}
],
"src": "334:126:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "519:51:17",
"statements": [
{
"nodeType": "YulAssignment",
"src": "529:35:17",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "558:5:17"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "540:17:17"
},
"nodeType": "YulFunctionCall",
"src": "540:24:17"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "529:7:17"
}
]
}
]
},
"name": "cleanup_t_address_payable",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "501:5:17",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "511:7:17",
"type": ""
}
],
"src": "466:104:17"
},
{
"body": {
"nodeType": "YulBlock",
"src": "627:87:17",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "692:16:17",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "701:1:17",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "704:1:17",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "694:6:17"
},
"nodeType": "YulFunctionCall",
"src": "694:12:17"
},