Skip to content

Commit 960f42c

Browse files
committed
feat: refactor minting process in deployment test and add total supply assertion
1 parent 1105856 commit 960f42c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

test/RLCOFT.t.sol

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,20 @@ contract RLCOFTTest is Test {
3939
// Deploy the contract using the deployment script
4040
rlcOft = RLCOFT(new RLCOFTDeploy().run());
4141

42-
// Mint some tokens for testing
43-
vm.prank(owner);
44-
rlcOft.mint(user1, 1000 * 10**9); // 1000 tokens with 9 decimals
45-
46-
vm.prank(owner);
47-
rlcOft.mint(user2, 500 * 10**9); // 500 tokens with 9 decimals
42+
43+
vm.startPrank(owner);
44+
rlcOft.grantRole(rlcOft.BRIDGE_ROLE(), owner);
45+
rlcOft.mint(user1, 1000 * 10**9);
46+
rlcOft.mint(user2, 500 * 10**9);
47+
vm.stopPrank();
48+
}
49+
50+
// ============ Deployment Tests ============
51+
function testDeployment() public {
52+
assertEq(rlcOft.name(), "RLC OFT Test");
53+
assertEq(rlcOft.symbol(), "RLCT");
54+
assertEq(rlcOft.decimals(), 9);
55+
assertEq(rlcOft.totalSupply(), 1500 * 10**9); // 1000 + 500
4856
}
4957

5058
// ============ Pausable Tests ============

0 commit comments

Comments
 (0)