-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathBatchClaims.sol
More file actions
35 lines (31 loc) · 1.42 KB
/
BatchClaims.sol
File metadata and controls
35 lines (31 loc) · 1.42 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
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
import { ComponentsById, BatchClaimComponent } from "./Components.sol";
struct AllocatedBatchTransfer {
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.
ComponentsById[] transfers; // The recipients and amounts of each transfer for each ID.
}
struct BatchClaim {
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.
BatchClaimComponent[] claims; // The claim token IDs, recipients and amounts.
}
library BatchClaimsLib {
/**
* @notice Returns the raw calldata pointer to the batch claim.
* @param claim The batch claim to get the raw pointer of.
* @return rawClaimPtr The raw pointer to the batch claim.
*/
function asRawPtr(BatchClaim calldata claim) internal pure returns (uint256 rawClaimPtr) {
assembly {
rawClaimPtr := claim
}
}
}