Skip to content

Commit

Permalink
include signatures in tribunal compact
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Dec 20, 2024
1 parent a8be328 commit 28e22fd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/Tribunal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ contract Tribunal {
uint256 expires; // Claim expiration timestamp
uint256 id; // Claimed ERC6909 token ID
uint256 maximumAmount; // Maximum claimable tokens
bytes sponsorSignature; // Authorization from the sponsor
bytes allocatorSignature; // Authorization from the allocator
}

struct Mandate {
Expand Down
32 changes: 24 additions & 8 deletions test/Tribunal.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down Expand Up @@ -162,7 +164,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down Expand Up @@ -196,7 +200,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down Expand Up @@ -420,7 +426,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down Expand Up @@ -456,7 +464,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down Expand Up @@ -500,7 +510,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

// First derive the mandate hash
Expand Down Expand Up @@ -545,7 +557,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

address claimant = address(this);
Expand Down Expand Up @@ -593,7 +607,9 @@ contract TribunalTest is Test {
nonce: 0,
expires: block.timestamp + 1 hours,
id: 1,
maximumAmount: 1 ether
maximumAmount: 1 ether,
sponsorSignature: new bytes(0),
allocatorSignature: new bytes(0)
});

Tribunal.Directive memory directive =
Expand Down

0 comments on commit 28e22fd

Please sign in to comment.