React Hooks
useSponsorTokenWithERC20
Sponsor a token with ERC-20
Usage
Returns
sponsorTokenWithERC20
Function to sponsor a token with an EOA wallet. See sponsorTokenWithERC20 args.
- type:
({ channelAddress: string; sponsoredToken: DeferredTokenIntentWithSignature; to: string; amount: number; mintReferral: string; data: string; transactionOverrides?: TransactionOverrides; }, erc20Contract: Address, erc20AmountRequired: bigint ) => Promise<{ tokenId: bigint | undefined; events: Log[]; } | undefined>
sponsorTokenWithERC20_smartWallet
Function to sponsor a token with a smart wallet. See sponsorTokenWithERC20 args.
- type:
({ channelAddress: string; sponsoredToken: DeferredTokenIntentWithSignature; to: string; amount: number; mintReferral: string; data: string; transactionOverrides?: TransactionOverrides; }, erc20Contract: Address, erc20AmountRequired: bigint ) => Promise<{ tokenId: bigint | undefined; events: Log[]; } | undefined>
status
- type:
ContractExecutionStatus | erc20ApprovalInProgress
the status of the transaction
tokenId
- type:
bigint
the token id of the sponsored token
txHash
- type:
string
the transaction hash of the transaction
error
- type:
any
the revert message if the transaction fails