Skip to content

Solidity API

PropsWithdraw

Facet for withdrawing ETH, ERC20, ERC721, and ERC1155 tokens from the diamond

WITHDRAW_ROLE

solidity
bytes32 WITHDRAW_ROLE

withdrawETH

solidity
function withdrawETH(address payable recipient, uint256 amount) external

Withdraws ETH from the contract

Parameters

NameTypeDescription
recipientaddress payableThe address to receive the ETH
amountuint256The amount of ETH to withdraw

withdrawERC20

solidity
function withdrawERC20(address token, address recipient, uint256 amount) external

Withdraws ERC20 tokens from the contract

Parameters

NameTypeDescription
tokenaddressThe address of the ERC20 token to withdraw
recipientaddressThe address to receive the tokens
amountuint256The amount of tokens to withdraw

withdrawERC721

solidity
function withdrawERC721(address token, address recipient, uint256 tokenId) external

Withdraws an ERC721 token from the contract

Parameters

NameTypeDescription
tokenaddressThe address of the ERC721 token to withdraw
recipientaddressThe address to receive the token
tokenIduint256The ID of the token to withdraw

withdrawERC1155

solidity
function withdrawERC1155(address token, address recipient, uint256 tokenId, uint256 amount) external

Withdraws ERC1155 tokens from the contract

Parameters

NameTypeDescription
tokenaddressThe address of the ERC1155 token to withdraw
recipientaddressThe address to receive the tokens
tokenIduint256The ID of the token to withdraw
amountuint256The amount of tokens to withdraw