-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarked.t..sol
More file actions
44 lines (33 loc) · 1.18 KB
/
Marked.t..sol
File metadata and controls
44 lines (33 loc) · 1.18 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
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "../src/Marked.sol";
contract MarkedTest is Test {
MarkToken public markToken;
string public markTokenName = "MarkToken";
address public dev = address(0x2404fc115dBCb35DCAE5465bD878d155b34017e3);
function setUp() public {
vm.prank(dev);
markToken = new MarkToken();
}
function testSetTaxCollector() public {
vm.prank(dev);
markToken.setTaxCollector(
address(dev)
);
address taxCollector = markToken._taxCollector();
assert(taxCollector == dev);
}
function testMarktokenERC20Functionality() public {
vm.startPrank(markToken.owner());
markToken.mint(address(this), 1e18);
vm.stopPrank();
assert(markToken.balanceOf(address(this)) == 1e18);
markToken.approve(address(this), 1e18);
markToken.balanceOf(address(this));
markToken.transferFrom(address(this), address(dev), 1e18);
vm.expectRevert(markToken.transfer.selector);
vm.warp(block.timestamp + 10 minutes);
markToken.transfer(address(dev), 1e18);
}
}