web3go-xyz / web3go.xyz

Discovery data value of Web3
Apache License 2.0
10 stars 4 forks source link

MoonPush: read token contract address from chain for asset across bridge #70

Closed happyJ2024 closed 2 years ago

happyJ2024 commented 2 years ago

for moonriver:

happyJ2024 commented 2 years ago

concept: chain address token contract address contract method topic

happyJ2024 commented 2 years ago

tools: web3.js ether.js polkadot.js

how to use the tools to connect with chain and read data?

happyJ2024 commented 2 years ago

explorer: https://moonbeam.moonscan.io/ https://moonbeam.subscan.io/ https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmoonbeam.api.onfinality.io%2Fpublic-ws#/explorer/query/1001624

ahern2018 commented 2 years ago
  1. Regularly pull contract information from anyswap, and extract the token according to chainId/srcChainId = 1284(Moonbeam)/1285(Moonriver);
  2. Use ethers.js to query token information.
  3. Normalize data and insert into database.