From 944c63af318362af95dcb3caf783e57384269f75 Mon Sep 17 00:00:00 2001 From: yongchand Date: Sun, 9 Apr 2023 16:23:58 +0900 Subject: [PATCH 1/3] Support ERC-1155 --- ethereumetl/domain/contract.py | 1 + ethereumetl/jobs/export_contracts_job.py | 1 + .../jobs/exporters/contracts_item_exporter.py | 1 + ethereumetl/mappers/contract_mapper.py | 1 + ethereumetl/service/eth_contract_service.py | 25 +++++++++++++++++-- 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ethereumetl/domain/contract.py b/ethereumetl/domain/contract.py index c1df1c8f8..f2c04edba 100644 --- a/ethereumetl/domain/contract.py +++ b/ethereumetl/domain/contract.py @@ -28,4 +28,5 @@ def __init__(self): self.function_sighashes = [] self.is_erc20 = False self.is_erc721 = False + self.is_erc1155 = False self.block_number = None diff --git a/ethereumetl/jobs/export_contracts_job.py b/ethereumetl/jobs/export_contracts_job.py index 08f36bc52..c7518899a 100644 --- a/ethereumetl/jobs/export_contracts_job.py +++ b/ethereumetl/jobs/export_contracts_job.py @@ -81,6 +81,7 @@ def _get_contract(self, contract_address, rpc_result): contract.function_sighashes = function_sighashes contract.is_erc20 = self.contract_service.is_erc20_contract(function_sighashes) contract.is_erc721 = self.contract_service.is_erc721_contract(function_sighashes) + contract.is_erc1155 = self.contract_service.is_erc1155_contract(function_sighashes) return contract diff --git a/ethereumetl/jobs/exporters/contracts_item_exporter.py b/ethereumetl/jobs/exporters/contracts_item_exporter.py index b977db774..1816cf9b6 100644 --- a/ethereumetl/jobs/exporters/contracts_item_exporter.py +++ b/ethereumetl/jobs/exporters/contracts_item_exporter.py @@ -29,6 +29,7 @@ 'function_sighashes', 'is_erc20', 'is_erc721', + 'is_erc1155', 'block_number', ] diff --git a/ethereumetl/mappers/contract_mapper.py b/ethereumetl/mappers/contract_mapper.py index 7ae2b2462..8fe1d9176 100644 --- a/ethereumetl/mappers/contract_mapper.py +++ b/ethereumetl/mappers/contract_mapper.py @@ -41,5 +41,6 @@ def contract_to_dict(self, contract): 'function_sighashes': contract.function_sighashes, 'is_erc20': contract.is_erc20, 'is_erc721': contract.is_erc721, + 'is_erc1155': contract.is_erc1155, 'block_number': contract.block_number } diff --git a/ethereumetl/service/eth_contract_service.py b/ethereumetl/service/eth_contract_service.py index 827939b15..e01a14bc0 100644 --- a/ethereumetl/service/eth_contract_service.py +++ b/ethereumetl/service/eth_contract_service.py @@ -28,6 +28,7 @@ class EthContractService: def get_function_sighashes(self, bytecode): bytecode = clean_bytecode(bytecode) + function_sighashes = [] if bytecode is not None: evm_code = EvmCode(contract=Contract(bytecode=bytecode), static_analysis=False, dynamic_analysis=False) evm_code.disassemble(bytecode) @@ -35,8 +36,15 @@ def get_function_sighashes(self, bytecode): if basic_blocks and len(basic_blocks) > 0: init_block = basic_blocks[0] instructions = init_block.instructions - push4_instructions = [inst for inst in instructions if inst.name == 'PUSH4'] - return sorted(list(set('0x' + inst.operand for inst in push4_instructions))) + for inst in instructions: + # Special case when balanceOf(address,uint256) becomes PUSH3 due to optimization + # https://github.com/blockchain-etl/ethereum-etl/issues/349#issuecomment-1243352201 + if inst.name == "PUSH3" and inst.operand == "fdd58e": + function_sighashes.append("0x00" + inst.operand) + if inst.name == "PUSH4": + function_sighashes.append("0x" + inst.operand) + + return sorted(list(set(function_sighashes))) else: return [] else: @@ -69,6 +77,19 @@ def is_erc721_contract(self, function_sighashes): c.implements_any_of('transfer(address,uint256)', 'transferFrom(address,address,uint256)') and \ c.implements('approve(address,uint256)') + # https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md + # https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol + def is_erc1155_contract(self, function_sighashes): + c = ContractWrapper(function_sighashes) + return ( + c.implements("balanceOf(address, uint256)") and \ + c.implements("balanceOfBatch(address[],uint256[])") and \ + c.implements("setApprovalForAll(address, bool)") and \ + c.implements("isApprovedForAll(address,address)") and \ + c.implements("safeTransferFrom(address,address,uint256,uint256,bytes)") and \ + c.implements("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)") + ) + def clean_bytecode(bytecode): if bytecode is None or bytecode == '0x': From 0636a58e73e67c01faaf7aae3ff30cf4f8b9cccc Mon Sep 17 00:00:00 2001 From: yongchand Date: Sun, 9 Apr 2023 16:27:27 +0900 Subject: [PATCH 2/3] Add Docs --- docs/commands.md | 4 ++-- docs/limitations.md | 2 +- docs/schema.md | 1 + ethereumetl/jobs/extract_contracts_job.py | 1 + ethereumetl/jobs/extract_tokens_job.py | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/commands.md b/docs/commands.md index ea8475734..50fac6d19 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -128,11 +128,11 @@ First extract token addresses from `contracts.json` (Exported with [export_contracts](#export_contracts)): ```bash -> ethereumetl filter_items -i contracts.json -p "item['is_erc20'] or item['is_erc721']" | \ +> ethereumetl filter_items -i contracts.json -p "item['is_erc20'] or item['is_erc721']" or item['is_erc1155']" | \ ethereumetl extract_field -f address -o token_addresses.txt ``` -Then export ERC20 / ERC721 tokens: +Then export ERC20 / ERC721 / ERC 1155 tokens: ```bash > ethereumetl export_tokens --token-addresses token_addresses.txt \ diff --git a/docs/limitations.md b/docs/limitations.md index dfd87660d..3c9a23d2c 100644 --- a/docs/limitations.md +++ b/docs/limitations.md @@ -1,7 +1,7 @@ # Limitation - In case the contract is a proxy, which forwards all calls to a delegate, interface detection doesn’t work, -which means `is_erc20` and `is_erc721` will always be false for proxy contracts and they will be missing in the `tokens` +which means `is_erc20`, `is_erc721` and `is_erc1155` will always be false for proxy contracts and they will be missing in the `tokens` table. - The metadata methods (`symbol`, `name`, `decimals`, `total_supply`) for ERC20 are optional, so around 10% of the contracts are missing this data. Also some contracts (EOS) implement these methods but with wrong return type, diff --git a/docs/schema.md b/docs/schema.md index 28f9e1682..bd2f8cd06 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -103,6 +103,7 @@ bytecode | hex_string | function_sighashes | string | is_erc20 | boolean | is_erc721 | boolean | +is_erc1155 | boolean | block_number | bigint | --- diff --git a/ethereumetl/jobs/extract_contracts_job.py b/ethereumetl/jobs/extract_contracts_job.py index 508f54372..d0749317a 100644 --- a/ethereumetl/jobs/extract_contracts_job.py +++ b/ethereumetl/jobs/extract_contracts_job.py @@ -74,6 +74,7 @@ def _extract_contracts(self, traces): contract.function_sighashes = function_sighashes contract.is_erc20 = self.contract_service.is_erc20_contract(function_sighashes) contract.is_erc721 = self.contract_service.is_erc721_contract(function_sighashes) + contract.is_erc1155 = self.contract_service.is_erc1155_contract(function_sighashes) contracts.append(contract) diff --git a/ethereumetl/jobs/extract_tokens_job.py b/ethereumetl/jobs/extract_tokens_job.py index 62679de71..f3cdda950 100644 --- a/ethereumetl/jobs/extract_tokens_job.py +++ b/ethereumetl/jobs/extract_tokens_job.py @@ -33,7 +33,7 @@ def _export(self): self.batch_work_executor.execute(self.contracts_iterable, self._export_tokens_from_contracts) def _export_tokens_from_contracts(self, contracts): - tokens = [contract for contract in contracts if contract.get('is_erc20') or contract.get('is_erc721')] + tokens = [contract for contract in contracts if contract.get('is_erc20') or contract.get('is_erc721') or contract.get('is_erc1155')] for token in tokens: self._export_token(token_address=token['address'], block_number=token['block_number']) From b7eaf0a47ba3b99f9e41c7be13c42b3462b9b52d Mon Sep 17 00:00:00 2001 From: yongchand Date: Sun, 9 Apr 2023 16:32:49 +0900 Subject: [PATCH 3/3] Add schema --- ethereumetl/streaming/enrich.py | 1 + ethereumetl/streaming/postgres_tables.py | 1 + schemas/aws/contracts.sql | 1 + .../test_stream/blocks_2112234_2112234/expected_contracts.json | 2 +- .../test_stream/blocks_508110_508110/expected_contracts.json | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ethereumetl/streaming/enrich.py b/ethereumetl/streaming/enrich.py index 6f8238805..e491b6a83 100644 --- a/ethereumetl/streaming/enrich.py +++ b/ethereumetl/streaming/enrich.py @@ -187,6 +187,7 @@ def enrich_contracts(blocks, contracts): 'function_sighashes', 'is_erc20', 'is_erc721', + 'is_erc1155', 'block_number' ], [ diff --git a/ethereumetl/streaming/postgres_tables.py b/ethereumetl/streaming/postgres_tables.py index 454239458..52f00ab25 100644 --- a/ethereumetl/streaming/postgres_tables.py +++ b/ethereumetl/streaming/postgres_tables.py @@ -148,6 +148,7 @@ Column('function_sighashes', ARRAY(String)), Column('is_erc20', Boolean), Column('is_erc721', Boolean), + Column('is_erc1155', Boolean), Column('block_number', BigInteger), PrimaryKeyConstraint('address', 'block_number', name='contracts_pk'), ) diff --git a/schemas/aws/contracts.sql b/schemas/aws/contracts.sql index afc28d7bf..1a29f6212 100644 --- a/schemas/aws/contracts.sql +++ b/schemas/aws/contracts.sql @@ -4,6 +4,7 @@ CREATE EXTERNAL TABLE IF NOT EXISTS contracts ( function_sighashes STRING, is_erc20 BOOLEAN, is_erc721 BOOLEAN + is_erc1155 BOOLEAN ) PARTITIONED BY (date STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' diff --git a/tests/resources/test_stream/blocks_2112234_2112234/expected_contracts.json b/tests/resources/test_stream/blocks_2112234_2112234/expected_contracts.json index 5109a2934..feb8e8f92 100644 --- a/tests/resources/test_stream/blocks_2112234_2112234/expected_contracts.json +++ b/tests/resources/test_stream/blocks_2112234_2112234/expected_contracts.json @@ -1 +1 @@ -{"type": "contract", "address": "0xdbdacfc9eb9d42559ac1efbdb40460c728139e6a", "bytecode": "0x6060604052361561008d5760e060020a600035046306fdde03811461008f578063095ea7b3146100a557806318160ddd1461012457806323b872dd1461012f578063313ce567146101dc578063475a9fa9146101f057806370a0823114610215578063721a37d21461024357806395d89b411461008f578063a9059cbb14610268578063dd62ed3e146102e7575b005b61031d6040805160208101909152600081525b90565b61038b60043560243560007319ee743d2e356d5f0e4d97cc09b96d06e933d0db63c6605267600160005085856040518460e060020a0281526004018084815260200183600160a060020a0316815260200182815260200193505050506020604051808303818660325a03f4156100025750506040515191506103179050565b6102316003546100a2565b61038b60043560243560443560008054604080517fa00bfa1100000000000000000000000000000000000000000000000000000000815260016004820152600160a060020a038781166024830152868116604483015260648201869052929092166084830152517319ee743d2e356d5f0e4d97cc09b96d06e933d0db9163a00bfa119160a482810192602092919082900301818660325a03f4156100025750506040515195945050505050565b604080516000815290519081900360200190f35b61038b6004356024356000805433600160a060020a0390811691161461039f57610002565b600160a060020a03600435166000908152600160205260409020545b60408051918252519081900360200190f35b61038b6004356024356000805433600160a060020a039081169116146103ce57610002565b61038b60043560243560007319ee743d2e356d5f0e4d97cc09b96d06e933d0db6388d5fecb600160005085856040518460e060020a0281526004018084815260200183600160a060020a0316815260200182815260200193505050506020604051808303818660325a03f4156100025750506040515191506103179050565b610231600435602435600160a060020a038281166000908152600260209081526040808320938516835292905220545b92915050565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561037d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b50600160a060020a03821660009081526001602081905260409091208054830190556003805483019055610317565b600160a060020a038316600090815260016020526040902054821161040a57506040600020805482900390556003805482900390556001610317565b50600061031756", "function_sighashes": ["0x06fdde03", "0x095ea7b3", "0x18160ddd", "0x23b872dd", "0x313ce567", "0x475a9fa9", "0x70a08231", "0x721a37d2", "0x95d89b41", "0xa9059cbb", "0xdd62ed3e"], "is_erc20": true, "is_erc721": false, "block_number": 2112234, "block_timestamp": 1471774428, "block_hash": "0xd279067d9852394d6b6c00b13c49696503c9618d3ed3b23c6b1b1321857ddd92", "item_id": "contract_2112234_0xdbdacfc9eb9d42559ac1efbdb40460c728139e6a", "item_timestamp": "2016-08-21T10:13:48Z"} +{"type": "contract", "address": "0xdbdacfc9eb9d42559ac1efbdb40460c728139e6a", "bytecode": "0x6060604052361561008d5760e060020a600035046306fdde03811461008f578063095ea7b3146100a557806318160ddd1461012457806323b872dd1461012f578063313ce567146101dc578063475a9fa9146101f057806370a0823114610215578063721a37d21461024357806395d89b411461008f578063a9059cbb14610268578063dd62ed3e146102e7575b005b61031d6040805160208101909152600081525b90565b61038b60043560243560007319ee743d2e356d5f0e4d97cc09b96d06e933d0db63c6605267600160005085856040518460e060020a0281526004018084815260200183600160a060020a0316815260200182815260200193505050506020604051808303818660325a03f4156100025750506040515191506103179050565b6102316003546100a2565b61038b60043560243560443560008054604080517fa00bfa1100000000000000000000000000000000000000000000000000000000815260016004820152600160a060020a038781166024830152868116604483015260648201869052929092166084830152517319ee743d2e356d5f0e4d97cc09b96d06e933d0db9163a00bfa119160a482810192602092919082900301818660325a03f4156100025750506040515195945050505050565b604080516000815290519081900360200190f35b61038b6004356024356000805433600160a060020a0390811691161461039f57610002565b600160a060020a03600435166000908152600160205260409020545b60408051918252519081900360200190f35b61038b6004356024356000805433600160a060020a039081169116146103ce57610002565b61038b60043560243560007319ee743d2e356d5f0e4d97cc09b96d06e933d0db6388d5fecb600160005085856040518460e060020a0281526004018084815260200183600160a060020a0316815260200182815260200193505050506020604051808303818660325a03f4156100025750506040515191506103179050565b610231600435602435600160a060020a038281166000908152600260209081526040808320938516835292905220545b92915050565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561037d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b50600160a060020a03821660009081526001602081905260409091208054830190556003805483019055610317565b600160a060020a038316600090815260016020526040902054821161040a57506040600020805482900390556003805482900390556001610317565b50600061031756", "function_sighashes": ["0x06fdde03", "0x095ea7b3", "0x18160ddd", "0x23b872dd", "0x313ce567", "0x475a9fa9", "0x70a08231", "0x721a37d2", "0x95d89b41", "0xa9059cbb", "0xdd62ed3e"], "is_erc20": true, "is_erc721": false, "is_erc1155": false, "block_number": 2112234, "block_timestamp": 1471774428, "block_hash": "0xd279067d9852394d6b6c00b13c49696503c9618d3ed3b23c6b1b1321857ddd92", "item_id": "contract_2112234_0xdbdacfc9eb9d42559ac1efbdb40460c728139e6a", "item_timestamp": "2016-08-21T10:13:48Z"} diff --git a/tests/resources/test_stream/blocks_508110_508110/expected_contracts.json b/tests/resources/test_stream/blocks_508110_508110/expected_contracts.json index 85e5eb4cf..ca7fd798f 100644 --- a/tests/resources/test_stream/blocks_508110_508110/expected_contracts.json +++ b/tests/resources/test_stream/blocks_508110_508110/expected_contracts.json @@ -1 +1 @@ -{"type": "contract", "address": "0xaec3266ebd18361ab1378646e91f0c5c373038da", "bytecode": "0x606060405236156100825760e060020a6000350463013cf08b81146100845780630d61b519146100d9578063173a4b701461020b57806321933be81461031a57806339ce39831461035b578063400e3949146103645780634d853ee51461036d5780635e44daf31461037f5780638160f0b514610479578063fd46146a14610482575b005b61049460043560048054829081101561000257906000526020600020906008020160005060018101546004820154600583015483546002850154600160a060020a039190911695509293600301919060ff1686565b61054c600435600060006000600060006000600460005087815481101561000257508152600887027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018150600154600482015491965001421180156101435750600585015460ff165b156109ac5760009350600092505b60068501548310156109b65760068501805484908110156100025790600052602060002090600202016000506040805160025460018401547fbbd39ac0000000000000000000000000000000000000000000000000000000008352600160a060020a03908116600484015292519395509091169163bbd39ac09160248181019260209290919082900301816000876161da5a03f1156100025750506040515183548102909701969485019491505060019290920191610151565b604080516020606435600481810135601f810184900484028501840190955284845261054c94813594602480359560443595608494920191908190840183828082843750949650505050505050600060006000600260009054906101000a9004600160a060020a0316600160a060020a031663bbd39ac0336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750505060405151111561068c576004805460018101808355909190828015829011610695578285526106959060089081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90810191840201610739565b61008260043560243560443560038054600160a060020a03199081163317909155600280549190911684179055600082141561057b57612710600055610581565b61054c60015481565b61054c60055481565b61055e600354600160a060020a031681565b61054c600435602435600060006000600260009054906101000a9004600160a060020a0316600160a060020a031663bbd39ac0336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f115610002575050506040515111801561040d57506000198312158061040d575060018313155b156108f9576004805485908110156100025760009182526008027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905033600160a060020a0316600090815260078201602052604090205490915060ff1660011415610900576108f9565b61054c60005481565b61055e600254600160a060020a031681565b60408051600160a060020a0388168152602081018790529081018590526080810183905260a0810182905260c0606082018181528554600260018216156101000260001901909116049183018290529060e0830190869080156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b505097505050505050505060405180910390f35b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b60008290555b80600014156105965762278d0060015561059e565b603c81026001555b505050565b505042816004016000508190555060018160050160006101000a81548160ff021916908302179055507f095779230509156998187c606e5b8a5a734137945aa43da9bf39c5e7f529a86b82878787876040518086815260200185600160a060020a03168152602001848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106735780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a1600182016005555b50949350505050565b505060048054929450918491508110156100025790600052602060002090600802016000508054600160a060020a03191687178155600181810187905560028281018790558551600384018054600082815260209081902096975091959481161561010002600019011692909204601f908101839004840193919288019083901061080a57805160ff19168380011785555b506105a39291506107f2565b50506001015b80821115610806578054600160a060020a0319168155600060018281018290556002838101839055600384018054848255909281161561010002600019011604601f8190106107d857505b5060006004830181905560058301805460ff191690556006830180548282559082526020909120610733916002028101905b8082111561080657600081556001018054600160a060020a03191681556107b6565b601f01602090049060005260206000209081019061078491905b8082111561080657600081556001016107f2565b5090565b82800160010185558215610727579182015b8281111561072757825182600050559160200191906001019061081c565b505060408051808201909152858152336020820152600684018054939550909290915084908110156100025790600052602060002090600202016000508151815560209182015160019182018054600160a060020a031916909117905533600160a060020a03166000818152600785018452604090819020805460ff1916909317909255815187815292830186905282820152517f0ee65d9041aa0fefb9e13f940fcdce8fb817356542f5024e16208214b26efc099181900360600190a15b5092915050565b6006810180546001810180835590919082801582901161083a5760020281600202836000526020600020918201910161083a91906107b6565b6000548411801561094a5750600086125b1561095c5760058501805460ff191690555b6005850154604080518981526020810189905280820187905260ff929092166060830152517fd220b7272a8b6d0d7d6bcdace67b936a8f175e6d5c1b3ee438b72256b32ab3af9181900360800190a15b5050505050919050565b600054841180156109c75750600086135b15610939576040805186546001880154600289015483529251600160a060020a03919091169291602081810192600092909190829003018185876185025a03f15050505060058501805460ff1916905561095c56", "function_sighashes": ["0x013cf08b", "0x0d61b519", "0x173a4b70", "0x21933be8", "0x39ce3983", "0x400e3949", "0x4d853ee5", "0x5e44daf3", "0x8160f0b5", "0xfd46146a"], "is_erc20": false, "is_erc721": false, "block_number": 508110, "block_timestamp": 1446973196, "block_hash": "0xc881ee96ddf8b5be74d7680ccda437466b14b9d942aa0161f139fe920690f665", "item_id": "contract_508110_0xaec3266ebd18361ab1378646e91f0c5c373038da", "item_timestamp": "2015-11-08T08:59:56Z"} +{"type": "contract", "address": "0xaec3266ebd18361ab1378646e91f0c5c373038da", "bytecode": "0x606060405236156100825760e060020a6000350463013cf08b81146100845780630d61b519146100d9578063173a4b701461020b57806321933be81461031a57806339ce39831461035b578063400e3949146103645780634d853ee51461036d5780635e44daf31461037f5780638160f0b514610479578063fd46146a14610482575b005b61049460043560048054829081101561000257906000526020600020906008020160005060018101546004820154600583015483546002850154600160a060020a039190911695509293600301919060ff1686565b61054c600435600060006000600060006000600460005087815481101561000257508152600887027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018150600154600482015491965001421180156101435750600585015460ff165b156109ac5760009350600092505b60068501548310156109b65760068501805484908110156100025790600052602060002090600202016000506040805160025460018401547fbbd39ac0000000000000000000000000000000000000000000000000000000008352600160a060020a03908116600484015292519395509091169163bbd39ac09160248181019260209290919082900301816000876161da5a03f1156100025750506040515183548102909701969485019491505060019290920191610151565b604080516020606435600481810135601f810184900484028501840190955284845261054c94813594602480359560443595608494920191908190840183828082843750949650505050505050600060006000600260009054906101000a9004600160a060020a0316600160a060020a031663bbd39ac0336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100025750505060405151111561068c576004805460018101808355909190828015829011610695578285526106959060089081027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90810191840201610739565b61008260043560243560443560038054600160a060020a03199081163317909155600280549190911684179055600082141561057b57612710600055610581565b61054c60015481565b61054c60055481565b61055e600354600160a060020a031681565b61054c600435602435600060006000600260009054906101000a9004600160a060020a0316600160a060020a031663bbd39ac0336040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f115610002575050506040515111801561040d57506000198312158061040d575060018313155b156108f9576004805485908110156100025760009182526008027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905033600160a060020a0316600090815260078201602052604090205490915060ff1660011415610900576108f9565b61054c60005481565b61055e600254600160a060020a031681565b60408051600160a060020a0388168152602081018790529081018590526080810183905260a0810182905260c0606082018181528554600260018216156101000260001901909116049183018290529060e0830190869080156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b505097505050505050505060405180910390f35b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b60008290555b80600014156105965762278d0060015561059e565b603c81026001555b505050565b505042816004016000508190555060018160050160006101000a81548160ff021916908302179055507f095779230509156998187c606e5b8a5a734137945aa43da9bf39c5e7f529a86b82878787876040518086815260200185600160a060020a03168152602001848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106735780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a1600182016005555b50949350505050565b505060048054929450918491508110156100025790600052602060002090600802016000508054600160a060020a03191687178155600181810187905560028281018790558551600384018054600082815260209081902096975091959481161561010002600019011692909204601f908101839004840193919288019083901061080a57805160ff19168380011785555b506105a39291506107f2565b50506001015b80821115610806578054600160a060020a0319168155600060018281018290556002838101839055600384018054848255909281161561010002600019011604601f8190106107d857505b5060006004830181905560058301805460ff191690556006830180548282559082526020909120610733916002028101905b8082111561080657600081556001018054600160a060020a03191681556107b6565b601f01602090049060005260206000209081019061078491905b8082111561080657600081556001016107f2565b5090565b82800160010185558215610727579182015b8281111561072757825182600050559160200191906001019061081c565b505060408051808201909152858152336020820152600684018054939550909290915084908110156100025790600052602060002090600202016000508151815560209182015160019182018054600160a060020a031916909117905533600160a060020a03166000818152600785018452604090819020805460ff1916909317909255815187815292830186905282820152517f0ee65d9041aa0fefb9e13f940fcdce8fb817356542f5024e16208214b26efc099181900360600190a15b5092915050565b6006810180546001810180835590919082801582901161083a5760020281600202836000526020600020918201910161083a91906107b6565b6000548411801561094a5750600086125b1561095c5760058501805460ff191690555b6005850154604080518981526020810189905280820187905260ff929092166060830152517fd220b7272a8b6d0d7d6bcdace67b936a8f175e6d5c1b3ee438b72256b32ab3af9181900360800190a15b5050505050919050565b600054841180156109c75750600086135b15610939576040805186546001880154600289015483529251600160a060020a03919091169291602081810192600092909190829003018185876185025a03f15050505060058501805460ff1916905561095c56", "function_sighashes": ["0x013cf08b", "0x0d61b519", "0x173a4b70", "0x21933be8", "0x39ce3983", "0x400e3949", "0x4d853ee5", "0x5e44daf3", "0x8160f0b5", "0xfd46146a"], "is_erc20": false, "is_erc721": false, "is_erc1155": false, "block_number": 508110, "block_timestamp": 1446973196, "block_hash": "0xc881ee96ddf8b5be74d7680ccda437466b14b9d942aa0161f139fe920690f665", "item_id": "contract_508110_0xaec3266ebd18361ab1378646e91f0c5c373038da", "item_timestamp": "2015-11-08T08:59:56Z"}