Links

EscrowFacet

Erc20Deposited

event Erc20Deposited(uint256 _tokenId, address _erc20Contract, address _from, address _to, uint256 _depositAmount)

TransferEscrow

event TransferEscrow(uint256 _tokenId, address _erc20Contract, address _from, address _to, uint256 _transferAmount)

gotchiEscrow

function gotchiEscrow(uint256 _tokenId) public view returns (address)

depositERC20

function depositERC20(uint256 _tokenId, address _erc20Contract, uint256 _value) public
Allow the deposit of an ERC20 token to the escrow contract of a claimed aavegotchi
Will throw if token being deposited is same as collateral token for the aavegotchi

Parameters

Name
Type
Description
_tokenId
uint256
The identifier of the NFT receiving the ERC20 token
_erc20Contract
address
The contract address of the ERC20 token to be deposited
_value
uint256
The amount of ERC20 tokens to deposit

batchDepositERC20

function batchDepositERC20(uint256[] _tokenIds, address[] _erc20Contracts, uint256[] _values) external
Allow the deposit of multiple ERC20 tokens to the escrow contract of a multiple claimed aavegotchis
Will throw if one of the tokens being deposited is same as collateral token for the corresponding aavegotchi

Parameters

Name
Type
Description
_tokenIds
uint256[]
An array containing the identifiers of the NFTs receiving the ERC20 tokens
_erc20Contracts
address[]
An array containing the contract addresses of the ERC20 tokens to be deposited
_values
uint256[]
An array containing the amounts of ERC20 tokens to deposit

batchDepositGHST

function batchDepositGHST(uint256[] _tokenIds, uint256[] _values) external
Allow the deposit of GHST into the escrow of multiple aavegotchis

Parameters

Name
Type
Description
_tokenIds
uint256[]
An array containing the identifiers of the NFTs receiving GHST
_values
uint256[]
An array containing the amounts of ERC20 tokens to deposit into each aavegotchi

escrowBalance

function escrowBalance(uint256 _tokenId, address _erc20Contract) external view returns (uint256)
Query the balance of any ERC20 token being hekd in the escrow of an aavegotchi

Parameters

Name
Type
Description
_tokenId
uint256
Identifier of NFT to query
_erc20Contract
address
Contract address of ERC20 token to query

Return Values

Name
Type
Description
[0]
uint256
The balance of the escrow contract in _erc20Contract tokens

transferEscrow

function transferEscrow(uint256 _tokenId, address _erc20Contract, address _recipient, uint256 _transferAmount) external
Allow the owner of the aavegotchi to transfer out any ERC20 token in the escrow to an external address
Will throw if there is an attempt to transfer out the collateral ERC20 token

Parameters

Name
Type
Description
_tokenId
uint256
Identifier of NFT holding the ERC20 token
_erc20Contract
address
Contract address of ERC20 token to transfer out
_recipient
address
Address of the receiver
_transferAmount
uint256
Amount of ERC20 tokens to transfer out