Smart contract, Ropsten Test Network Ethereum, MetaMask, Infura, Web3, Truffle.
If you're interested in Golang connecting to Ethereum, please reference my simple-go-ethereum here: https://github.com/huynhsamha/simple-go-ethereum
- Install extension MetaMask in Chrome browser.
- Choose Ropsten Test Network.
- Create accounts and deposit Ether from Test Faucet
- Get private keys from accounts (MetaMask requires your password)
Create account on https://infura.io
- Clone repository, installing packages with
npm
oryarn
- Copy file
.env.example
to file.env
with the same path. - Change variables in new file
.env
with your values.
truffle compile
Solidity files in contracts/*.sol
will be compiled to build/contracts/*.json
- Manage accounts and wallet:
- Private Key to Account: https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#privatekeytoaccount
- Add account to wallet: https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#wallet-add
- Remove account from wallet: https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#wallet-remove
- Deploy smart contract: https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#deploy
- Use methods in Contract:
- Some utils: