WithdrawFacet
WithdrawFacet
Provides the ability to withdraw funds from the contract. This is used as 'Black Hole Protection' to be able to refund users who inadvertently send funds or tokens to the contract. Access is restricted to the special ROLE_FINANCE role to prevent abuse.
withdraw
Withdraws ETH from the contract.
This is to be used to withdraw the ETH that was sent to the contract as payment for the NFTs.
withdrawERC20
Withdraws ERC20 tokens from the contract.
This is to be used to withdraw the ERC20 tokens (USDC, etc) that were sent to the contract as payment for the NFTs.
Parameters
tokenAddress
address
The address of the ERC20 token contract.
withdrawERC721
Blackhole protection against accidentally transferred NFTs.
This is a fallback in case the contract receives 721 NFTs directly.
Parameters
tokenAddress
address
The address of the NFT contract.
tokenId
uint256
The ID of the NFT to withdraw.
withdrawERC1155
Blackhole protection against accidentally transferred NFTs.
This is a fallback in case the contract receives 1155 NFTs directly.
Parameters
tokenAddress
address
The address of the NFT contract.
tokenId
uint256
The ID of the NFT to withdraw.
Was this helpful?