UNPKG

jcc-solidity-utils

Version:
675 lines (674 loc) 113 kB
{ "contractName": "MockTransferList", "abi": [ { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_tokenHash", "type": "bytes32" }, { "name": "_amount", "type": "uint256" }, { "name": "_to", "type": "string" } ], "name": "insert", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_idx", "type": "uint256" } ], "name": "getByIdx", "outputs": [ { "components": [ { "name": "from", "type": "address" }, { "name": "tokenHash", "type": "bytes32" }, { "name": "amount", "type": "uint256" }, { "name": "idx", "type": "uint256" }, { "name": "to", "type": "string" } ], "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_hash", "type": "bytes32" } ], "name": "getByHash", "outputs": [ { "components": [ { "name": "from", "type": "address" }, { "name": "tokenHash", "type": "bytes32" }, { "name": "amount", "type": "uint256" }, { "name": "idx", "type": "uint256" }, { "name": "to", "type": "string" } ], "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "from", "type": "uint256" }, { "name": "_count", "type": "uint256" } ], "name": "getList", "outputs": [ { "components": [ { "name": "from", "type": "address" }, { "name": "tokenHash", "type": "bytes32" }, { "name": "amount", "type": "uint256" }, { "name": "idx", "type": "uint256" }, { "name": "to", "type": "string" } ], "name": "", "type": "tuple[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "count", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getByIdx\",\"outputs\":[{\"components\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"tokenHash\",\"type\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"idx\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"string\"}],\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"getByHash\",\"outputs\":[{\"components\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"tokenHash\",\"type\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"idx\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"string\"}],\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\"},{\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"getList\",\"outputs\":[{\"components\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"tokenHash\",\"type\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"idx\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"string\"}],\"name\":\"\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_tokenHash\",\"type\":\"bytes32\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_to\",\"type\":\"string\"}],\"name\":\"insert\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockTransferList.sol\":\"MockTransferList\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/TransferList.sol\":{\"keccak256\":\"0xa727d843e9e080cfb18db56d3743b43976e6088611fe9410116979c3445ba307\",\"urls\":[\"bzzr://85a66c643474d182af350b259820260ef87a94eeda0c3128209a42437452bc83\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x239546071316c89d3bbc9e61b2ccae270a4493bbd2f7c240052f533807d50ab7\",\"urls\":[\"bzzr://267bf48e0a30f7b671aa3c98a6b27ffe7bc64efd6533f49e54188b520baa94c5\"]},\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockTransferList.sol\":{\"keccak256\":\"0x3577130ff8cfdeea2b0fc418a06fd5255622f3c95dbd83dc8bf273f0395a0e13\",\"urls\":[\"bzzr://01543f5bf5e77d681f88cf2798664d05462a5545b37c7d6feabb9eec8e8b1035\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50610e6b806100206000396000f30060806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780639f8ddccc1461009c578063a2dd3d47146100c9578063a9816b08146100e9578063b24ca95914610116575b600080fd5b34801561007d57600080fd5b50610086610136565b6040516100939190610d17565b60405180910390f35b3480156100a857600080fd5b506100bc6100b7366004610a77565b610148565b6040516100939190610d75565b3480156100d557600080fd5b506100bc6100e4366004610a77565b610167565b3480156100f557600080fd5b50610109610104366004610a9d565b610180565b6040516100939190610d06565b34801561012257600080fd5b506100866101313660046109fe565b61019b565b600061014260006101b9565b90505b90565b6101506108be565b61016160008363ffffffff6101c016565b92915050565b61016f6108be565b61016160008363ffffffff6102f316565b60606101946000848463ffffffff61034616565b9392505050565b60006101b0818686868663ffffffff61052016565b95945050505050565b6001015490565b6101c86108be565b6101d2838361063d565b15156101fc5760405160e560020a62461bcd0281526004016101f390610d65565b60405180910390fd5b6001830180548390811061020c57fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815293949193608086019390929091908301828280156102e25780601f106102b7576101008083540402835291602001916102e2565b820191906000526020600020905b8154815290600101906020018083116102c557829003601f168201915b505050505081525050905092915050565b6102fb6108be565b610305838361065c565b15156103265760405160e560020a62461bcd0281526004016101f390610d35565b600082815260208490526040902054600184018054909190811061020c57fe5b6001830154606090600090829082908610156103775760405160e560020a62461bcd0281526004016101f390610d45565b6000851161039a5760405160e560020a62461bcd0281526004016101f390610d55565b846040519080825280602002602001820160405280156103d457816020015b6103c16108be565b8152602001906001900390816103b95790505b5091508590505b600187015481101561051657848314156103f457610516565b6001870180548290811061040457fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815293949193608086019390929091908301828280156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b50505050508152505082848151811015156104f157fe5b6020908102909101015261050c83600163ffffffff61078816565b92506001016103db565b5095945050505050565b600061052a6108be565b506040805160a081018252600160a060020a0387168152602081018690529081018490526001870154606082015260808101839052600061056a82610797565b9050610576888261065c565b156105965760405160e560020a62461bcd0281526004016101f390610d25565b6001888101805480830180835560009283526020928390208651600590930201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909316929092178255858301519382019390935560408501516002820155606085015160038201556080850151805186936106199260048501929101906108fa565b5050506060830151600083815260208b905260409020555091505095945050505050565b6001820154600090821061065357506000610161565b50600192915050565b6001820154600090819015156106755760009150610781565b600083815260208590526040902054600185018054909190811061069557fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815291955061077c948693608086019392909183018282801561076e5780601f106107435761010080835404028352916020019161076e565b820191906000526020600020905b81548152906001019060200180831161075157829003601f168201915b505050505081525050610797565b831491505b5092915050565b60008282018381101561019457fe5b6000816000015182602001518360400151846060015185608001516040516020018086600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401856000191660001916815260200184815260200183815260200182805190602001908083835b602083106108255780518252601f199092019160209182019101610806565b6001836020036101000a038019825116818451168082178552505050505050905001955050505050506040516020818303038152906040526040518082805190602001908083835b6020831061088c5780518252601f19909201916020918201910161086d565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60a0604051908101604052806000600160a060020a03168152602001600080191681526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061093b57805160ff1916838001178555610968565b82800160010185558215610968579182015b8281111561096857825182559160200191906001019061094d565b50610974929150610978565b5090565b61014591905b80821115610974576000815560010161097e565b60006101948235610ddf565b60006101948235610145565b6000601f820183136109bb57600080fd5b81356109ce6109c982610dad565b610d86565b915080825260208301602083018583830111156109ea57600080fd5b6109f5838284610deb565b50505092915050565b60008060008060808587031215610a1457600080fd5b6000610a208787610992565b9450506020610a318782880161099e565b9350506040610a428782880161099e565b925050606085013567ffffffffffffffff811115610a5f57600080fd5b610a6b878288016109aa565b91505092959194509250565b600060208284031215610a8957600080fd5b6000610a95848461099e565b949350505050565b60008060408385031215610ab057600080fd5b6000610abc858561099e565b9250506020610acd8582860161099e565b9150509250929050565b610ae081610ddf565b82525050565b6000610af182610ddb565b80845260208401935083602082028501610b0a85610dd5565b60005b84811015610b41578383038852610b25838351610ca1565b9250610b3082610dd5565b602098909801979150600101610b0d565b50909695505050505050565b610ae081610145565b6000610b6182610ddb565b808452610b75816020860160208601610df7565b610b7e81610e27565b9093016020019392505050565b601881527f73616d65207472616e7366657220646174612065786973740000000000000000602082015260400190565b601381527f6861736820646f6573206e6f7420657869737400000000000000000000000000602082015260400190565b601a81527f66726f6d206d75737420736d616c6c207468616e20636f756e74000000000000602082015260400190565b60208082527f72657475726e206e756d626572206d75737420626967676572207468616e20309082015260400190565b602381527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60208201527f756e740000000000000000000000000000000000000000000000000000000000604082015260600190565b805160009060a0840190610cb58582610ad7565b506020830151610cc86020860182610b4d565b506040830151610cdb6040860182610b4d565b506060830151610cee6060860182610b4d565b50608083015184820360808601526101b08282610b56565b602080825281016101948184610ae6565b602081016101618284610b4d565b6020808252810161016181610b8b565b6020808252810161016181610bbb565b6020808252810161016181610beb565b6020808252810161016181610c1b565b6020808252810161016181610c4b565b602080825281016101948184610ca1565b60405181810167ffffffffffffffff81118282101715610da557600080fd5b604052919050565b600067ffffffffffffffff821115610dc457600080fd5b506020601f91909101601f19160190565b60200190565b5190565b600160a060020a031690565b82818337506000910152565b60005b83811015610e12578181015183820152602001610dfa565b83811115610e21576000848401525b50505050565b601f01601f1916905600a265627a7a72305820a5238a19d110c96cc6f8c324b9064a17c12873975776cce1c406f3df8d78c96b6c6578706572696d656e74616cf50037", "deployedBytecode": "0x60806040526004361061006c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306661abd81146100715780639f8ddccc1461009c578063a2dd3d47146100c9578063a9816b08146100e9578063b24ca95914610116575b600080fd5b34801561007d57600080fd5b50610086610136565b6040516100939190610d17565b60405180910390f35b3480156100a857600080fd5b506100bc6100b7366004610a77565b610148565b6040516100939190610d75565b3480156100d557600080fd5b506100bc6100e4366004610a77565b610167565b3480156100f557600080fd5b50610109610104366004610a9d565b610180565b6040516100939190610d06565b34801561012257600080fd5b506100866101313660046109fe565b61019b565b600061014260006101b9565b90505b90565b6101506108be565b61016160008363ffffffff6101c016565b92915050565b61016f6108be565b61016160008363ffffffff6102f316565b60606101946000848463ffffffff61034616565b9392505050565b60006101b0818686868663ffffffff61052016565b95945050505050565b6001015490565b6101c86108be565b6101d2838361063d565b15156101fc5760405160e560020a62461bcd0281526004016101f390610d65565b60405180910390fd5b6001830180548390811061020c57fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815293949193608086019390929091908301828280156102e25780601f106102b7576101008083540402835291602001916102e2565b820191906000526020600020905b8154815290600101906020018083116102c557829003601f168201915b505050505081525050905092915050565b6102fb6108be565b610305838361065c565b15156103265760405160e560020a62461bcd0281526004016101f390610d35565b600082815260208490526040902054600184018054909190811061020c57fe5b6001830154606090600090829082908610156103775760405160e560020a62461bcd0281526004016101f390610d45565b6000851161039a5760405160e560020a62461bcd0281526004016101f390610d55565b846040519080825280602002602001820160405280156103d457816020015b6103c16108be565b8152602001906001900390816103b95790505b5091508590505b600187015481101561051657848314156103f457610516565b6001870180548290811061040457fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815293949193608086019390929091908301828280156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b50505050508152505082848151811015156104f157fe5b6020908102909101015261050c83600163ffffffff61078816565b92506001016103db565b5095945050505050565b600061052a6108be565b506040805160a081018252600160a060020a0387168152602081018690529081018490526001870154606082015260808101839052600061056a82610797565b9050610576888261065c565b156105965760405160e560020a62461bcd0281526004016101f390610d25565b6001888101805480830180835560009283526020928390208651600590930201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909316929092178255858301519382019390935560408501516002820155606085015160038201556080850151805186936106199260048501929101906108fa565b5050506060830151600083815260208b905260409020555091505095945050505050565b6001820154600090821061065357506000610161565b50600192915050565b6001820154600090819015156106755760009150610781565b600083815260208590526040902054600185018054909190811061069557fe5b60009182526020918290206040805160a08101825260059093029091018054600160a060020a031683526001808201548486015260028083015485850152600383015460608601526004830180548551601f9482161561010002600019019091169290920492830187900487028201870190945281815291955061077c948693608086019392909183018282801561076e5780601f106107435761010080835404028352916020019161076e565b820191906000526020600020905b81548152906001019060200180831161075157829003601f168201915b505050505081525050610797565b831491505b5092915050565b60008282018381101561019457fe5b6000816000015182602001518360400151846060015185608001516040516020018086600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401856000191660001916815260200184815260200183815260200182805190602001908083835b602083106108255780518252601f199092019160209182019101610806565b6001836020036101000a038019825116818451168082178552505050505050905001955050505050506040516020818303038152906040526040518082805190602001908083835b6020831061088c5780518252601f19909201916020918201910161086d565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b60a0604051908101604052806000600160a060020a03168152602001600080191681526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061093b57805160ff1916838001178555610968565b82800160010185558215610968579182015b8281111561096857825182559160200191906001019061094d565b50610974929150610978565b5090565b61014591905b80821115610974576000815560010161097e565b60006101948235610ddf565b60006101948235610145565b6000601f820183136109bb57600080fd5b81356109ce6109c982610dad565b610d86565b915080825260208301602083018583830111156109ea57600080fd5b6109f5838284610deb565b50505092915050565b60008060008060808587031215610a1457600080fd5b6000610a208787610992565b9450506020610a318782880161099e565b9350506040610a428782880161099e565b925050606085013567ffffffffffffffff811115610a5f57600080fd5b610a6b878288016109aa565b91505092959194509250565b600060208284031215610a8957600080fd5b6000610a95848461099e565b949350505050565b60008060408385031215610ab057600080fd5b6000610abc858561099e565b9250506020610acd8582860161099e565b9150509250929050565b610ae081610ddf565b82525050565b6000610af182610ddb565b80845260208401935083602082028501610b0a85610dd5565b60005b84811015610b41578383038852610b25838351610ca1565b9250610b3082610dd5565b602098909801979150600101610b0d565b50909695505050505050565b610ae081610145565b6000610b6182610ddb565b808452610b75816020860160208601610df7565b610b7e81610e27565b9093016020019392505050565b601881527f73616d65207472616e7366657220646174612065786973740000000000000000602082015260400190565b601381527f6861736820646f6573206e6f7420657869737400000000000000000000000000602082015260400190565b601a81527f66726f6d206d75737420736d616c6c207468616e20636f756e74000000000000602082015260400190565b60208082527f72657475726e206e756d626572206d75737420626967676572207468616e20309082015260400190565b602381527f696e646578206d75737420736d616c6c207468616e2063757272656e7420636f60208201527f756e740000000000000000000000000000000000000000000000000000000000604082015260600190565b805160009060a0840190610cb58582610ad7565b506020830151610cc86020860182610b4d565b506040830151610cdb6040860182610b4d565b506060830151610cee6060860182610b4d565b50608083015184820360808601526101b08282610b56565b602080825281016101948184610ae6565b602081016101618284610b4d565b6020808252810161016181610b8b565b6020808252810161016181610bbb565b6020808252810161016181610beb565b6020808252810161016181610c1b565b6020808252810161016181610c4b565b602080825281016101948184610ca1565b60405181810167ffffffffffffffff81118282101715610da557600080fd5b604052919050565b600067ffffffffffffffff821115610dc457600080fd5b506020601f91909101601f19160190565b60200190565b5190565b600160a060020a031690565b82818337506000910152565b60005b83811015610e12578181015183820152602001610dfa565b83811115610e21576000848401525b50505050565b601f01601f1916905600a265627a7a72305820a5238a19d110c96cc6f8c324b9064a17c12873975776cce1c406f3df8d78c96b6c6578706572696d656e74616cf50037", "sourceMap": "140:813:28:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;140:813:28;;;;;;;", "deployedSourceMap": "140:813:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;869:82;;8:9:-1;5:2;;;30:1;27;20:12;5:2;869:82:28;;;;;;;;;;;;;;;;;;;;457:117;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;457:117:28;;;;;;;;;;;;;;;;;578:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;578:121:28;;;;;;;;;703:162;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;703:162:28;;;;;;;;;;;;;;;;;261:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;261:192:28;;;;;;;;;869:82;907:7;929:17;:9;:15;:17::i;:::-;922:24;;869:82;;:::o;457:117::-;510:20;;:::i;:::-;545:24;:9;564:4;545:24;:18;:24;:::i;:::-;538:31;457:117;-1:-1:-1;;457:117:28:o;578:121::-;633:20;;:::i;:::-;668:26;:9;688:5;668:26;:19;:26;:::i;703:162::-;783:22;829:31;:9;847:4;853:6;829:31;:17;:31;:::i;:::-;822:38;703:162;-1:-1:-1;;;703:162:28:o;261:192::-;377:7;399:49;377:7;416:5;423:10;435:7;444:3;399:49;:16;:49;:::i;:::-;392:56;261:192;-1:-1:-1;;;;;261:192:28:o;1852:107:18:-;1938:9;;:16;;1852:107::o;1963:226::-;2056:20;;:::i;:::-;2094:22;2105:4;2111;2094:10;:22::i;:::-;2086:70;;;;;;-1:-1:-1;;;;;2086:70:18;;;;;;;;;;;;;;;;;2169:9;;;:15;;2179:4;;2169:15;;;;;;;;;;;;;;;2162:22;;;;;;;;2169:15;;;;;;;2162:22;;-1:-1:-1;;;;;2162:22:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2162:22:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;2169:15;;2162:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1963:226;;;;:::o;2193:225::-;2288:20;;:::i;:::-;2326:24;2338:4;2344:5;2326:11;:24::i;:::-;2318:56;;;;;;-1:-1:-1;;;;;2318:56:18;;;;;;;;;2397:8;:15;;;;;;;;;;;2387:9;;;:26;;:9;;2397:15;2387:26;;;;;2523:567;2710:9;;;:16;2635:22;;2672:12;;2635:22;;2672:12;;2702:24;;;2694:63;;;;-1:-1:-1;;;;;2694:63:18;;;;;;;;;2780:1;2771:10;;2763:55;;;;-1:-1:-1;;;;;2763:55:18;;;;;;;;;2888:6;2861:34;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;2825:70;;2919:4;2907:16;;2902:167;2929:9;;;:16;2925:20;;2902:167;;;2972:6;2964:4;:14;2960:44;;;2990:5;;2960:44;3024:9;;;:12;;3034:1;;3024:12;;;;;;;;;;;;;;;3012:24;;;;;;;;3024:12;;;;;;;3012:24;;-1:-1:-1;;;;;3012:24:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3012:24:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;3024:12;;3012:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:3;3016:4;3012:9;;;;;;;;;;;;;;;;;;:24;3051:11;:4;3060:1;3051:11;:8;:11;:::i;:::-;3044:18;-1:-1:-1;2947:3:18;;2902:167;;;-1:-1:-1;3082:3:18;2523:567;-1:-1:-1;;;;;2523:567:18:o;1340:508::-;1488:7;1503:16;;:::i;:::-;-1:-1:-1;1528:142:18;;;;;;;;-1:-1:-1;;;;;1528:142:18;;;;;;;;;;;;;;;;1628:9;;;:16;1528:142;;;;;;;;;;1677:13;1693:10;1528:142;1693:7;:10::i;:::-;1677:26;;1718:24;1730:4;1736:5;1718:11;:24::i;:::-;1717:25;1709:62;;;;-1:-1:-1;;;;;1709:62:18;;;;;;;;;1778:9;;;;27:10:-1;;23:18;;;45:23;;;-1:-1;1778:17:18;;;;;;;;;;;;;;;;;-1:-1:-1;;1778:17:18;-1:-1:-1;;;;;1778:17:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;1819:5:18;;;;1801:8;:15;;;;;;;;;;:23;-1:-1:-1;1810:5:18;-1:-1:-1;1340:508:18;;;;;;;;:::o;786:173::-;907:9;;;:16;881:4;;899:24;;895:42;;-1:-1:-1;932:5:18;925:12;;895:42;-1:-1:-1;950:4:18;786:173;;;;:::o;963:337::-;1176:9;;;:16;1060:4;;;;1176:21;1172:39;;;1206:5;1199:12;;;;1172:39;1247:8;:15;;;;;;;;;;;1237:9;;;:26;;:9;;1247:15;1237:26;;;;;;;;;;;;;;;1285:10;;;;;;;;1237:26;;;;;;;1285:10;;-1:-1:-1;;;;;1285:10:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1285:10:18;;;;;;;;;;;;;;;;;;;;;;;;;;1237:26;;-1:-1:-1;1285:10:18;;1237:26;;1285:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;:10::i;:::-;1276:19;;;-1:-1:-1;963:337:18;;;;;;:::o;1319:134:20:-;1379:7;1406;;;1426;;;;1419:15;;;627:155:18;678:7;733:1;:6;;;741:1;:11;;;754:1;:8;;;764:1;:5;;;771:1;:4;;;716:60;;;;;;-1:-1:-1;;;;;716:60:18;-1:-1:-1;;;;;716:60:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;716:60:18;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;716:60:18;;;706:71;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;706:71:18;;;;;;;;;;;;-1:-1:-1;;;;;627:155:18:o;140:813:28:-;;;;;;;;;;;-1:-1:-1;;;;;140:813:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;140:813:28;;;-1:-1:-1;140:813:28;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;5:118:-1;;72:46;110:6;97:20;72:46;;130:118;;197:46;235:6;222:20;197:46;;256:442;;351:4;339:17;;335:27;-1:-1;325:2;;376:1;373;366:12;325:2;413:6;400:20;435:65;450:49;492:6;450:49;;;435:65;;;426:74;;520:6;513:5;506:21;556:4;548:6;544:17;589:4;582:5;578:16;624:3;615:6;610:3;606:16;603:25;600:2;;;641:1;638;631:12;600:2;651:41;685:6;680:3;675;651:41;;;318:380;;;;;;;;831:723;;;;;996:3;984:9;975:7;971:23;967:33;964:2;;;1013:1;1010;1003:12;964:2;1048:1;1065:53;1110:7;1090:9;1065:53;;;1055:63;;1027:97;1155:2;1173:53;1218:7;1209:6;1198:9;1194:22;1173:53;;;1163:63;;1134:98;1263:2;1281:53;1326:7;1317:6;1306:9;1302:22;1281:53;;;1271:63;;1242:98;1399:2;1388:9;1384:18;1371:32;1423:18;1415:6;1412:30;1409:2;;;1455:1;1452;1445:12;1409:2;1475:63;1530:7;1521:6;1510:9;1506:22;1475:63;;;1465:73;;1350:194;958:596;;;;;;;;1561:241;;1665:2;1653:9;1644:7;1640:23;1636:32;1633:2;;;1681:1;1678;1671:12;1633:2;1716:1;1733:53;1778:7;1758:9;1733:53;;;1723:63;1627:175;-1:-1;;;;1627:175;2057:366;;;2178:2;2166:9;2157:7;2153:23;2149:32;2146:2;;;2194:1;2191;2184:12;2146:2;2229:1;2246:53;2291:7;2271:9;2246:53;;;2236:63;;2208:97;2336:2;2354:53;2399:7;2390:6;2379:9;2375:22;2354:53;;;2344:63;;2315:98;2140:283;;;;;;2430:110;2503:31;2528:5;2503:31;;;2498:3;2491:44;2485:55;;;2618:878;;2795:75;2864:5;2795:75;;;2888:6;2883:3;2876:19;2912:4;2907:3;2903:14;2896:21;;2960:3;3002:4;2994:6;2990:17;2985:3;2981:27;3028:77;3099:5;3028:77;;;3126:1;3111:346;3136:6;3133:1;3130:13;3111:346;;;3198:9;3192:4;3188:20;3183:3;3176:33;3224:100;3319:4;3310:6;3304:13;3224:100;;;3216:108;;3341:81;3415:6;3341:81;;;3445:4;3436:14;;;;;3331:91;-1:-1;3158:1;3151:9;3111:346;;;-1:-1;3470:4;;2774:722;-1:-1;;;;;;2774:722;3504:110;3577:31;3602:5;3577:31;;3621:292;;3719:35;3748:5;3719:35;;;3771:6;3766:3;3759:19;3783:63;3839:6;3832:4;3827:3;3823:14;3816:4;3809:5;3805:16;3783:63;;;3878:29;3900:6;3878:29;;;3858:50;;;3871:4;3858:50;;3699:214;-1:-1;;;3699:214;3921:296;4076:2;4064:15;;4113:66;4108:2;4099:12;;4092:88;4208:2;4199:12;;4057:160;4226:296;4381:2;4369:15;;4418:66;4413:2;4404:12;;4397:88;4513:2;4504:12;;4362:160;4531:296;4686:2;4674:15;;4723:66;4718:2;4709:12;;4702:88;4818:2;4809:12;;4667:160;4836:296;4991:2;4979:15;;;5028:66;5014:12;;;5007:88;5123:2;5114:12;;4972:160;5141:397;5296:2;5284:15;;5333:66;5328:2;5319:12;;5312:88;5434:66;5429:2;5420:12;;5413:88;5529:2;5520:12;;5277:261;5611:1078;5821:22;;5611:1078;;5752:4;5743:14;;;5855:61;5747:3;5821:22;5855:61;;;5772:156;6009:4;6002:5;5998:16;5992:23;6027:62;6083:4;6078:3;6074:14;6061:11;6027:62;;;5938:163;6179:4;6172:5;6168:16;6162:23;6197:62;6253:4;6248:3;6244:14;6231:11;6197:62;;;6111:160;6346:4;6339:5;6335:16;6329:23;6364:62;6420:4;6415:3;6411:14;6398:11;6364:62;;;6281:157;6512:4;6505:5;6501:16;6495:23;6563:3;6557:4;6553:14;6546:4;6541:3;6537:14;6530:38;6583:68;6646:4;6633:11;6583:68;;7959:425;8159:2;8173:47;;;8144:18;;8234:140;8144:18;8360:6;8234:140;;8391:193;8499:2;8484:18;;8513:61;8488:9;8547:6;8513:61;;8591:387;8772:2;8786:47;;;8757:18;;8847:121;8757:18;8847:121;;8985:387;9166:2;9180:47;;;9151:18;;9241:121;9151:18;9241:121;;9379:387;9560:2;9574:47;;;9545:18;;9635:121;9545:18;9635:121;;9773:387;9954:2;9968:47;;;9939:18;;10029:121;9939:18;10029:121;;10167:387;10348:2;10362:47;;;10333:18;;10423:121;10333:18;10423:121;;10561:341;10719:2;10733:47;;;10704:18;;10794:98;10704:18;10878:6;10794:98;;11109:256;11171:2;11165:9;11197:17;;;11272:18;11257:34;;11293:22;;;11254:62;11251:2;;;11329:1;11326;11319:12;11251:2;11345;11338:22;11149:216;;-1:-1;11149:216;11372:259;;11516:18;11508:6;11505:30;11502:2;;;11548:1;11545;11538:12;11502:2;-1:-1;11621:4;11592;11569:17;;;;-1:-1;;11565:33;11611:15;;11439:192;11640:142;11770:4;11758:17;;11739:43;11791:128;11902:12;;11886:33;12173:128;-1:-1;;;;;12242:54;;12225:76;12788:145;12869:6;12864:3;12859;12846:30;-1:-1;12925:1;12907:16;;12900:27;12839:94;12942:268;13007:1;13014:101;13028:6;13025:1;13022:13;13014:101;;;13095:11;;;13089:18;13076:11;;;13069:39;13050:2;13043:10;13014:101;;;13130:6;13127:1;13124:13;13121:2;;;13195:1;13186:6;13181:3;13177:16;13170:27;13121:2;12991:219;;;;;13218:97;13306:2;13286:14;-1:-1;;13282:28;;13266:49", "source": "pragma solidity >=0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../list/TransferList.sol\";\n\n// 定义一个调用TransferList的合约\ncontract MockTransferList {\n using TransferList for TransferList.transferMap;\n\n TransferList.transferMap transfers;\n\n function insert(\n address _from,\n bytes32 _tokenHash,\n uint256 _amount,\n string _to\n ) public returns (bytes32) {\n return transfers.insert(_from, _tokenHash, _amount, _to);\n }\n\n function getByIdx(uint256 _idx) public view returns (TransferList.element) {\n return transfers.getByIdx(_idx);\n }\n\n function getByHash(bytes32 _hash) public view returns (TransferList.element) {\n return transfers.getByHash(_hash);\n }\n\n function getList(uint256 from, uint256 _count)\n public\n view\n returns (TransferList.element[] memory)\n {\n return transfers.getList(from, _count);\n }\n\n function count() public view returns (uint256) {\n return transfers.count();\n }\n}\n", "sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockTransferList.sol", "ast": { "absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/mock/MockTransferList.sol", "exportedSymbols": { "MockTransferList": [ 6478 ] }, "id": 6479, "nodeType": "SourceUnit", "nodes": [ { "id": 6395, "literals": [ "solidity", ">=", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:25:28" }, { "id": 6396, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "26:33:28" }, { "absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/list/TransferList.sol", "file": "../list/TransferList.sol", "id": 6397, "nodeType": "ImportDirective", "scope": 6479, "sourceUnit": 5283, "src": "61:34:28", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 6478, "linearizedBaseContracts": [ 6478 ], "name": "MockTransferList", "nodeType": "ContractDefinition", "nodes": [ { "id": 6400, "libraryName": { "contractScope": null, "id": 6398, "name": "TransferList", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5282, "src": "176:12:28", "typeDescriptions": { "typeIdentifier": "t_contract$_TransferList_$5282", "typeString": "library TransferList" } }, "nodeType": "UsingForDirective", "src": "170:48:28", "typeName": { "contractScope": null, "id": 6399, "name": "TransferList.transferMap", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4998, "src": "193:24:28", "typeDescriptions": { "typeIdentifier": "t_struct$_transferMap_$4998_storage_ptr", "typeString": "struct TransferList.transferMap" } } }, { "constant": false, "id": 6402, "name": "transfers", "nodeType": "VariableDeclaration", "scope": 6478, "src": "222:34:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_struct$_transferMap_$4998_storage", "typeString": "struct TransferList.transferMap" }, "typeName": { "contractScope": null, "id": 6401, "name": "TransferList.transferMap", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4998, "src": "222:24:28", "typeDescriptions": { "typeIdentifier": "t_struct$_transferMap_$4998_storage_ptr", "typeString": "struct TransferList.transferMap" } }, "value": null, "visibility": "internal" }, { "body": { "id": 6423, "nodeType": "Block", "src": "386:67:28", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6417, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6404, "src": "416:5:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 6418, "name": "_tokenHash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6406, "src": "423:10:28", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 6419, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6408, "src": "435:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 6420, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6410, "src": "444:3:28", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "argumentTypes": null, "id": 6415, "name": "transfers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6402, "src": "399:9:28", "typeDescriptions": { "typeIdentifier": "t_struct$_transferMap_$4998_storage", "typeString": "struct TransferList.transferMap storage ref" } }, "id": 6416, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "insert", "nodeType": "MemberAccess", "referencedDeclaration": 5138, "src": "399:16:28", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_transferMap_$4998_storage_ptr_$_t_address_$_t_bytes32_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes32_$bound_to$_t_struct$_transferMap_$4998_storage_ptr_$", "typeString": "function (struct TransferList.transferMap storage pointer,address,bytes32,uint256,string memory) returns (bytes32)" } }, "id": 6421, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "399:49:28", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "functionReturnParameters": 6414, "id": 6422, "nodeType": "Return", "src": "392:56:28" } ] }, "documentation": null, "id": 6424, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "insert", "nodeType": "FunctionDefinition", "parameters": { "id": 6411, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6404, "name": "_from", "nodeType": "VariableDeclaration", "scope": 6424, "src": "282:13:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6403, "name": "address", "nodeType": "ElementaryTypeName", "src": "282:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6406, "name": "_tokenHash", "nodeType": "VariableDeclaration", "scope": 6424, "src": "301:18:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6405, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "301:7:28", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6408, "name": "_amount", "nodeType": "VariableDeclaration", "scope": 6424, "src": "325:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6407, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "325:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 6410, "name": "_to", "nodeType": "VariableDeclaration", "scope": 6424, "src": "346:10:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 6409, "name": "string", "nodeType": "ElementaryTypeName", "src": "346:6:28", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "276:84:28" }, "payable": false, "returnParameters": { "id": 6414, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6413, "name": "", "nodeType": "VariableDeclaration", "scope": 6424, "src": "377:7:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6412, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "377:7:28", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "376:9:28" }, "scope": 6478, "src": "261:192:28", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 6436, "nodeType": "Block", "src": "532:42:28", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6433, "name": "_idx", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6426, "src": "564:4:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 6431, "name": "transfers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6402, "src": "545:9:28", "typeDescriptions": { "typeIdentifier": "t_struct$_transferMap_$4998_storage", "typeString": "struct TransferList.transferMap storage ref" } }, "id": 6432, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "getByIdx", "nodeType": "MemberAccess", "referencedDeclaration": 5173, "src": "545:18:28", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_struct$_transferMap_$4998_storage_ptr_$_t_uint256_$returns$_t_struct$_element_$4990_memory_ptr_$bound_to$_t_struct$_transferMap_$4998_storage_ptr_$", "typeString": "function (struct TransferList.transferMap storage pointer,uint256) view returns (struct TransferList.element memory)" } }, "id": 6434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "545:24:28", "typeDescriptions": { "typeIdentifier": "t_struct$_element_$4990_memory_ptr", "typeString": "struct TransferList.element memory" } }, "functionReturnParameters": 6430, "id": 6435, "nodeType": "Return", "src": "538:31:28" } ] }, "documentation": null, "id": 6437, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getByIdx", "nodeType": "FunctionDefinition", "parameters": { "id": 6427, "nodeType": "ParameterList", "parameters": [