Initial Hot Cross Offerings

Create IHO contribute tx

POST https://api.hotcross.com/iho/{session}/tx/contribute

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

user*

String

The user account

amount*

number

The amount the user wants to contribute (in wei)

token*

String

The address of the token that will be contributed

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

{
  "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 IHO claim tx

POST https://api.hotcross.com/iho/{session}/tx/claim

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

user*

String

The user account

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

{
  "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 IHO release tx

POST https://api.hotcross.com/iho/{session}/tx/release

Used for sessions with vesting to release the tokens. In order to be able to call this function, the claim API must be called first after the session ends.

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

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

{
  "data": "0x86d1a69f",
  "gas": 97819
}

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 IHO zap-bnb tx

POST https://api.hotcross.com/iho/{session}/tx/zap-bnb

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

ihoZap*

String

The address of the IHO Zap contract

user*

String

The user account

amount*

String

The amount the user wants to zap (in wei)

isWbnb*

boolean

Whether or not the zap will be in BNB (false) or WBNB (true). If BNB (false), the transaction should be sent with a 'value'.

slippage*

numer

A number representing a percentage for the maximum allowed slippage when performing the zap default: 5

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

{
  "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 IHO zap-busd tx

POST https://api.hotcross.com/iho/{session}/tx/zap-busd

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

ihoZap*

String

The address of the IHO Zap contract

user*

String

The user account

amount*

String

The amount the user wants to zap (in wei)

slippage*

number

A number representing a percentage for the maximum allowed slippage when performing the zap default: 5

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

{
  "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

Read the IHO data from blockchain

POST https://api.hotcross.com/iho/{session}/call/data

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

chainId*

String

The chain id of the blockchain you want to read the pools from Ethereum: 1 BNB Smart Chain: 56 Avalanche C-Chain: 43114

{
  "totalContrib": "string",
  "raisingAmount": "string",
  "offeringAmount": "string",
  "vestingParams": {
    "startTime": "string",
    "vestingDuration": {
      "offering": "string",
      "raising": "string"
    },
    "cliff": {
      "offering": "string",
      "raising": "string"
    }
  }
}

Responses:

  • totalContrib - string: The total contribution (in wei) so far

  • raisingAmount - string: The total raising amount (in wei)

  • offeringAmount - string: The total offering amount (in wei)

  • vestingParams

    • startTime - string: The UNIX timestamp for when the vesting period starts

    • vestingDuration

      • offering - string: Vesting duration in seconds for the offering token

      • raising - string: Vesting duration in seconds for the raising token

    • cliff

      • offering - string: The UNIX timestamp of the cliff for the offering token

      • raising - string: The UNIX timestamp of the cliff for the raising token

Postman example

Read the user data for an IHO session from the blockchain

POST https://api.hotcross.com/iho/{session}/call/user-data

Path Parameters

NameTypeDescription

session*

String

The smart contract address of the IHO contract

Request Body

NameTypeDescription

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

user*

String

The user account

{
  "tokenReceivable": "string",
  "refundAmount": "string",
  "contribution": "string",
  "claimed": true,
  "vestingInfo": {
    "offering": {
      "amount": "string",
      "totalClaimed": "string",
      "periodClaimed": "string"
    },
    "refund": {
      "amount": "string",
      "totalClaimed": "string",
      "periodClaimed": "string"
    }
  }
}

Responses:

  • tokenReceivable - string: The user receivable amount (in wei) so far

  • refundAmount - string: The refund amount (in wei) so far

  • contribution - string: The user contribution amount (in wei)

  • claimed - boolean: Whether the user has claimed their tokens. If the session has vesting this means that the user has initialized their vesting.

  • vestingInfo

    • offering

      • amount - string: The amount (in wei) that the user will need to release

      • totalClaimed - string: The amount (in wei) that the user has released so far

      • periodClaimed - string: A duration in seconds for what amount of time the user has released tokens for

    • refund

      • amount - string: The amount (in wei) that the user will need to release

      • totalClaimed - string: The amount (in wei) that the user has released so far

      • periodClaimed - string: A duration in seconds for what amount of time the user has released tokens for

Postman example

Last updated