Payment Type
Specifying transactions' token denomination.
Payment type is used frequently throughout TheBoxProps
and standardizes the type passed in for native tokens (e.g., ETH) and ERC20s (e.g., USDC).
interface TokenPayment {
amount: bigint;
isNative?: false; // The "isNative" property is optional and has to be set to false if erc20 payment
tokenAddress: Address;
}
interface NativePayment {
amount: bigint;
isNative: true; // The "isNative" property is required and has to be set to true if native payment
tokenAddress?: Address;
}
export type Payment = TokenPayment | NativePayment;
Updated 27 days ago