@atomicport/evm
Version:
Support Cross-Chain-Swap with HTLC on any blockchains
361 lines (360 loc) • 1.17 MB
JSON
{
"contractName": "HashedTimelockERC20",
"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": "address",
"name": "tokenContract",
"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": "HTLCERC20New",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"name": "HTLCERC20Refund",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"name": "HTLCERC20Withdraw",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_receiver",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_hashlock",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_timelock",
"type": "uint256"
},
{
"internalType": "address",
"name": "_tokenContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "newContract",
"outputs": [
{
"internalType": "bytes32",
"name": "contractId",
"type": "bytes32"
}
],
"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"
},
{
"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": "address",
"name": "tokenContract",
"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\":\"address\",\"name\":\"tokenContract\",\"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\":\"HTLCERC20New\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"HTLCERC20Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"name\":\"HTLCERC20Withdraw\",\"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\":\"address\",\"name\":\"tokenContract\",\"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\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_hashlock\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_timelock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"newContract\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"contractId\",\"type\":\"bytes32\"}],\"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\"},{\"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,address,uint256)\":{\"details\":\"Sender / Payer sets up a new hash time lock contract depositing the funds and providing the reciever and terms. NOTE: _receiver must first call approve() on the token contract. See allowance check in tokensTransferable modifier.\",\"params\":{\"_amount\":\"Amount of the token to lock up.\",\"_hashlock\":\"A sha-2 sha256 hash hashlock.\",\"_receiver\":\"Receiver of the tokens.\",\"_timelock\":\"UNIX epoch seconds time that the lock expires at. Refunds can be made after this time.\",\"_tokenContract\":\"ERC20 Token contract address.\"},\"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 restore ownership of the tokens to the sender.\",\"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 ownership of the locked tokens 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 ERC20 tokens. This contract provides a way to create and keep HTLCs for ERC20 tokens. See HashedTimelock.sol for a contract that provides the same functions for the native ETH token. Protocol: 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a sender calls this to create a new HTLC on a given token (tokenContract) for a given amount. A 32 byte contract id is returned 2) withdraw(contractId, preimage) - once the receiver knows the preimage of the hashlock hash they can claim the tokens with this function 3) refund() - after timelock has expired and if the receiver did not withdraw the tokens the sender / creator of the HTLC can get their tokens back with this function.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/HashedTimelockERC20.sol\":\"HashedTimelockERC20\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/HashedTimelockERC20.sol\":{\"keccak256\":\"0x56f70b2aaedd67fbb8ef7e5f1def08e7f4b4ed202f0e085eab862ea085647f62\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a9d0b2812afceae1975850f52f77a38579082d90ccb9a98ea81f275ceec7d035\",\"dweb:/ipfs/QmbmWPYbfMGBjRXR5Y1ZgMKasnBaFWHWB6axN6m8yKL77i\"]},\"project:/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://15f52f51413a9de1ff191e2f6367c62178e1df7806d7880fe857a98b0b66253d\",\"dweb:/ipfs/QmaQG1fwfgUt5E9nu2cccFiV47B2V78MM1tCy1qB7n4MsH\"]},\"project:/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"project:/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"project:/node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50611c3a806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063398a7a981461005157806363615149146100815780637249fbb6146100b1578063e16c7d98146100e1575b600080fd5b61006b60048036038101906100669190611038565b610119565b60405161007891906110c2565b60405180910390f35b61009b600480360381019061009691906110dd565b61063c565b6040516100a89190611138565b60405180910390f35b6100cb60048036038101906100c69190611153565b610a7b565b6040516100d89190611138565b60405180910390f35b6100fb60048036038101906100f69190611153565b610dcb565b6040516101109998979695949392919061119e565b60405180910390f35b600082338360008111610161576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015890611288565b60405180910390fd5b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b815260040161019d9291906112a8565b602060405180830381865afa1580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de91906112e6565b101561021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021690611385565b60405180910390fd5b86428111610262576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025990611417565b60405180910390fd5b6002338b89898d8d60405160200161027f969594939291906114c1565b60405160208183030381529060405260405161029b91906115a2565b602060405180830381855afa1580156102b8573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906102db91906115ce565b94506102e685610efb565b15610326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031d90611647565b60405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b815260040161036393929190611667565b6020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906116ca565b6103e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dc90611769565b60405180910390fd5b6040518061012001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018a81526020018981526020016000151581526020016000151581526020016000801b81525060008087815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff02191690831515021790555061010082015181600701559050508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16867f31a346f672cf5073bda81a99e0a28aff2bfe8c2db87d462bb2f4c114476a46ee8a8a8e8e6040516106279493929190611789565b60405180910390a45050505095945050505050565b60008261064881610efb565b610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e9061181a565b60405180910390fd5b8383600060028260405160200161069e919061183a565b6040516020818303038152906040526040516106ba91906115a2565b602060405180830381855afa1580156106d7573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906106fa91906115ce565b905060028160405160200161070f919061183a565b60405160208183030381529060405260405161072b91906115a2565b602060405180830381855afa158015610748573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061076b91906115ce565b60008085815260200190815260200160002060040154146107c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b8906118a1565b60405180910390fd5b863373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c9061190d565b60405180910390fd5b6000151560008083815260200190815260200160002060060160009054906101000a900460ff161515146108ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c590611979565b60405180910390fd5b6000151560008083815260200190815260200160002060060160019054906101000a900460ff16151514610937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092e906119e5565b60405180910390fd5b60008060008a8152602001908152602001600020905087816007018190555060018160060160006101000a81548160ff0219169083151502179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600301546040518363ffffffff1660e01b81526004016109fa929190611a05565b6020604051808303816000875af1158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d91906116ca565b50887f15a71365fee30a355046c80d10aab98a49c3558b2272658d6c551733203e9bbe60405160405180910390a26001965050505050505092915050565b600081610a8781610efb565b610ac6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abd9061181a565b60405180910390fd5b823373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6190611a7a565b60405180910390fd5b6000151560008083815260200190815260200160002060060160019054906101000a900460ff16151514610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90611ae6565b60405180910390fd5b6000151560008083815260200190815260200160002060060160009054906101000a900460ff16151514610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3390611b52565b60405180910390fd5b42600080838152602001908152602001600020600501541115610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611be4565b60405180910390fd5b6000806000868152602001908152602001600020905060018160060160016101000a81548160ff0219169083151502179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600301546040518363ffffffff1660e01b8152600401610d4e929190611a05565b6020604051808303816000875af1158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906116ca565b50847ff97bb6718c3bf29e51d27c00a46276abc2cf35c7f1d5a1c71bec2c82421bb83060405160405180910390a260019350505050919050565b6000806000806000806000806000801515610de58b610efb565b151503610e1d5760008060008060008060008060008460001b94508060001b9050985098509850985098509850985098509850610eee565b60008060008c815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030154846004015485600501548660060160009054906101000a900460ff168760060160019054906101000a900460ff168860070154995099509950995099509950995099509950505b9193959799909294969850565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610f9982610f6e565b9050919050565b610fa981610f8e565b8114610fb457600080fd5b50565b600081359050610fc681610fa0565b92915050565b6000819050919050565b610fdf81610fcc565b8114610fea57600080fd5b50565b600081359050610ffc81610fd6565b92915050565b6000819050919050565b61101581611002565b811461102057600080fd5b50565b6000813590506110328161100c565b92915050565b600080600080600060a0868803121561105457611053610f69565b5b600061106288828901610fb7565b955050602061107388828901610fed565b945050604061108488828901611023565b935050606061109588828901610fb7565b92505060806110a688828901611023565b9150509295509295909350565b6110bc81610fcc565b82525050565b60006020820190506110d760008301846110b3565b92915050565b600080604083850312156110f4576110f3610f69565b5b600061110285828601610fed565b925050602061111385828601610fed565b9150509250929050565b60008115159050919050565b6111328161111d565b82525050565b600060208201905061114d6000830184611129565b92915050565b60006020828403121561116957611168610f69565b5b600061117784828501610fed565b91505092915050565b61118981610f8e565b82525050565b61119881611002565b82525050565b6000610120820190506111b4600083018c611180565b6111c1602083018b611180565b6111ce604083018a611180565b6111db606083018961118f565b6111e860808301886110b3565b6111f560a083018761118f565b61120260c0830186611129565b61120f60e0830185611129565b61121d6101008301846110b3565b9a9950505050505050505050565b600082825260208201905092915050565b7f746f6b656e20616d6f756e74206d757374206265203e20300000000000000000600082015250565b600061127260188361122b565b915061127d8261123c565b602082019050919050565b600060208201905081810360008301526112a181611265565b9050919050565b60006040820190506112bd6000830185611180565b6112ca6020830184611180565b9392505050565b6000815190506112e08161100c565b92915050565b6000602082840312156112fc576112fb610f69565b5b600061130a848285016112d1565b91505092915050565b7f746f6b656e20616c6c6f77616e6365206d757374206265203e3d20616d6f756e60008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b600061136f60218361122b565b915061137a82611313565b604082019050919050565b6000602082019050818103600083015261139e81611362565b9050919050565b7f74696d656c6f636b2074696d65206d75737420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061140160238361122b565b915061140c826113a5565b604082019050919050565b60006020820190508181036000830152611430816113f4565b9050919050565b60008160601b9050919050565b600061144f82611437565b9050919050565b600061146182611444565b9050919050565b61147961147482610f8e565b611456565b82525050565b6000819050919050565b61149a61149582611002565b61147f565b82525050565b6000819050919050565b6114bb6114b682610fcc565b6114a0565b82525050565b60006114cd8289611468565b6014820191506114dd8288611468565b6014820191506114ed8287611468565b6014820191506114fd8286611489565b60208201915061150d82856114aa565b60208201915061151d8284611489565b602082019150819050979650505050505050565b600081519050919050565b600081905092915050565b60005b8381101561156557808201518184015260208101905061154a565b60008484015250505050565b600061157c82611531565b611586818561153c565b9350611596818560208601611547565b80840191505092915050565b60006115ae8284611571565b915081905092915050565b6000815190506115c881610fd6565b92915050565b6000602082840312156115e4576115e3610f69565b5b60006115f2848285016115b9565b91505092915050565b7f436f6e747261637420616c726561647920657869737473000000000000000000600082015250565b600061163160178361122b565b915061163c826115fb565b602082019050919050565b6000602082019050818103600083015261166081611624565b9050919050565b600060608201905061167c6000830186611180565b6116896020830185611180565b611696604083018461118f565b949350505050565b6116a78161111d565b81146116b257600080fd5b50565b6000815190506116c48161169e565b92915050565b6000602082840312156116e0576116df610f69565b5b60006116ee848285016116b5565b91505092915050565b7f7472616e7366657246726f6d2073656e64657220746f2074686973206661696c60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b600061175360228361122b565b915061175e826116f7565b604082019050919050565b6000602082019050818103600083015261178281611746565b9050919050565b600060808201905061179e6000830187611180565b6117ab602083018661118f565b6117b860408301856110b3565b6117c5606083018461118f565b95945050505050565b7f636f6e7472616374496420646f6573206e6f7420657869737400000000000000600082015250565b600061180460198361122b565b915061180f826117ce565b602082019050919050565b60006020820190508181036000830152611833816117f7565b9050919050565b600061184682846114aa565b60208201915081905092915050565b7f686173686c6f636b206861736820646f6573206e6f74206d6174636800000000600082015250565b600061188b601c8361122b565b915061189682611855565b602082019050919050565b600060208201905081810360008301526118ba8161187e565b9050919050565b7f776974686472617761626c653a206e6f74207265636569766572000000000000600082015250565b60006118f7601a8361122b565b9150611902826118c1565b602082019050919050565b60006020820190508181036000830152611926816118ea565b9050919050565b7f776974686472617761626c653a20616c72656164792077697468647261776e00600082015250565b6000611963601f8361122b565b915061196e8261192d565b602082019050919050565b6000602082019050818103600083015261199281611956565b9050919050565b7f776974686472617761626c653a20616c726561647920726566756e6465640000600082015250565b60006119cf601e8361122b565b91506119da82611999565b602082019050919050565b600060208201905081810360008301526119fe816119c2565b9050919050565b6000604082019050611a1a6000830185611180565b611a27602083018461118f565b9392505050565b7f726566756e6461626c653a206e6f742073656e64657200000000000000000000600082015250565b6000611a6460168361122b565b9150611a6f82611a2e565b602082019050919050565b60006020820190508181036000830152611a9381611a57565b9050919050565b7f726566756e6461626c653a20616c726561647920726566756e64656400000000600082015250565b6000611ad0601c8361122b565b9150611adb82611a9a565b602082019050919050565b60006020820190508181036000830152611aff81611ac3565b9050919050565b7f726566756e6461626c653a20616c72656164792077697468647261776e000000600082015250565b6000611b3c601d8361122b565b9150611b4782611b06565b602082019050919050565b60006020820190508181036000830152611b6b81611b2f565b9050919050565b7f726566756e6461626c653a2074696d656c6f636b206e6f74207965742070617360008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b6000611bce60238361122b565b9150611bd982611b72565b604082019050919050565b60006020820190508181036000830152611bfd81611bc1565b905091905056fea26469706673582212201c8fccefa84e0507224487e55792c8a701a4a836fd9404057870145820cd434a64736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063398a7a981461005157806363615149146100815780637249fbb6146100b1578063e16c7d98146100e1575b600080fd5b61006b60048036038101906100669190611038565b610119565b60405161007891906110c2565b60405180910390f35b61009b600480360381019061009691906110dd565b61063c565b6040516100a89190611138565b60405180910390f35b6100cb60048036038101906100c69190611153565b610a7b565b6040516100d89190611138565b60405180910390f35b6100fb60048036038101906100f69190611153565b610dcb565b6040516101109998979695949392919061119e565b60405180910390f35b600082338360008111610161576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015890611288565b60405180910390fd5b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b815260040161019d9291906112a8565b602060405180830381865afa1580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de91906112e6565b101561021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021690611385565b60405180910390fd5b86428111610262576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025990611417565b60405180910390fd5b6002338b89898d8d60405160200161027f969594939291906114c1565b60405160208183030381529060405260405161029b91906115a2565b602060405180830381855afa1580156102b8573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906102db91906115ce565b94506102e685610efb565b15610326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031d90611647565b60405180910390fd5b8673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b815260040161036393929190611667565b6020604051808303816000875af1158015610382573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a691906116ca565b6103e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103dc90611769565b60405180910390fd5b6040518061012001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018a81526020018981526020016000151581526020016000151581526020016000801b81525060008087815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff02191690831515021790555061010082015181600701559050508973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16867f31a346f672cf5073bda81a99e0a28aff2bfe8c2db87d462bb2f4c114476a46ee8a8a8e8e6040516106279493929190611789565b60405180910390a45050505095945050505050565b60008261064881610efb565b610687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067e9061181a565b60405180910390fd5b8383600060028260405160200161069e919061183a565b6040516020818303038152906040526040516106ba91906115a2565b602060405180830381855afa1580156106d7573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906106fa91906115ce565b905060028160405160200161070f919061183a565b60405160208183030381529060405260405161072b91906115a2565b602060405180830381855afa158015610748573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061076b91906115ce565b60008085815260200190815260200160002060040154146107c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b8906118a1565b60405180910390fd5b863373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c9061190d565b60405180910390fd5b6000151560008083815260200190815260200160002060060160009054906101000a900460ff161515146108ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c590611979565b60405180910390fd5b6000151560008083815260200190815260200160002060060160019054906101000a900460ff16151514610937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092e906119e5565b60405180910390fd5b60008060008a8152602001908152602001600020905087816007018190555060018160060160006101000a81548160ff0219169083151502179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600301546040518363ffffffff1660e01b81526004016109fa929190611a05565b6020604051808303816000875af1158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d91906116ca565b50887f15a71365fee30a355046c80d10aab98a49c3558b2272658d6c551733203e9bbe60405160405180910390a26001965050505050505092915050565b600081610a8781610efb565b610ac6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abd9061181a565b60405180910390fd5b823373ffffffffffffffffffffffffffffffffffffffff1660008083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6190611a7a565b60405180910390fd5b6000151560008083815260200190815260200160002060060160019054906101000a900460ff16151514610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90611ae6565b60405180910390fd5b6000151560008083815260200190815260200160002060060160009054906101000a900460ff16151514610c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3390611b52565b60405180910390fd5b42600080838152602001908152602001600020600501541115610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611be4565b60405180910390fd5b6000806000868152602001908152602001600020905060018160060160016101000a81548160ff0219169083151502179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600301546040518363ffffffff1660e01b8152600401610d4e929190611a05565b6020604051808303816000875af1158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9191906116ca565b50847ff97bb6718c3bf29e51d27c00a46276abc2cf35c7f1d5a1c71bec2c82421bb83060405160405180910390a260019350505050919050565b6000806000806000806000806000801515610de58b610efb565b151503610e1d5760008060008060008060008060008460001b94508060001b9050985098509850985098509850985098509850610eee565b60008060008c815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030154846004015485600501548660060160009054906101000a900460ff168760060160019054906101000a900460ff168860070154995099509950995099509950995099509950505b9193959799909294969850565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610f9982610f6e565b9050919050565b610fa981610f8e565b8114610fb457600080fd5b50565b600081359050610fc681610fa0565b92915050565b6000819050919050565b610fdf81610fcc565b8114610fea57600080fd5b50565b600081359050610ffc81610fd6565b92915050565b6000819050919050565b61101581611002565b811461102057600080fd5b50565b6000813590506110328161100c565b92915050565b600080600080600060a0868803121561105457611053610f69565b5b600061106288828901610fb7565b955050602061107388828901610fed565b945050604061108488828901611023565b935050606061109588828901610fb7565b92505060806110a688828901611023565b9150509295509295909350565b6110bc81610fcc565b82525050565b60006020820190506110d760008301846110b3565b92915050565b600080604083850312156110f4576110f3610f69565b5b600061110285828601610fed565b925050602061111385828601610fed565b9150509250929050565b60008115159050919050565b6111328161111d565b82525050565b600060208201905061114d6000830184611129565b92915050565b60006020828403121561116957611168610f69565b5b600061117784828501610fed565b91505092915050565b61118981610f8e565b82525050565b61119881611002565b82525050565b6000610120820190506111b4600083018c611180565b6111c1602083018b611180565b6111ce604083018a611180565b6111db606083018961118f565b6111e860808301886110b3565b6111f560a083018761118f565b61120260c0830186611129565b61120f60e0830185611129565b61121d6101008301846110b3565b9a9950505050505050505050565b600082825260208201905092915050565b7f746f6b656e20616d6f756e74206d757374206265203e20300000000000000000600082015250565b600061127260188361122b565b915061127d8261123c565b602082019050919050565b600060208201905081810360008301526112a181611265565b9050919050565b60006040820190506112bd6000830185611180565b6112ca6020830184611180565b9392505050565b6000815190506112e08161100c565b92915050565b6000602082840312156112fc576112fb610f69565b5b600061130a848285016112d1565b91505092915050565b7f746f6b656e20616c6c6f77616e6365206d757374206265203e3d20616d6f756e60008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b600061136f60218361122b565b915061137a82611313565b604082019050919050565b6000602082019050818103600083015261139e81611362565b9050919050565b7f74696d656c6f636b2074696d65206d75737420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061140160238361122b565b915061140c826113a5565b604082019050919050565b60006020820190508181036000830152611430816113f4565b9050919050565b60008160601b9050919050565b600061144f82611437565b9050919050565b600061146182611444565b9050919050565b61147961147482610f8e565b611456565b82525050565b6000819050919050565b61149a61149582611002565b61147f565b82525050565b6000819050919050565b6114bb6114b682610fcc565b6114a0565b82525050565b60006114cd8289611468565b6014820191506114dd8288611468565b6014820191506114ed8287611468565b6014820191506114fd8286611489565b60208201915061150d82856114aa565b60208201915061151d8284611489565b602082019150819050979650505050505050565b600081519050919050565b600081905092915050565b60005b8381101561156557808201518184015260208101905061154a565b60008484015250505050565b600061157c82611531565b611586818561153c565b9350611596818560208601611547565b80840191505092915050565b60006115ae8284611571565b915081905092915050565b6000815190506115c881610fd6565b92915050565b6000602082840312156115e4576115e3610f69565b5b60006115f2848285016115b9565b91505092915050565b7f436f6e747261637420616c726561647920657869737473000000000000000000600082015250565b600061163160178361122b565b915061163c826115fb565b602082019050919050565b6000602082019050818103600083015261166081611624565b9050919050565b600060608201905061167c6000830186611180565b6116896020830185611180565b611696604083018461118f565b949350505050565b6116a78161111d565b81146116b257600080fd5b50565b6000815190506116c48161169e565b92915050565b6000602082840312156116e0576116df610f69565b5b60006116ee848285016116b5565b91505092915050565b7f7472616e7366657246726f6d2073656e64657220746f2074686973206661696c60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b600061175360228361122b565b915061175e826116f7565b604082019050919050565b6000602082019050818103600083015261178281611746565b9050919050565b600060808201905061179e6000830187611180565b6117ab602083018661118f565b6117b860408301856110b3565b6117c5606083018461118f565b95945050505050565b7f636f6e7472616374496420646f6573206e6f7420657869737400000000000000600082015250565b600061180460198361122b565b915061180f826117ce565b602082019050919050565b60006020820190508181036000830152611833816117f7565b9050919050565b600061184682846114aa565b60208201915081905092915050565b7f686173686c6f636b206861736820646f6573206e6f74206d6174636800000000600082015250565b600061188b601c8361122b565b915061189682611855565b602082019050919050565b600060208201905081810360008301526118ba8161187e565b9050919050565b7f776974686472617761626c653a206e6f74207265636569766572000000000000600082015250565b60006118f7601a8361122b565b9150611902826118c1565b602082019050919050565b60006020820190508181036000830152611926816118ea565b9050919050565b7f776974686472617761626c653a20616c72656164792077697468647261776e00600082015250565b6000611963601f8361122b565b915061196e8261192d565b602082019050919050565b6000602082019050818103600083015261199281611956565b9050919050565b7f776974686472617761626c653a20616c726561647920726566756e6465640000600082015250565b60006119cf601e8361122b565b91506119da82611999565b602082019050919050565b600060208201905081810360008301526119fe816119c2565b9050919050565b6000604082019050611a1a6000830185611180565b611a27602083018461118f565b9392505050565b7f726566756e6461626c653a206e6f742073656e64657200000000000000000000600082015250565b6000611a6460168361122b565b9150611a6f82611a2e565b602082019050919050565b60006020820190508181036000830152611a9381611a57565b9050919050565b7f726566756e6461626c653a20616c726561647920726566756e64656400000000600082015250565b6000611ad0601c8361122b565b9150611adb82611a9a565b602082019050919050565b60006020820190508181036000830152611aff81611ac3565b9050919050565b7f726566756e6461626c653a20616c72656164792077697468647261776e000000600082015250565b6000611b3c601d8361122b565b9150611b4782611b06565b602082019050919050565b60006020820190508181036000830152611b6b81611b2f565b9050919050565b7f726566756e6461626c653a2074696d656c6f636b206e6f74207965742070617360008201527f7365640000000000000000000000000000000000000000000000000000000000602082015250565b6000611bce60238361122b565b9150611bd982611b72565b604082019050919050565b60006020820190508181036000830152611bfd81611bc1565b905091905056fea26469706673582212201c8fccefa84e0507224487e55792c8a701a4a836fd9404057870145820cd434a64736f6c63430008110033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:26150: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"
},