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
  • AllowUpgrade
  • UpdateMarketHub
  • setMarketHub
  • Parameters
  • executeRawTransaction
  • Parameters
  • Return Values
  • transferERC721
  • Parameters
  • list
  • Parameters
  • delist
  • Parameters
  • buy
  • Parameters
  • offer
  • Parameters
  • revokeOffer
  • Parameters
  • acceptOffer
  • Parameters
  • updateSale
  • Parameters
  • setOffchainPayout
  • Parameters
  • transferNative
  • Parameters
  • approveERC20
  • Parameters
  • transferERC20
  • Parameters
  • approveERC721
  • Parameters
  • setApprovalForAllERC721
  • Parameters
  • setApprovalForAllERC1155
  • Parameters
  • transferFromERC1155
  • Parameters
  1. team-smart-wallet

ITeamSmartWallet

A smart contract for managing access-controlled and upgradable smart wallets for teams. Includes capabilities for trading NFTs, managing financials, and upgrading the smart wallet.

The contract uses OpenZeppelin's AccessControlUpgradeable for access control functionality, and UUPSUpgradeable for the upgradeability. It implements the IERC721ReceiverUpgradeable and IERC1155ReceiverUpgradeable interfaces to enable receiving NFTs, and uses the SignatureValidator contract to enable off-chain approval of transactions.

AllowUpgrade

event AllowUpgrade(bool isAllowed)

Emitted when a admin consents to a contract upgade.

UpdateMarketHub

event UpdateMarketHub(address marketHub)

Emitted when the registered MarketHub is updated.

setMarketHub

function setMarketHub(address _marketHub) external

Sets the address of the MarketHub contract.

Parameters

Name
Type
Description

_marketHub

address

The new MarketHub contract address.

executeRawTransaction

function executeRawTransaction(address _target, uint256 _value, bytes _data) external returns (bool success, bytes returnData)

This function is used to execute raw transactions.

Can only be called by the DEFAULT_ADMIN_ROLE. Calls an arbitrary function in a smart contract.

Parameters

Name
Type
Description

_target

address

The target smart contract address.

_value

uint256

The amount of native token to be sent.

_data

bytes

The raw data representing a function and its parameters in the smart contract.

Return Values

Name
Type
Description

success

bool

Boolean indicator for the status of transaction execution.

returnData

bytes

Data returned from function call.

transferERC721

function transferERC721(address _collection, address _recipient, uint256 _tokenId) external

This function is used to transfer ERC721 NFTs from this contract to another address.

Can only be called by the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the NFT collection.

_recipient

address

The address to receive the NFT.

_tokenId

uint256

The ID of the NFT to transfer.

list

function list(address _collection, uint256 _tokenId, address _erc20, uint256 _price) external

This function is used to list a token for trading.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the token's collection.

_tokenId

uint256

The ID of the token to list.

_erc20

address

The address of the ERC20 token to be used for payment.

_price

uint256

The listing price of the token.

delist

function delist(address _collection, uint256 _tokenId, address _erc20) external

This function is used to delist a token from trading.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the token's collection.

_tokenId

uint256

The ID of the token to delist.

_erc20

address

The address of the ERC20 token previously used for payment.

buy

function buy(address _collection, uint256 _tokenId, address _erc20) external

This function is used to buy a listed token.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the collection contract to which the token belongs.

_tokenId

uint256

The ID of the token to be bought.

_erc20

address

The address of the ERC20 token to be used as the payment currency.

offer

function offer(address _collection, uint256 _tokenId, address _erc20, uint256 _price) external

This function is used to make an offer for a token.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the token's collection.

_tokenId

uint256

The ID of the token to offer.

_erc20

address

The address of the ERC20 token to be used for payment.

_price

uint256

The offered price for the token.

revokeOffer

function revokeOffer(address _collection, uint256 _tokenId, address _erc20) external

This function is used to revoke an offer for a token.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_collection

address

The address of the token's collection.

_tokenId

uint256

The ID of the token for which the offer is revoked.

_erc20

address

The address of the ERC20 token previously used for the offer.

acceptOffer

function acceptOffer(address _buyer, address _erc20, address _collection, uint256 _tokenId) external

This function is used to accept an offer for a token.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_buyer

address

The address of the buyer whose offer is being accepted.

_erc20

address

The address of the ERC20 token used in the offer.

_collection

address

The address of the token's collection.

_tokenId

uint256

The ID of the token for which the offer is accepted.

updateSale

function updateSale(uint256 _saleId, enum IEscrow.State _newState) external

This function is used to update the state of a sale.

Can only be called by the TRADING_ROLE.

Parameters

Name
Type
Description

_saleId

uint256

The ID of the sale to update.

_newState

enum IEscrow.State

The new state of the sale.

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.

transferNative

function transferNative(address payable _recipient, uint256 _amount) external

This function allows the caller to perform a native transfer.

The caller must be a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_recipient

address payable

The address of the recipient.

_amount

uint256

The amount to transfer.

approveERC20

function approveERC20(contract IERC20 _token, address _spender, uint256 _amount) external returns (bool)

This function allows a user to approve a ERC20 transfer.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_token

contract IERC20

The ERC20 token to approve.

_spender

address

The address of the spender.

_amount

uint256

The amount to approve.

transferERC20

function transferERC20(address _token, address _recipient, uint256 _amount) external returns (bool)

This function allows the caller permit to perform a ERC20 transfer.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_token

address

The ERC20 token to transfer.

_recipient

address

The address of the recipient.

_amount

uint256

The amount to transfer.

approveERC721

function approveERC721(address _token, address _to, uint256 _tokenId) external

This function allows the caller to approve a ERC721 transfer.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_token

address

The ERC721 token to approve.

_to

address

The address to approve.

_tokenId

uint256

The ID of the token to approve.

setApprovalForAllERC721

function setApprovalForAllERC721(address _erc721, address _operator, bool _approved) external

This function allows a caller to approve or revoke approval of an operator to transfer any NFT by the owner.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_erc721

address

The ERC721 contract to approve.

_operator

address

The address to approve.

_approved

bool

The approval status.

setApprovalForAllERC1155

function setApprovalForAllERC1155(address _erc1155, address _operator, bool _approved) external

This function allows a caller to set approval for all ERC1155 tokens.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_erc1155

address

The ERC1155 token contract.

_operator

address

The operator to be approved or disapproved.

_approved

bool

Approval status to set for the operator.

transferFromERC1155

function transferFromERC1155(address _erc1155, address _from, address _to, uint256 _id, uint256 _amount) external

This function allows a caller to perform a ERC1155 transfer.

The function must be called by a user with the FINANCIAL_ROLE.

Parameters

Name
Type
Description

_erc1155

address

The ERC1155 token contract.

_from

address

The address to transfer from.

_to

address

The address to transfer to.

_id

uint256

The ID of the token to transfer.

_amount

uint256

The amount of the token to transfer.

Previousteam-smart-walletNextITeamSmartWalletHelper

Last updated 1 year ago