-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInteractions.s.sol
53 lines (42 loc) · 1.79 KB
/
Interactions.s.sol
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
45
46
47
48
49
50
51
52
53
// SPDX-License-Identifier: MIT
pragma solidity 0.8.27;
// ================================================================
// │ IMPORTS │
// ================================================================
// Forge and Script Imports
import {console} from "lib/forge-std/src/Script.sol";
import {GetDeployedContract} from "script/GetDeployedContract.s.sol";
// Contract Imports
import {SettlementNft} from "src/SettlementNft.sol";
import {SettlerToken} from "src/SettlerToken.sol";
// Library Directive Imports
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
// ================================================================
// │ INTERACTIONS │
// ================================================================
contract Interactions is GetDeployedContract {
function test() public override {} // Added to remove this whole contract from coverage report.
// Library directives
using Address for address payable;
// Contract variables
SettlementNft public settlementNft;
SettlerToken public settlerToken;
function interactionsSetup() public {
settlementNft = SettlementNft(payable(getDeployedContract("SettlementNft")));
settlerToken = settlementNft.SETTLER_TOKEN();
}
function mintNft() public {
interactionsSetup();
vm.startBroadcast();
settlementNft.mint();
vm.stopBroadcast();
}
function getMintTimestamp(uint256 tokenId) public returns (uint256) {
interactionsSetup();
return settlementNft.getMintTimestamp(tokenId);
}
function getSettlerBalance(address account) public returns (uint256) {
interactionsSetup();
return settlerToken.balanceOf(account);
}
}