Skip to content

Commit f14e197

Browse files
update deployer
1 parent 9b3da94 commit f14e197

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

script/TokenDeployer.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Script, console } from "forge-std/Script.sol";
77
import { ERC1967Proxy } from "openzeppelin-contracts/proxy/ERC1967/ERC1967Proxy.sol";
88

99
contract TokenDeployer is Script {
10-
address public OWNER = 0x0676675F4fddC2f572cf0CdDaAf0a6b31841CDaC; // TODO
10+
address public OWNER = 0x715B1ddF5d6dA6846eaDB72d3D6f9d93148d0bb0;
1111
address public COINLIST = 0x477F48C93738C0A3a49E365c90Dc56e5466544Df;
1212
address public COINLIST_FEE = 0x9CA33da9D11cCb2E2b0870f83C0f963573B74A43;
1313

@@ -20,7 +20,7 @@ contract TokenDeployer is Script {
2020
uint256 public OWNER_SHARE = TOTAL_SUPPLY - COINLIST_SHARE - COINLIST_FEE_SHARE;
2121

2222
function deploy() public returns (ERC1967Proxy token, EnsoToken implementation) {
23-
implementation = new EnsoToken();
23+
implementation = new EnsoToken{ salt: "EnsoTokenV1" }();
2424
Distribution[] memory nullDistribution = new Distribution[](0);
2525
implementation.initialize("", "", address(implementation), nullDistribution);
2626

@@ -32,7 +32,7 @@ contract TokenDeployer is Script {
3232
distribution[2] = Distribution(COINLIST_FEE, COINLIST_FEE_SHARE);
3333
bytes memory initializationCall =
3434
abi.encodeWithSelector(EnsoToken.initialize.selector, name, symbol, OWNER, distribution);
35-
token = new ERC1967Proxy(address(implementation), initializationCall);
35+
token = new ERC1967Proxy{ salt: "EnsoToken" }(address(implementation), initializationCall);
3636
}
3737

3838
function run() public returns (ERC1967Proxy token, EnsoToken implementation) {

test/TokenTest.t.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ contract TokenTest is Test {
1919
function setUp() public {
2020
deployer = new TokenDeployer();
2121
(proxy,) = deployer.deploy();
22+
console.log("token address: ", address(proxy));
2223
token = EnsoToken(address(proxy));
2324
}
2425

@@ -30,6 +31,11 @@ contract TokenTest is Test {
3031
assertEq(token.totalSupply(), deployer.TOTAL_SUPPLY());
3132
}
3233

34+
function test_OwnerBalance() public view {
35+
uint256 balance = token.balanceOf(deployer.OWNER());
36+
assertEq(balance, 95_600_000 * 10**18);
37+
}
38+
3339
function test_PausedFail() public {
3440
vm.startPrank(deployer.COINLIST());
3541
vm.expectRevert(PausableUpgradeable.EnforcedPause.selector);

0 commit comments

Comments
 (0)