IVault

It includes events that are emitted for each function that alters the state of the contract.

IVault interface defines the functions for managing ERC20 and ERC721 assets.

DepositedERC20

event DepositedERC20(address erc20, uint256 amount)

Emitted when an ERC20 token is deposited into the vault.

WithdrawERC20

event WithdrawERC20(address erc20, uint256 amount)

Emitted when an ERC20 token is withdrawn from the vault.

DepositERC721

event DepositERC721(address erc721, uint256 tokenId)

Emitted when an ERC721 token is deposited into the vault.

WithdrawERC721

event WithdrawERC721(address erc721, uint256 tokenId)

Emitted when an ERC721 token is withdrawn from the vault.

SetOffchainPayout

Emitted when a user enables or disables offchain payouts.

OffchainPayout

Emitted when a offchain payout is made.

setOffchainPayout

Turns on or off the offchain payout behaviour

When on, payouts will be redirected to Colle, and emit a event stating Colle owes the user the amount

Parameters

Name
Type
Description

_offchainPayout

bool

Whether to turn on or off offchain payouts.

permitSetOffchainPayout

Turns on or off the offchain payout behaviour, via a EIP-712 signature

When on, payouts will be redirected to Colle, and emit a event stating Colle owes the user the amount

Parameters

Name
Type
Description

_offchainPayout

bool

Whether to turn on or off offchain payouts.

_signature

struct Signature

disableOffchainPayout

Turns off the offchain payout behaviour for a given address

When on, payouts will be redirected to Colle, and emit a event stating Colle owes the user the amount

Parameters

Name
Type
Description

_address

address

The address to disable offchain payouts for

depositERC20ForSale

Deposits ERC20 token into the vault.

Parameters

Name
Type
Description

_saleId

uint256

The id of the sale.

depositColleNFT

Deposits ERC721 token into the vault.

Parameters

Name
Type
Description

_erc721

address

Address of the ERC721 token.

_tokenId

uint256

Token Id of the ERC721 token.

_sender

address

Address of the sender.

withdrawForResolution

Withdraws ERC721 token and ERC20 tokens to a single receiver who will handle making parties whole

Parameters

Name
Type
Description

_sale

struct IEscrow.Sale

The sale that had a issue arise

_receiver

address

withdrawToDepositors

Withdraws ERC721 token and ERC20 tokens to the original depositors of these tokens

Parameters

Name
Type
Description

_sale

struct IEscrow.Sale

The slme that is being cancelled

payout

Withdraws ERC721 token and ERC20 tokens on sale success to all parties.

Parameters

Name
Type
Description

_sale

struct IEscrow.Sale

The sale that is completed

_colleComissionPoolAmount

uint256

The amount of the sale to payout in comissions

_initialOwnerRoyaltyPayout

uint256

The amount of the sale to payout to the original owner as a royalty

_recentOwnerRoyaltyPayout

uint256

The amount of the sale each recent owner gets as a royalty

_amountToSeller

uint256

The amount that the seller is to received from the sale

_initialOwner

address

The address to receive the initial owner royalty

_recentOwners

address[4]

The recent owners to receive the recent owner royalty

erc20Balances

Checks the balance of ERC20 token in the vault.

Parameters

Name
Type
Description

_erc20

address

Address of the ERC20 token.

Return Values

Name
Type
Description

[0]

uint256

Returns the balance of the ERC20 token.

erc721Balances

Checks if an ERC721 token is in the vault.

Parameters

Name
Type
Description

_erc721

address

Address of the ERC721 token.

_tokenId

uint256

Token Id of the ERC721 token.

Return Values

Name
Type
Description

[0]

bool

Returns true if the ERC721 token is in the vault, otherwise false.

Last updated