-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathClaims.sol
More file actions
38 lines (34 loc) · 1.57 KB
/
Copy pathClaims.sol
File metadata and controls
38 lines (34 loc) · 1.57 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
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
import { Component } from "./Components.sol";
struct AllocatedTransfer {
bytes allocatorData; // Authorization from the allocator.
uint256 nonce; // A parameter to enforce replay protection, scoped to allocator.
uint256 expires; // The time at which the transfer or withdrawal expires.
uint256 id; // The token ID of the ERC6909 token to transfer or withdraw.
Component[] recipients; // The recipients and amounts of each transfer.
}
struct Claim {
bytes allocatorData; // Authorization from the allocator.
bytes sponsorSignature; // Authorization from the sponsor.
address sponsor; // The account to source the tokens from.
uint256 nonce; // A parameter to enforce replay protection, scoped to allocator.
uint256 expires; // The time at which the claim expires.
bytes32 witness; // Hash of the witness data.
string witnessTypestring; // Witness typestring appended to existing typestring.
uint256 id; // The token ID of the ERC6909 token to allocate.
uint256 allocatedAmount; // The original allocated amount of ERC6909 tokens.
Component[] claimants; // The claim recipients and amounts; specified by the arbiter.
}
library ClaimsLib {
/**
* @notice Returns the raw calldata pointer to the claim.
* @param claim The claim to get the raw pointer of.
* @return rawClaimPtr The raw pointer to the claim.
*/
function asRawPtr(Claim calldata claim) internal pure returns (uint256 rawClaimPtr) {
assembly {
rawClaimPtr := claim
}
}
}