NFT Staking

Create approve NFT collection tx

POST https://api.hotcross.com/nft-staking/collections/{collectionAddress}/tx/approve

Path Parameters

Request Body

{
  "data": "string",
  "gas": 0
}

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

Create a deposit NFT tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/deposit

Path Parameters

Request Body

{
  "data": "string",
  "gas": 0
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Create a withdraw NFT tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/withdraw

Path Parameters

Request Body

{
  "data": "string",
  "gas": 0
}

Responses:

  • data - string: The call data of the transaction can be empty for simple value transfers

  • gas - number: The gas provided by the transaction

Create a claim reward tx

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/tx/claim-rewards

Path Parameters

Request Body

{
  "data": "string",
  "gas": 0
}

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

Read user data for an NFT pool from the blockchain

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/user-data

Path Parameters

Request Body

{
  "amount": "string",
  "lastDepositBlock": "string"
}

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

Read user's pending rewards from the blockchain

POST https://api.hotcross.com/nft-staking/{poolAddress}/{pid}/call/pending-rewards

Path Parameters

Headers

Request Body

"string"

Responses:

  • "string": the pending rewards

Postman example

Last updated