-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.mock-erc20.s.sol
More file actions
35 lines (26 loc) · 1.19 KB
/
deploy.mock-erc20.s.sol
File metadata and controls
35 lines (26 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {Script, console2} from "forge-std/Script.sol";
import {MockERC20} from "../test/mocks/MockERC20.sol";
contract DeployMockErc20Script is Script {
function run() public {
string memory saltStr = "MetaLexMetaVest.Abstract.mockPaymentToken.dev.0";
bytes32 salt = keccak256(bytes(saltStr));
string memory tokenName = "Payment Token";
string memory tokenSymbol = "PAY";
uint8 tokenDecimals = 6;
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
address deployer = vm.addr(deployerPrivateKey);
console2.log("");
console2.log("=== DeployMockErc20Script ===");
console2.log("saltStr: %s", saltStr);
console2.log("deployer: %s", deployer);
console2.log("");
vm.startBroadcast(deployerPrivateKey);
MockERC20 mockToken = new MockERC20{salt: salt}(tokenName, tokenSymbol, tokenDecimals);
console2.log("deployed mock token: %s", address(mockToken));
vm.stopBroadcast();
console2.log("Deployed addresses:");
console2.log(" mock token: %s", address(mockToken));
console2.log(" decimals: %d", mockToken.decimals());
console2.log("");
}
}