Skip to content

Commit 7cb81a1

Browse files
committed
Working Tests
1 parent fbffaf3 commit 7cb81a1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/Tribunal.t.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ contract TribunalTest is Test {
194194
Tribunal.Mandate memory mandate = Tribunal.Mandate({
195195
recipient: address(0xCAFE),
196196
expires: 1703116800, // 2023-12-21 00:00:00 UTC
197-
token: address(0xDEAD),
197+
token: address(token),
198198
minimumAmount: 1 ether,
199199
baselinePriorityFee: 100 wei,
200200
scalingFactor: 1e18,
@@ -216,6 +216,9 @@ contract TribunalTest is Test {
216216
allocatorSignature: new bytes(0)
217217
});
218218

219+
// Approve tokens for settlement
220+
token.approve(address(tribunal), type(uint256).max);
221+
219222
tribunal.fill(claim, mandate, address(this));
220223

221224
vm.expectRevert(abi.encodeWithSignature("AlreadyClaimed()"));
@@ -230,7 +233,7 @@ contract TribunalTest is Test {
230233
Tribunal.Mandate memory mandate = Tribunal.Mandate({
231234
recipient: address(0xCAFE),
232235
expires: 1703116800, // 2023-12-21 00:00:00 UTC
233-
token: address(0xDEAD),
236+
token: address(token),
234237
minimumAmount: 1 ether,
235238
baselinePriorityFee: 100 wei,
236239
scalingFactor: 1e18,
@@ -256,6 +259,9 @@ contract TribunalTest is Test {
256259
tribunal.deriveClaimHash(claim.compact, tribunal.deriveMandateHash(mandate));
257260
assertEq(tribunal.filled(claimHash), address(0));
258261

262+
// Approve tokens for settlement
263+
token.approve(address(tribunal), type(uint256).max);
264+
259265
vm.expectEmit(true, true, false, true, address(tribunal));
260266
emit Tribunal.Fill(sponsor, address(this), claimHash, 1 ether, 1 ether, 0);
261267

0 commit comments

Comments
 (0)