Appearance
Solidity API
PropsWithdraw
Facet for withdrawing ETH, ERC20, ERC721, and ERC1155 tokens from the diamond
WITHDRAW_ROLE
solidity
bytes32 WITHDRAW_ROLEwithdrawETH
solidity
function withdrawETH(address payable recipient, uint256 amount) externalWithdraws ETH from the contract
Parameters
| Name | Type | Description |
|---|---|---|
| recipient | address payable | The address to receive the ETH |
| amount | uint256 | The amount of ETH to withdraw |
withdrawERC20
solidity
function withdrawERC20(address token, address recipient, uint256 amount) externalWithdraws ERC20 tokens from the contract
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC20 token to withdraw |
| recipient | address | The address to receive the tokens |
| amount | uint256 | The amount of tokens to withdraw |
withdrawERC721
solidity
function withdrawERC721(address token, address recipient, uint256 tokenId) externalWithdraws an ERC721 token from the contract
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC721 token to withdraw |
| recipient | address | The address to receive the token |
| tokenId | uint256 | The ID of the token to withdraw |
withdrawERC1155
solidity
function withdrawERC1155(address token, address recipient, uint256 tokenId, uint256 amount) externalWithdraws ERC1155 tokens from the contract
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC1155 token to withdraw |
| recipient | address | The address to receive the tokens |
| tokenId | uint256 | The ID of the token to withdraw |
| amount | uint256 | The amount of tokens to withdraw |