As per the specification of the crowdsale, let's first find the libraries we will use to build our MST crowdsale:
- As per the specification, we would want to mint new MST tokens on-demand when someone sends ether to the crowdsale contract. For this, we would need the MintedCrowdsale.sol contract from the OpenZeppelin library. The only prerequisite for this contract is that it requires the MinterRole on the MST token contract. At the time of deployment of this contract, we will assign MinterRole to the contract. However, the MintedCrowdsale.sol contract does not impose any cap on minting new tokens. You can mint any number of tokens using this contract.
- To apply the cap on minting new tokens, we would need ...