This repository demonstrates development lifecycle end-to-end. It will not cover much of theory but quick crash course on how to deploy your first "Smart Contract" on test network, setup back-end connection between Ethereum network with Python and create API communication with Angular app.
The first step is to create the contract on Ethereum network. To keep things simple, it is based on basic ERC20 token. And also, install Metamask extension.
Ensure you know these before start:
In order to compile your Solidity code, you need to have compiler to compile the code. Remix is the online IDE to help compile and submit to Ethereum network.
- Install Metamask and create account in Ropsten Test Network
- Add fake Ethereum into your wallet address in here or here
- Open Remix
- Copy and create all sol files under src/contract
- Click "Run" tab and select "Injected Web3" under Environment (this to enable connect your Metamask account under Ropsten test network)
- Click "Compile" and tick "Auto compile". It should give no error messages.
When there is no error in the code, next step is to deploy to test network.
WARNING: Ensure Metamask configured in Ropsten Test Network.
-
Open Metamask (fox looking icon in Chrome extension)
-
Ensure it is correct account and it has Ether
-
Open Remix, in tab "Run", select "ROToken" and click "Deploy"
-
Metamask popup will appear and ensure put 10 gwei to process it faster
-
Verify there is new transaction created
-
Try check your own balance and value 88888888 should appear
Lets test transfer the token from address A to B.
WARNING: Ensure Metamask configured in Ropsten Test Network.
-
Open Metamask (fox icon in Chrome extension)
-
Create Account by clicking "Person with circle" icon in top right
-
Rename as necessary and copy all addresses
-
Open Remix, in tab "Run", ensure Environment is "Injected Web3 Ropsten"
-
Under Account, it will be always the account selected in Metamask, ensure it is same account which created the contract!
-
Under Transaction Recorded, open the ROToken contract, if missing follow steps below on "Add Existing Smart Contract"
-
Expand by click symbol "V" beside "transfer"
-
Put the address and amount
-
Metamask popup will appear and ensure put 10 gwei to process it faster
-
Once it is done, you will see the etherscan URL and the transaction completed
-
Click the link to see the transaction
-
Verify it by doing the "balanceOf"
Testing existing Contract is also possible, follow this steps:
WARNING: Ensure Metamask configured in Ropsten Test Network.
- Open Metamask, find the transaction that says "Contract Deployment"
- Click to open the Etherscan block explorer and copy the Contract address under "To:"
- Open Remix, click "Run" tab and select correct contract "ROToken"
- Put address from Etherscan block and click "At address"
In Progress
In Progress