Professional Documents
Culture Documents
1
Campbell R. Harvey 2020 2
Parameters for the token
• Name (e.g., FQ1)
• Symbol (e.g., FQ1, default is SYM)
• Decimal places (e.g., 2 decimal places))
• Number of units in circulation (e.g., 100 billion)
balances[msg.sender] = 1000000000000;
totalSupply = 1000000000000;
name = “FQ1”; //replace FQ1 elsewhere
Notes:
• Use ctrl + f to find “FQ1” and replace it with the name you give to
your token elsewhere in the code
• Do not use thousands separator
• If you set ‘totalSupply’ to 1000000 (1M) with 3 decimals the
contract will have 1000 whole tokens in total (the decimal places
are applied to the supplied amount). In the example the
balances/totalSupply of 1000000000000 will generate 1 billion
whole tokens.
Campbell R. Harvey 2020 8
Step 3. Compile the contract
• 1. Switch to Compiler tab
• 2. Choose 0.4.24 commit
version compiler
• 3. ‘Auto compile’ ON,
‘Enable optimization’ OFF,
‘Hide warnings’ ON
• 4. Compile the contract
Look carefully:
- The contract ID is not your public address
Campbell R. Harvey 2020 11
Step 5. Add tokens
The contract ID
(It is not your
FQ1
public address)