I'm looking for some source codes using web3js for interaction with erc20 tokens and contracts. Does anyone know good source codes using web3js?
Thanks in advance!
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
But if you really want to use just web3js then here is a github link. Although this is complete ethereum cast. But you can get the idea from the
Inbox contract. The
contract directory have an
compile.js compiles the contract by
solc compiler and exports.
deploy.js is deploying the compiled contract to rinkebey testnet (You can also deploy locally by using Ganache). Lastly, the
inbox.test.js inside the
test directory contains the code to interact with contract by web3js.
Hope it will help.