January 2020
Intermediate to advanced
530 pages
11h 11m
English
We'll be using the OpenZeppelin suite of smart contract templates for writing our contracts. Let's start by writing the USD token contract:
pragma solidity ^0.5.2;
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";import "openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol"; import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
The first contract template is ERC20Detailed. The ERC20Detailed contract allows you to set the parameters of the ERC20 token using a constructor such as the token name, token symbol, ...
Read now
Unlock full access