- Go to https://bscscan.com
- Enter contract address to search input
- Navigate to 'Contract' tab
- Copy ABI in 'Contract ABI' section
- E.g BEP20: https://bscscan.com/address/0xe9e7cea3dedca5984780bafc599bd69add087d56#code
abigen --abi=[some ABI filename].abi --pkg=[package name] --out=[output.go]
- E.g:
abigen --abi=api/contracts/bep20/bep20.abi --pkg=bep20 --out=api/contracts/bep20/bep20.go
- Search
[Smart chain name] smart chain RPC endpoint
- E.g:
Binance smart chain RPC endpoint
=>https://bsc-dataseed1.ninicoin.io/
- Call contract information:
http://127.0.0.1:3000/token/0xe9e7cea3dedca5984780bafc599bd69add087d56
- Get user balance:
http://127.0.0.1:3000/token/0xe9e7cea3dedca5984780bafc599bd69add087d56/balance/0xa0d6d7ee26215d00291d51510040becb9ebb9c4b