Rawrshak Documentation
  • Rawrshak
  • Rawrshak Platform
    • What is the Rawrshak Platform?
    • Platform Overview
    • Rawrshak Ecosystem
    • Networks
    • Litepapers
    • Community Channels
    • Partnerships & Integrations
  • Tutorials
    • Gamer
      • Setup
        • Metamask Wallet
        • Adding Optimism Kovan Network
        • Funding Testnet Wallet
      • Demo
    • Developer
      • Setup
        • Arweave Wallet
          • ArDrive Account
        • Pinata
        • Unity
      • Demo
      • Unity
        • Loading the Rawrshak Tools
        • Loading the Rawrshak SDK
        • 3D Static Object In-game Framework
        • Packaging an Asset
          • Static 3D Object Asset
          • Audio Asset
        • Custom Subgraph Query
        • Prefabs
          • Wallet
          • Subgraph
          • Ethereum Blockchain Query
          • Rawrshak Asset
      • Rawrshak Dapp
        • Deploy a Content Contract
        • Upload Data to Arweave
        • Deploying a Meta Asset
          • Image Meta Asset
          • Audio Meta Asset
          • Static 3D Object Meta Asset
        • Updating a Meta Asset's Metadata
        • Minting a Meta Asset
        • Selling a Meta Asset
      • 🚧Custom Subgraphs
    • Unity Asset Viewer
  • Gamers
    • Gamer Decentralized Applications
    • Gaming Marketplace
    • Meta Assets
    • Supported Wallets
  • Developers
    • Smart Contracts
      • Content Contracts
        • Content
        • Content Manager
        • Content Storage
        • Content Factory
      • Exchange Contracts
        • Exchange
        • Orderbook
        • Execution Manager
        • Royalty Manager
        • Erc20Escrow
        • NftEscrow
      • Libraries
        • LibAsset
        • LibOrder
      • Utilities
        • Address Resolver
    • Meta Asset Framework
      • Asset Metadata
      • Asset Types
        • Text Assets
        • Image Assets
        • Audio Assets
        • Static 3D Objects
    • Game Engines
      • Unity Game Engine
        • Unity SDK
        • Unity Tools
      • Unreal Game Engine
      • Godot Game Engine
    • Developer Decentralized Applications
    • Rawrshak Subgraphs
      • Entities
        • Content Subgraph
        • Exchange Subgraph
  • Governance
    • RAWR Token
      • Tokenomics
      • Contract Addresses
    • Rawrshak DAO
Powered by GitBook
On this page
  1. Developers
  2. Smart Contracts
  3. Exchange Contracts

Erc20Escrow

EVENTS

ClaimedRoyalties(owner, tokens, amounts)

AddedTokenSupports(token)

ClaimedRoyalties(address owner, address[] tokens, uint256[] amounts)

Event emitted when the claimRoyalties function is called.

AddedTokenSupport(address token)

Event emitted when the addSupportedTokens function is called.

FUNCTIONS

escrowedTokensByOrder(_orderId)

claimableTokensByOwner(_owner)

isTokenSupported(_token)

addSupportedTokens(_token)

deposit(_token, _orderId, _sender, _amount)

withdraw(_orderId, _receiver, _amount)

transferRoyalty(_token, _sender, _owner, _amount)

transferRoyalty(_orderId, _to, _amount)

transferPlatformFee(_token, _sender, _feesEscrow, _amount)

transferPlatformFee(_orderId, _feesEscrow, _amount)

claimRoyalties(_owner)

escrowedTokensByOrder(uint256 _orderId) -> uint256

Returns the amount of tokens currently escrowed for the given _orderId.

visibility: external

state mutability: view

claimableTokensByOwner(address _owner) -> address[], uint256[]

Returns the token contract addresses and corresponding amounts available to claim by _owner.

visibility: external

state mutability: view

isTokenSupported(address _token) -> bool

Returns true or false based on whether token type _token is supported by Rawrshak.

visibility: external

state mutability: view

addSupportedTokens(address _token)

Adds _token to the list of supported ERC20 tokens on Rawrshak.

Emits an AddedTokenSupport event.

visibility: external

state mutability:

deposit(address _token, uint256 _orderId, address _sender, uint256 _amount)

Transfers _amount of token type _token from _sender to escrow.

visibility: external

state mutability:

withdraw(uint256 _orderId, address _receiver, uint256 _amount)

Withdraws amount of tokens from escrow to receiver.

Requirement:

  • The amount of tokens escrowed must be greater than or equal to _amount.

visibility: external

state mutability:

transferRoyalty(address _token, address _sender, address _owner, uint256 _amount)

Transfers creator royalties from _sender to escrow.

visibility: external

state mutability:

transferRoyalty(uint256 _orderId, address _to, uint256 _amount)

Transfers creator royalties deducted from escrowed buy orders to escrow.

Requirement:

  • The amount of tokens escrowed must be greater than or equal to _amount.

visibility: external

state mutability:

transferPlatformFee(address _token, address _sender, address _feesEscrow, uint256 _amount)

Transfers platform fees from _sender to _feesEscrow.

visibility: external

state mutability:

transferPlatformFee(uint256 _orderId, address _feesEscrow, uint256 _amount)

Transfers platform fees deducted from escrowed buy orders to _feesEscrow.

visibility: external

state mutability:

claimRoyalties(address _owner)

Withdraws any claimable tokens to _owner, and updates the records to reflect that there are no more tokens remaining to claim.

Emits a ClaimedRoyalties event.

visibility: external

state mutability:

PreviousRoyalty ManagerNextNftEscrow

Last updated 3 years ago