IWrapper
WrongParameters
Error thrown when the parameters are wrong
InvalidArrayLength
Error thrown when the params length mismatch or are 0
CannotDoubleWrapSameERC20Token
CannotDoubleWrapSameERC1155TokenId
WrongWrappedType
PercentageUnwrapNotSupported
OnlyNFTOwnerCanUnwrapOrExecute
WrongAssetToUnwrapOrExecute
WrongValueToUnwrap
NonexistentId
SpenderAlreadyApprovedOrUnapproved
WrongSpender
ObjectWrapped
ObjectUnwrapped
SpenderApprovedOrUnapproved
Executed
WrappedObjectType
ProviderWrapAssetsInput
The input of the providerWrapAssets function
Parameters
Name | Type | Description |
---|
ProviderWrapAssetsOnExistingNftInput
The input of the providerWrapAssetsOnExistingNft function
Parameters
Name | Type | Description |
---|
BeneficiaryPartiallyUnwrapAssetsInput
The input of the beneficiaryPartiallyUnwrapAssets function
Parameters
Name | Type | Description |
---|
WrappedObject
approveSpenderOfApprovedAssets
removeSpenderOfApprovedAssets
wrapAssets
Wrap assets on a newly created ERC721 token
Parameters
Name | Type | Description |
---|---|---|
wtypes | enum IWrapper.WrappedObjectType[] | Array of the types of the assets (ERCs) |
tokens | address[] | Array of the addresses of the tokens |
ids | uint256[] | Array of the ids of the tokens (not needed for fungible assets) |
values | uint256[] | Array of the values of the tokens (not needed for non-fungible assets) |
wrapAssetsOnExistingNft
Wrap assets on an already existing ERC721 token
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the existing ERC721 token |
wtypes | enum IWrapper.WrappedObjectType[] | Array of the types of the assets (ERCs) |
tokens | address[] | Array of the addresses of the tokens |
ids | uint256[] | Array of the ids of the tokens (not needed for fungible assets) |
values | uint256[] | Array of the values of the tokens (not needed for non-fungible assets) |
providerWrapAssets
Wrap assets on a newly created ERC721 token, where tokens are acquired from provider and the new ERC721 is provided to the beneficiary
Parameters
Name | Type | Description |
---|---|---|
input | struct IWrapper.ProviderWrapAssetsInput | The input of the function. (Struct is described above) |
providerWrapAssetsOnExistingNft
Wrap assets on an already existing ERC721 token, where tokens are acquired from provider
Parameters
Name | Type | Description |
---|---|---|
input | struct IWrapper.ProviderWrapAssetsOnExistingNftInput | The input of the function. (Struct is described above) |
partiallyUnwrapAssets
Partially unwrap assets from an already existing ERC721 token
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the existing ERC721 token |
tokens | address[] | Array of the addresses of the tokens |
ids | uint256[] | Array of the ids of the tokens (not needed for fungible assets) |
values | uint256[] | Array of the values of the tokens (not needed for non-fungible assets) |
fullyUnwrapAssets
Fully unwrap assets from an already existing ERC721 token
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the existing ERC721 token |
percentageBeneficiaryPartiallyUnwrapAssets
Partially unwrap assets from an already existing ERC721 token, where from each asset a percentage of value is unwrapped, and the receiver is beneficiary
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the existing ERC721 token |
percentage | uint256 | The percentage of each token's value to be unwrapped |
skipNonPercentageWtypes | bool | True if not percentage types should be skipped (NON-FUNGIBLE ASSETS) and false if not |
beneficiary | address | The address that receives the unwrapped assets |
beneficiaryPartiallyUnwrapAssets
Partially unwrap assets from an already existing ERC721 token, where tokens unwrapped are provided to beneficiary
Parameters
Name | Type | Description |
---|---|---|
input | struct IWrapper.BeneficiaryPartiallyUnwrapAssetsInput | The input of the function. (Struct is described above) |
beneficiaryFullyUnwrapAssets
Fully unwrap assets from an already existing ERC721 token, where beneficiary receives the unwrapped assets
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the existing ERC721 token |
beneficiary | address | The address that receives the unwrapped assets |
execute
Function for executing transactions on wrapped assets
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The id of the ERC721 token |
token | address | The address of the token to execute transactions for |
input | bytes | Input needed for the transaction execution |