Skip to main content

Common entities

This document lists common entities and data types used throughout the Veax smart contract.

AccountId

Near account ID.

Structure: string

Validity requirements: The string must be a valid NEAR account ID.

Example JSON: "nible**cockroach.lollipop123.near"

TokenId

Near account ID hosting a NEP-141 contract.

Structure: string

Validity requirements: The string must be a valid NEAR account ID.

Example JSON: "fairtoken.testnet"

U64

A 64-bit integer

Structure: string

Validity requirements: The string must represent a 64-bit integer.

Example JSON: "318"

U128

A 128-bit integer

Structure: string

Validity requirements: The string must represent a 128-bit integer.

Example JSON: "560000000"

Pair<TokenId>

Token pair

Structure:

{
left: TokenId,
right: TokenId
}

Validity requirements:

Example JSON:

{
"left": "wnear.testnet",
"right": "usdt.testnet"
}

Pair<U128>

A pair of 128-bit integers.

Structure:

{
left: U128,
right: U128
}

Validity requirements: None

Example JSON:

{
"left": "3716",
"right": "822"
}

Fraction

Common fraction. Usually represents internal floating point value.

Structure:

{
nominator: U128,
denominator: U128,
}

Example:

{
"nominator": "1000",
"denominator": "1"
}