getamis / eth-indexer

An Ethereum project to crawl blockchain states into database
GNU Lesser General Public License v3.0
233 stars 47 forks source link

Failed to get total supply err="no contract code at given address" #81

Closed faithgithub closed 5 years ago

faithgithub commented 6 years ago

Hi when I start the docker: I got "no contract code at given address"。my erc20 config do not change image

doker-compose.yaml

version: "3" services:

Customized geth image for indexer

geth: image: quay.io/amis/geth:indexer_diff_tx_1.8.10 ports:

config.yaml

eth: protocol: ws host: geth port: 8546 db: driver: mysql host: idx-database port: 3306 name: ethdb user: root password: qwe!@#123 sync: fromBlock: 0 pprof: enable: false port: 8000 address: "0.0.0.0" functions: erc20token: true chain: test: false

erc20.yaml

erc20: usdt: address: "0xdAC17F958D2ee523a2206206994597C13D831ec7" eos: address: "0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0" trx: address: "0xf230b790e05390fc8295f4d3f60332c93bed42e2" ven: address: "0xd850942ef8811f2a866692a623011bde52a462c1"

charlesjhongc commented 6 years ago

Hi @faithgithub Problem is that your geth needs some time to sync to the block where ERC20 contract was created. From the screenshot you provided, latest block of your geth is 2323698 which is far from the block 4634748 where USDT was created. Therefore indexer is not able to find contract code from geth.