NFT Staking
Last updated
Last updated
POST
https://api.hotcross.com/nft-staking/collections/{collectionAddress}/tx/approve
Name | Type | Description |
---|---|---|
collectionAddress* | String | The smart contract of the collection to approve on |
Name | Type | Description |
---|---|---|
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: BNB Smart Chain: Avalanche C-Chain: |
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
Name | Type | Description |
---|---|---|
poolAddress* | String | The smart contract address of the staking pool |
pid* | Number | The pid of the staking pool |
Name | Type | Description |
---|---|---|
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: BNB Smart Chain: Avalanche C-Chain: |
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
Name | Type | Description |
---|---|---|
poolAddress* | String | The smart contract address of the staking pool |
pid* | Number | The pid of the staking pool |
Name | Type | Description |
---|---|---|
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: BNB Smart Chain: Avalanche C-Chain: |
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
Name | Type | Description |
---|---|---|
poolAddress* | String | The smart contract address of the staking pool |
pid* | Number | The pid of the staking pool |
Name | Type | Description |
---|---|---|
user* | String | The user account |
chainId* | Number | The chain id of the blockchain you want to read the pools from Ethereum: BNB Smart Chain: Avalanche C-Chain: |
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
Name | Type | Description |
---|---|---|
poolAddress* | String | The smart contract address of the reward pool |
pid* | Number | The pid of the staking pool |
Name | Type | Description |
---|---|---|
user* | String | The user account |
chainId* | Number | The chain id of the blockchain you want to read the pools from Ethereum: BNB Smart Chain: Avalanche C-Chain: |
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
Name | Type | Description |
---|---|---|
poolAddress* | String | The smart contract address of the reward pool |
pid* | Number | The pid of the staking pool |
Name | Type | Description |
---|---|---|
Accept* | String | application/json |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
user* | String | The user account |
chainId* | Number | The chain id of the blockchain you want to read the pools from Ethereum: BNB Smart Chain: Avalanche C-Chain: |
Responses:
"string"
: the pending rewards
Postman example