MsgTransferTokens
Proto Definition
message MsgTransferTokens {
string creator = 1; // Address initiating the transfer
string collectionId = 2; // Collection containing tokens to transfer
repeated Transfer transfers = 3; // Transfer operations (must pass approvals)
}
message MsgTransferTokensResponse {}
message Transfer {
// The address of the sender of the transfer.
string from = 1;
// The addresses of the recipients of the transfer.
repeated string toAddresses = 2;
// The balances to be transferred.
repeated Balance balances = 3;
// If defined, we will use the predeterminedBalances from the specified approval to calculate the balances at execution time.
// We will override the balances field with the precalculated balances. Only applicable for approvals with predeterminedBalances set.
PrecalculateBalancesFromApprovalDetails precalculateBalancesFromApproval = 4;
// The Merkle proofs / solutions for all Merkle challenges required for the transfer.
repeated MerkleProof merkleProofs = 5;
// The ETH signature proofs / solutions for all ETH signature challenges required for the transfer.
repeated ETHSignatureProof ethSignatureProofs = 6;
// The memo for the transfer.
string memo = 7;
// The prioritized approvals for the transfer. By default, we scan linearly through the approvals and use the first match.
// This field can be used to prioritize specific approvals and scan through them first.
repeated ApprovalIdentifierDetails prioritizedApprovals = 8;
// Whether to only check prioritized approvals for the transfer.
// If true, we will only check the prioritized approvals and fail if none of them match (i.e. do not check any non-prioritized approvals).
// If false, we will check the prioritized approvals first and then scan through the rest of the approvals.
bool onlyCheckPrioritizedCollectionApprovals = 9;
// Whether to only check prioritized approvals for the transfer.
// If true, we will only check the prioritized approvals and fail if none of them match (i.e. do not check any non-prioritized approvals).
// If false, we will check the prioritized approvals first and then scan through the rest of the approvals.
bool onlyCheckPrioritizedIncomingApprovals = 10;
// Whether to only check prioritized approvals for the transfer.
// If true, we will only check the prioritized approvals and fail if none of them match (i.e. do not check any non-prioritized approvals).
// If false, we will check the prioritized approvals first and then scan through the rest of the approvals.
bool onlyCheckPrioritizedOutgoingApprovals = 11;
}
message PrecalculateBalancesFromApprovalDetails {
string approvalId = 1;
string approvalLevel = 2; // "collection", "incoming", or "outgoing"
string approverAddress = 3; // "" if collection-level
string version = 4 [(gogoproto.customtype) = "Uint", (gogoproto.nullable) = false];
PrecalculationOptions precalculationOptions = 5;
}
message PrecalculationOptions {
string overrideTimestamp = 1 [(gogoproto.customtype) = "Uint", (gogoproto.nullable) = false];
repeated UintRange tokenIdsOverride = 2;
}Auto-Scan vs Prioritized Approvals
Auto-Scan Mode (Default)
Prioritized Approvals (Required for Side Effects)
Race Condition Protection
Example: Coin Transfer Approval
Example: Auto-Scan Safe Transfer
Control Flags
Related Documentation
Transfer Validation Process
Validation Steps
Override Behavior
Failure Points
ETH Signature Proofs
Related Documentation
Precalculating Balances
PrecalculationOptions
Field
Type
Description
Collection ID Auto-Lookup
Usage Example
JSON Example
Last updated