NFT Staking
Last updated
Last updated
POST
https://api.hotcross.com/nft-staking/collections/{collectionAddress}/tx/approve
collectionAddress*
String
The smart contract of the collection to approve on
user*
String
The user account
targetAddress*
String
The address of the user is adding approval for
chainId*
Number
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
Responses:
data - string:
The call data of the transaction can be empty for simple value transfers
gas - number:
The gas provided by the transaction
Postman example
POST
https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/deposit
poolAddress*
String
The smart contract address of the staking pool
pid*
Number
The pid of the staking pool
user*
String
The user account
tokenIds*
[string]
An array of the tokenIds the user wants to deposit
amounts*
[string]
An array of the amounts the user wants to deposit. Must be 1-1 with tokenIds
chainId*
Numer
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
Responses:
data - string:
The call data of the transaction can be empty for simple value transfers
gas - number:
The gas provided by the transaction
POST
https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/withdraw
poolAddress*
String
The smart contract address of the staking pool
pid*
Number
The pid of the staking pool
user*
String
The user account
tokenIds*
[String]
An array of the tokenIds the user wants to withdraw
amounts*
[String]
An array of the amounts the user wants to withdraw. Must be 1-1 with tokenIds
chainId*
Number
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
d
Responses:
data - string:
The call data of the transaction can be empty for simple value transfers
gas - number:
The gas provided by the transaction
POST
https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/claim-rewards
poolAddress*
String
The smart contract address of the staking pool
pid*
Number
The pid of the staking pool
user*
String
The user account
chainId*
Number
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
Responses:
data - string:
The call data of the transaction can be empty for simple value transfers
gas - number:
The gas provided by the transaction
Postman example
POST
https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/user-data
poolAddress*
String
The smart contract address of the reward pool
pid*
Number
The pid of the staking pool
user*
String
The user account
chainId*
Number
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
Responses:
amount - string:
The staked NFTs amount
lastDepositBlock - string:
The last block the user made a deposit. Used for the unstake delay time calculation
Postman example
POST
https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/pending-rewards
poolAddress*
String
The smart contract address of the reward pool
pid*
Number
The pid of the staking pool
Accept*
String
application/json
Content-Type*
String
application/json
user*
String
The user account
chainId*
Number
The chain id of the blockchain you want to read the pools from
Ethereum: 1
BNB Smart Chain: 56
Avalanche C-Chain: 43114
Responses:
"string"
: the pending rewards
Postman example