EscrowFacet
Erc20Deposited
TransferEscrow
gotchiEscrow
depositERC20
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
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
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
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 |
transferEscrow
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 |