We need to create a USD currency token that will be used by us, simply for accounting purposes. In an enterprise application, this token will act as a dummy asset, mapped one to one to the actual funds owned by the bank. In our system, we'll use it to represent the funds allocated by the bank to the LC escrow account and track the movement of funds across the banking system.
Let's start writing our ERC20 smart contract, which will be used to issue and distribute this token, by following these steps:
- Start by creating the USD.sol file. We first declare the compiler version, as shown in the following code snippet:
pragma solidity ^0.5.2;
- Next, import the contracts that we need to create our ERC20 token, as follows:
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
import "openzeppelin-solidity...