NTokenBAYC

Implementation of the NToken for the ParaSpace protocol

constructor

constructor(contract IPool pool, address apeCoinStaking) public

depositApeCoin

function depositApeCoin(struct ApeCoinStaking.SingleNft[] _nfts) external

Deposit ApeCoin to the BAYC Pool

Commits 1 or more BAYC NFTs, each with an ApeCoin amount to the BAYC pool. Each BAYC committed must attach an ApeCoin amount >= 1 ApeCoin and <= the BAYC pool cap amount.

Parameters

NameTypeDescription

_nfts

struct ApeCoinStaking.SingleNft[]

Array of SingleNft structs

claimApeCoin

function claimApeCoin(uint256[] _nfts, address _recipient) external

Claim rewards for array of BAYC NFTs and send to recipient

Parameters

NameTypeDescription

_nfts

uint256[]

Array of NFTs owned and committed by the msg.sender

_recipient

address

Address to send claim reward to

withdrawApeCoin

function withdrawApeCoin(struct ApeCoinStaking.SingleNft[] _nfts, address _recipient) external

Withdraw staked ApeCoin from the BAYC pool. If withdraw is total staked amount, performs an automatic claim.

Parameters

NameTypeDescription

_nfts

struct ApeCoinStaking.SingleNft[]

Array of BAYC NFT's with staked amounts

_recipient

address

Address to send withdraw amount and claim to

depositBAKC

function depositBAKC(struct ApeCoinStaking.PairNftWithAmount[] _nftPairs) external

Deposit ApeCoin to the Pair Pool, where Pair = (BAYC + BAKC)

_Commits 1 or more Pairs, each with an ApeCoin amount to the Pair pool. Each BAKC committed must attach an ApeCoin amount >= 1 ApeCoin and <= the Pair pool cap amount. Example: BAYC + BAKC + 1 ApeCoin: [[0, 0, "1000000000000000000"]]_

Parameters

NameTypeDescription

_nftPairs

struct ApeCoinStaking.PairNftWithAmount[]

Array of PairNftWithAmount structs

claimBAKC

function claimBAKC(struct ApeCoinStaking.PairNft[] _nftPairs, address _recipient) external

Claim rewards for array of Paired NFTs and send to recipient

Parameters

NameTypeDescription

_nftPairs

struct ApeCoinStaking.PairNft[]

Array of Paired BAYC/MAYC NFTs owned and committed by the msg.sender

_recipient

address

Address to send claim reward to

withdrawBAKC

function withdrawBAKC(struct ApeCoinStaking.PairNftWithAmount[] _nftPairs, address _apeRecipient) external

Withdraw staked ApeCoin from the Pair pool. If withdraw is total staked amount, performs an automatic claim.

if pairs have split ownership and BAKC is attempting a withdraw, the withdraw must be for the total staked amount

Parameters

NameTypeDescription

_nftPairs

struct ApeCoinStaking.PairNftWithAmount[]

Array of Paired BAYC NFT's with staked amounts

_apeRecipient

address

POOL_ID

function POOL_ID() internal pure virtual returns (uint256)

getXTokenType

function getXTokenType() external pure returns (enum XTokenType)

return token type`of xToken