Now, let's start writing our LC Master smart contract, which will contain the components we discussed in the previous section, as follows:
- Create a file called LCMaster.sol.
- Let's start writing the contract. We first need to define the version of the Solidity compiler we'll be using, as shown in the following code snippet:
pragma solidity ^0.5.2;
- Next, we import our dependent contracts, like this:
import "./LC.sol";import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
- Since our contract transfers the USD ERC20 token, we implement the ERC20Interface by importing ERC20.sol from OpenZeppelin. This allows us to access the methods of the USD token contract from the LC Master contract. LC.sol is the interface ...