Update token decimals for test token
This commit is contained in:
parent
ae69dd1bc8
commit
da2fc8b4c6
|
@ -5,7 +5,8 @@ pragma solidity ^0.7.6;
|
|||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||
|
||||
contract WormUSD is ERC20 {
|
||||
constructor(address mintToAddress) ERC20("wormUSD", "WUSD"){
|
||||
_mint(mintToAddress, 1000000000*10**18);
|
||||
constructor(address mintToAddress, uint8 decimals, uint256 supply) ERC20("wormUSD", "WUSD"){
|
||||
_setupDecimals(decimals);
|
||||
_mint(mintToAddress, supply*10**decimals);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
npx truffle migrate --config cfg/truffle-config.tokens.js --network goerli --reset
|
|
@ -1,9 +1,11 @@
|
|||
require("dotenv").config({ path: ".env" });
|
||||
i;
|
||||
|
||||
const WormUSD = artifacts.require("WormUSD");
|
||||
|
||||
module.exports = async function (deployer, network) {
|
||||
const mintAddress = process.env.mintToAddress;
|
||||
const tokenDecimals = process.env.decimals;
|
||||
const tokenSupply = process.env.supply;
|
||||
|
||||
await deployer.deploy(WormUSD, mintAddress);
|
||||
await deployer.deploy(WormUSD, mintAddress, tokenDecimals, tokenSupply);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue