- open remix: go to remix.ethereum.org
- setup metamask: install the metamask extension in your browser and login
- switch to ropsten: select the
Ropsten Test Network
in the metamask browser extensions dropdown menu - get some test ether: in developer mode new accounts get some test ethers by default
- open metamask settings: right-click the metamask extension and go to
manage extensions
- turn on developer mode: in the upper menu bar switch on
Developer Mode
- restart metamask: in the main settings pane turn off the metamask extension and switch it back on
- close extension settings: close the browser tab to get back to the remix tab
- sign into metamask: click metamask icon and if you are logged out type your password and click
log in
- open settings dropdown: click settings in upper right corner of metamask extension overlay
- create accounts: click create account button, type in a name you want and click
create
- choose account with funds: click settings in upper right corner and choose an account with funds
- open metamask settings: right-click the metamask extension and go to
- open remix run tab: in remix on the devtools panel click on
Run
tab - select injected web3: click the
Environment
dropdown and selectInjected Web3
- load project: execute
remix:loadgist 1483e5599012c3783def91ead259ece8
in terminal - install dependencies: open
gist/dependencies.txt
from file explorer and typeremix:batch
into terminal
- open gist/AwardToken.sol click on
gist/AwardToken.sol
in the file explorer to show it in the editor - compile: now in the devtools panel on the right, click the
Compile
tab and thenStart to compile
button - choose owner: click on
Run
tab andAccount
dropdown to choose an address to become contract owner- check the
AwardToken.sol
in the editor to see theonlyOwner
tag in themint(...)
function - copy owner address: click the
copy
button next to the account dropdown on the run tab
- check the
- deploy AwardToken contract: click
deploy
(=create
) on run tab to deploy an instance to ropsten network- set max gas price: in metamask popup set price (e.g.
10
) (might require metamask old UI in settings) - confirm transaction: click
submit
in metamask popup to grant the transaction and pay with test ether - await confirmation: the network might take a few seconds or minutes to confirm the transaction
- check udapp: the auto generated user interface ("universal dapp") on the run tab
- check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS
- set max gas price: in metamask popup set price (e.g.
- start new minting: find the
mint
function on therun
tab represented in the contracts universal dapp- first paremter: paste
owners address
(e.g. ctrl+v) into the input field next to themint
button - second paremter: write the number of tokens to mint into the next input field
- check input: make sure your input looks similar to
0x1ba18b04fbfd26e426cd97f39638baeffbe36460, 7500
- maybe expand: if the remix version has a dropdown arrow next to the
mint
button to fill out a form - execute mint: click the pink
mint
button to execute a state changing transaction which costs gas - set max gas price: in metamask popup set price (e.g.
10
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup - check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS
- first paremter: paste
- start voting round: create transaction to make new Ballot contract for others to send proposal and vote
- execute startRound: click the pink
startRound
button on the awardToken udapp - set max gas price: in metamask popup set price (e.g.
10
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup - check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS
- execute startRound: click the pink
-
find ballot address: click the blue
currBallot
button to execute a free of cost read only call -
grab ballot address: select and copy (e.g. ctrl+c) ballot address from udapp or terminal
-
connect to ballot: click contract dropdown on run tab to select
ballot
- paste
ballot address
(ctrl+v) into input field next toAt address
and click that blue button
- paste
-
add new proposal: scroll down the run tab to check the ballot udapp and it's
addProposal
button- grab local address: scroll up and click copy button on run tab next to
Account
dropdown - goto ballot udapp: scroll down on run tab to the ballot udap with the pink
addProposal
button - fill description param: write a
"description text"
wrapped in quotations and a comma (,
) afterwards - fill title param: write a
"short title"
wrapped in quotations and a comma (,
) afterwards - fill address param: paste (ctrl+v) your address as the proposals sender WITHOUT quotation marks
- every wallet address can only create one proposal
- e.g
"description", "title", "0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
- submit proposal: click the pink
addProposal
button to submit the new proposal and pay gas fee - set max gas price: in metamask popup set price (e.g.
100
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup - check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS
- grab local address: scroll up and click copy button on run tab next to
-
copy proposal address: first wait until the addProposal transaction gets confirmed in a terminal log 2. copy address: scroll down with mousewheel in transaction details to
to
field and clickcopy
icon -
vote on proposal: every wallet address can only vote once per proposal
- choose proposal: paste address (ctrl+v) into
vote
input field and click that pink button - maybe gas estimation fail: if so, use mousewheel to scroll down on popup and click
send transaction
- set max gas price: in metamask popup set price (e.g.
1
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup
- choose proposal: paste address (ctrl+v) into
-
check proposals: click the blue
getProposals
button to execute a free of cost read only call -
grab proposal address: select and copy (e.g. ctrl+c) proposal address to vote on from udapp or terminal
- close round: when the time is over, awardToken owner needs to
closeRound
to retrievewinningProposal
- switch to owner: switch back to owner address and click on
finish minting
onAwardToken
instance - execute closeRound: owner clicks the pink
closeRound
button on the awardToken udapp - set max gas price: in metamask popup set price (e.g.
10
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup - check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS
- switch to owner: switch back to owner address and click on
- finish minting 0
- execute closeRound: owner clicks the pink
closeRound
button on the awardToken udapp - set max gas price: in metamask popup set price (e.g.
10
) (might require metamask old UI in settings) - confirm transaction: click
submit
on the confirmation dialog from metamask that will popup - check success: wait transaction to get logged in terminal to click
details
to check for status SUCCESS - winner gets award: mints the tokens and gives it to the winning proposal. The log looks something like:
"args": [ "4b0897b0513fdc7c541b6d9d7e929c4e5364d2db", "14723a09acff6d2a60dcdf7aa4aff308fddc160c", "100" ]
- execute closeRound: owner clicks the pink
- whats next: It is then possible to start a another round of voting.