Colle Marketplace
Colle.ioWebApp (Live)WebApp (Test)
  • Contracts Overview
  • Functional Requirements
  • Contract Descriptions
  • Technical Project & Audit Details
  • Test Coverage Report
  • Static Analysis
  • Royalty Pool Explained
  • Sale State Explained
  • Sales Tax Explained
  • marketplace
    • IMarketHub
    • IMarketHubRegistrar
    • MarketHub
    • MarketHubRegistrar
    • MarketHubRegistrarUpgradeable
    • collections
      • ColleCollection
      • ColleCollectionUpgradeable
      • CollectionRegistry
      • IColleCollection
      • IColleCollectionUpgradeable
      • ICollectionRegistry
    • currencies
      • BaseCurrency
      • CurrencyRegistry
      • ICurrency
      • ICurrencyRegistry
      • USDCCurrency
    • escrow
      • EscrowUpgradeable
      • IEscrow
      • IEscrowRegistry
    • kycs
      • Account
      • IKYCRegistry
      • KYCRegistry
    • markets
      • BaseMarketUpgradeable
      • IListingMarket
      • IMarket
      • IMarketRegistry
      • IOfferMarket
      • ListingMarketUpgradeable
      • MarketRegistry
      • OfferMarketUpgradeable
    • royalties
      • BaseRoyalty
      • BlackTierRoyalty
      • GoldTierRoyalty
      • GreenTierRoyalty
      • IRoyalty
      • IRoyaltyPool
      • IRoyaltyRegistry
      • PlatinumTierRoyalty
      • RoyaltyPool
      • RoyaltyRegistry
      • v1
        • BlackTierRoyaltyV1
        • GoldTierRoyaltyV1
        • GreenTierRoyaltyV1
        • PlatinumTierRoyaltyV1
    • taxes
      • ITaxPolicyRegistry
      • Tax
      • TaxPolicyRegistry
    • upgrade-gatekeeper
      • IUpgradeGatekeeper
      • UpgradeGatekeeper
    • vaults
      • IVault
      • IVaultRegistry
      • VaultUpgradeable
  • team-smart-wallet
    • ITeamSmartWallet
    • ITeamSmartWalletHelper
    • TeamSmartWallet
    • TeamSmartWalletFactory
    • TeamSmartWalletPermitHelper
  • utils
    • MarketAccess
    • MarketAccessUpgradeable
    • Signature
    • SignatureValidator
Powered by GitBook
On this page
  • DepositedERC20
  • WithdrawERC20
  • DepositERC721
  • WithdrawERC721
  • SetOffchainPayout
  • OffchainPayout
  • setOffchainPayout
  • Parameters
  • permitSetOffchainPayout
  • Parameters
  • disableOffchainPayout
  • Parameters
  • depositERC20ForSale
  • Parameters
  • depositColleNFT
  • Parameters
  • withdrawForResolution
  • Parameters
  • withdrawToDepositors
  • Parameters
  • payout
  • Parameters
  • erc20Balances
  • Parameters
  • Return Values
  • erc721Balances
  • Parameters
  • Return Values
  1. marketplace
  2. vaults

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

event SetOffchainPayout(address user, bool enabled)

Emitted when a user enables or disables offchain payouts.

OffchainPayout

event OffchainPayout(uint256 saleId, address user, uint256 amount, address erc20)

Emitted when a offchain payout is made.

setOffchainPayout

function setOffchainPayout(bool _offchainPayout) external

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

function permitSetOffchainPayout(bool _offchainPayout, struct Signature _signature) external

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

function disableOffchainPayout(address _address) external

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

function depositERC20ForSale(uint256 _saleId) external

Deposits ERC20 token into the vault.

Parameters

Name
Type
Description

_saleId

uint256

The id of the sale.

depositColleNFT

function depositColleNFT(address _erc721, uint256 _tokenId, address _sender) external

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

function withdrawForResolution(struct IEscrow.Sale _sale, address _receiver) external

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

function withdrawToDepositors(struct IEscrow.Sale _sale) external

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

function payout(struct IEscrow.Sale _sale, uint256 _colleComissionPoolAmount, uint256 _initialOwnerRoyaltyPayout, uint256 _recentOwnerRoyaltyPayout, uint256 _amountToSeller, address _initialOwner, address[4] _recentOwners) external

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

function erc20Balances(address _erc20) external view returns (uint256)

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

function erc721Balances(address _erc721, uint256 _tokenId) external view returns (bool)

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.

PreviousvaultsNextIVaultRegistry

Last updated 1 year ago