DeFi Basket
Search…
DeFi Basket
This is the interface to use the protocol, it mints NFTs and routes all functions call through Wallets and Bridges.

CreatePortfolio

Mints a new NFT and allocates deposited funds to this new NFT. Deposited funds can either be ERC20 tokens or ETH.
Input Name
Description
inputs
ERC20 token addresses and amounts that will enter the contract
bridgeAddresses
Addresses of deployed bridge contracts
bridgeEncodedCalls
Encoded calls to be passed on to delegate calls
1
function createPortfolio(
2
IPDataTypes.TokenData calldata inputs,
3
address[] calldata bridgeAddresses,
4
bytes[] calldata bridgeEncodedCalls
5
) payable external;
Copied!

DepositPortfolio

Adds more funds into an existing NFT and rearrange allocation inside the portfolio. Deposited funds can either be ERC20 tokens or ETH. Only the NFT owner can add funds into the NFT.
Input Name
Description
nftId
NFT Id that will have funds deposited into
inputs
ERC20 token addresses and amounts that will enter the contract
bridgeAddresses
Addresses of deployed bridge contracts
bridgeEncodedCalls
Encoded calls to be passed on to delegate calls
1
function depositPortfolio(
2
uint256 nftId,
3
IPDataTypes.TokenData calldata inputs,
4
address[] calldata bridgeAddresses,
5
bytes[] calldata bridgeEncodedCalls
6
) payable external;
Copied!

EditPortfolio

Rearrange allocation inside the portfolio. You can't deposit or withdraw funds with this function, just rearrange whatever is inside. (The bridges would be capable to withdraw funds to accounts different than your own, so be sure to use only trusted bridges).
Input Name
Description
nftId
NFT Id that will have funds deposited into
bridgeAddresses
Addresses of deployed bridge contracts
bridgeEncodedCalls
Encoded calls to be passed on to delegate calls
1
function editPortfolio(
2
uint256 nftId,
3
address[] calldata bridgeAddresses,
4
bytes[] calldata bridgeEncodedCalls
5
) external;
Copied!

WithdrawPortfolio

Withdraws funds from the portfolio after rearranging allocation (optional).
Input Name
Description
nftId
NFT Id that will have funds deposited into
outputs
ERC20 token address and percentages that will exit the contract
outputEthPercentage
Percentage of ETH in portfolio that will exit the contract (100000 = 100%)
bridgeAddresses
Addresses of deployed bridge contracts
bridgeEncodedCalls
Encoded calls to be passed on to delegate calls
1
function withdrawPortfolio(
2
uint256 nftId,
3
IPDataTypes.TokenData calldata outputs,
4
uint256 outputEthPercentage,
5
address[] calldata bridgeAddresses,
6
bytes[] calldata bridgeEncodedCalls
7
) external;
Copied!
Last modified 2mo ago