- Install chrome extension : go to
https://metamask.io/
and install chrome extension - Open Metamask : click metamask extension icon to open metamask overlay
- Signup or Import : accept terms and follow steps to restore or create a new vault
- Switch to Ropsten : click network dropdown menu and choose
Ropsten Test Network
- Create ropsten account : click first dropdown in upper right corner and click create account
- Open test ether faucet : click buy and then click ropsten test faucet to open faucet page
- Request test ether : click
request 1 ether from faucet
, then click transaction link - Await mining : wait on etherscan until status switches to success
- Re-open remix : go to
https://remix.ethereum.org
- Open run tab : in the devtools panel on the right, click the
Run
tab - Switch remix to ropsten : click on
Environment
dropdown and chooseInjected Web3
- expand gist : click
gist
in file explorer panel to see files - Open
dependencies.txt
: clickdependencies.txt
in the file explorer to open file in editor - Load dependencies : type
remix:batch
in terminal, the press - Explorer dependencies : click
github
in file explorer pane to explore all imported files - Open
AwardToken.sol
: clickgist/AwardToken.sol
in file explorer to show it in the editor - Compile : click on
Compile
tab and clickStart to compile
- Wait for compilation : Wait until dropdown input field in compile tab shows
AwardToken
- Choose owner account : click on
Run
tab and select owner address fromAccount
dropdown - Choose contract : click
gist/AwardToken.sol
in file explorer to show it in editor - Deploy to ropsten : on
Run
tab click dropdown, selectAwardToken
+ clickdeploy
- Confirm transaction : see below =>
## Confirm Transactions in Metamask Popup
// when transaction is successfully mined, a dapp interface will be generated in the run tab - publish contract address : click
copy
icon on generated AwardToken dapp dropdown and share it // the address can be coded into a dapp to enable users to conveniently interact with the contract
// blue function buttons are read only & free, pink function buttons change state and cost ether
- Set max gas price : Type e.g.
1
into theGas price
input field if not prefilled yet - Allow transaction : click
submit
button to pay and send the transaction // a pending transaction log appears in terminal and updates upon success or fail - Await confirmation : click etherscan link in terminal to check status details of transaction
- Start Round : click the pink
startRound
function button on the awardToken udapp // round will be open for 7 hours after which the owner can close it which mints 100 tokens to the winner - Confirm transaction : see above =>
## Confirm Transactions in Metamask Popup
- Select AwardToken : select AwardToken from dropdown in remix devtools panel on
Run
tab - Connect to contract : paste AwardToken address into
At address
input field + click blue button - Lookup ballot Address : click the
currBallot
button to get Ballot contract address - Copy ballot address : check dapp or expanded terminal log to copy the address to clipboard
- Select ballot : select Ballot from dropdown in remix devtools panel on
Run
tab - Connect to contract : paste ballot address into
At address
input field and click blue button // a ballot dapp will be generated on the bottom of devtools run tab - Copy account address : on devtools
Run
tab clickcopy
icon afterAccount
dropdown - Goto ballot dapp : scroll down on
Run
tab to ballot contract udapp - Expand addProposal : expand the pink
addProposal
button by clicking arrow down after input field - Add description : fill
desc:
input with your proposal description text (in quotation marks) - Add title : fill
title:
input with a short title for your proposal (in quotation marks) - Add your address : fill
targetAddr:
by pasting (ctrl+v) your account address - Submit proposal : click pink
transact
button to send proposal // every address can only create one proposal - Confirm transaction : see above =>
## Confirm Transactions in Metamask Popup
- Lookup proposal address : click the blue
getProposals
button and copy a proposal address - Lookup proposal details : click the blue
proposals
button after pasting the proposal address - Vote for proposal : paste proposal address into pink
vote
input field and press vote button - Confirm transaction : see above =>
## Confirm Transactions in Metamask Popup
- Timeout round : wait for 7 hours or press pink
timeoutEarly
button - Confirm transaction : see above =>
## Confirm Transactions in Metamask Popup
- Close round : click the pink
closeRound
button to finish round and mint 100 to winner - Confirm transaction : see above =>
## Confirm Transactions in Metamask Popup
- check winner : click blue
winningProposal
on ballot to see address of winner - check Ballot : click blue
currBallot
on AwardToken to see active ballot gone - check previous winner : click blue
getPreviousWinners
to see winner added to hall of fame - copy winner address : select and copy address of winning proposal (ctrl+c)
- check balance of winner : paste winner address into blue
balanceOf
input field and click button // see the winner now owns a token supply of 100 freshly minted tokens - check total supply : click
totalSupply
to see number of all minted tokens is 100