miguelmota / ethereum-development-with-go-book

📖 A little guide book on Ethereum Development with Go (golang)
https://goethereumbook.org
Other
1.74k stars 427 forks source link

transfer_token.go outdated, needs update, example provided #70

Open 0xckruger opened 3 years ago

0xckruger commented 3 years ago

Current transfer_token.go is outdated. Unsure of when this happened but the current method of transacting ERC-20 tokens looks something like this:

https://gist.github.com/ckruger097/a156d04a5f3542eac20e6eea5129946d

Note: This is done from my own research, this may not be best practice but it has worked as a PoC. It may also be worth mentioning I created the token mentioned in the comments using https://vittominacori.github.io/erc20-generator/ & transferred to MetaMask first. Then sent the tokens to my local geth account running on a light node. Hopefully this helps someone.