Calls

setAdmin

Set a new admin account that can perform privileged operations.

The dispatch origin for this call must be Root.

Parameters:

  • new: The new admin account.

Namespace

api.tx.vortexDistribution.setAdmin

Type

function setAdmin(
  new: AccountId
)

createVtxDist

Create a new Vortex distribution.

The dispatch origin for this call must be Root or Admin.

Namespace

api.tx.vortexDistribution.createVtxDist

Type

function createVtxDist()

disableVtxDist

Disable a Vortex distribution.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The ID of the distribution to disable.

Namespace

api.tx.vortexDistribution.disableVtxDist

Type

function disableVtxDist(
  id: VtxDistIdentifier
)

setConsiderCurrentBalance

Set whether to consider current balances for reward calculations.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • value: Boolean indicating whether to consider current balances.

Namespace

api.tx.vortexDistribution.setConsiderCurrentBalance

Type

function setConsiderCurrentBalance(
  value: boolean
)

setDisableRedeem

Enable or disable token redemption functionality.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • value: Boolean indicating whether to disable redemption.

Namespace

api.tx.vortexDistribution.setDisableRedeem

Type

function setDisableRedeem(
  value: boolean
)

setEnableManualRewardInput

Enable or disable manual reward input.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • value: Boolean indicating whether to enable manual reward input.

Namespace

api.tx.vortexDistribution.setEnableManualRewardInput

Type

function setEnableManualRewardInput(
  value: boolean
)

setFeePotAssetBalances

Set fee pot asset balances.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • assets_balances: List of asset balances.

Namespace

api.tx.vortexDistribution.setFeePotAssetBalances

Type

function setFeePotAssetBalances(
  id: VtxDistIdentifier,
  assets_balances: Vec<(AssetId, Balance)>
)

setVtxVaultAssetBalances

Set Vortex vault asset balances.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • assets_balances: List of asset balances.

Namespace

api.tx.vortexDistribution.setVtxVaultAssetBalances

Type

function setVtxVaultAssetBalances(
  id: VtxDistIdentifier,
  assets_balances: Vec<(AssetId, Balance)>
)

setVtxTotalSupply

Set Vortex total supply.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • supply: Total supply amount.

Namespace

api.tx.vortexDistribution.setVtxTotalSupply

Type

function setVtxTotalSupply(
  id: VtxDistIdentifier,
  supply: Balance
)

setAssetPrices

Set asset prices.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • asset_prices: List of asset prices.

Namespace

api.tx.vortexDistribution.setAssetPrices

Type

function setAssetPrices(
  id: VtxDistIdentifier,
  asset_prices: Vec<(AssetId, Balance)>
)

registerRewardPoints

Register reward points.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • reward_points: List of reward points.

Namespace

api.tx.vortexDistribution.registerRewardPoints

Type

function registerRewardPoints(
  id: VtxDistIdentifier,
  reward_points: Vec<(AccountId, Balance)>
)

registerWorkPoints

Register work points.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • work_points: List of work points.

Namespace

api.tx.vortexDistribution.registerWorkPoints

Type

function registerWorkPoints(
  id: VtxDistIdentifier,
  work_points: Vec<(AccountId, Balance)>
)

triggerVtxDistribution

Trigger a Vortex distribution.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.

Namespace

api.tx.vortexDistribution.triggerVtxDistribution

Type

function triggerVtxDistribution(
  id: VtxDistIdentifier
)

startVtxDist

Start a Vortex distribution.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.

Namespace

api.tx.vortexDistribution.startVtxDist

Type

function startVtxDist(
  id: VtxDistIdentifier
)

payUnsigned

Process unsigned payouts.

The dispatch origin for this call must be None.

Parameters:

  • id: The distribution ID.
  • current_block: Current block number.

Namespace

api.tx.vortexDistribution.payUnsigned

Type

function payUnsigned(
  id: VtxDistIdentifier,
  current_block: BlockNumber
)

setVtxVaultRedeemAssetList

Set redeemable assets list.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • assets_list: List of redeemable assets.

Namespace

api.tx.vortexDistribution.setVtxVaultRedeemAssetList

Type

function setVtxVaultRedeemAssetList(
  assets_list: Vec<AssetId>
)

registerRewards

Register rewards manually.

The dispatch origin for this call must be Root or Admin.

Parameters:

  • id: The distribution ID.
  • rewards: List of rewards.

Namespace

api.tx.vortexDistribution.registerRewards

Type

function registerRewards(
  id: VtxDistIdentifier,
  rewards: Vec<(AccountId, Balance)>
)

redeemTokensFromVault

Redeem tokens from the Vortex vault.

The dispatch origin for this call must be Signed.

Parameters:

  • vortex_token_amount: Amount of Vortex tokens to redeem.

Namespace

api.tx.vortexDistribution.redeemTokensFromVault

Type

function redeemTokensFromVault(
  vortex_token_amount: Balance
)

Storage

adminAccount

The admin account that can perform privileged operations.

Namespace

api.query.vortexDistribution.adminAccount

Type

function adminAccount(): Option<AccountId>

nextVortexId

The next available Vortex distribution ID.

Namespace

api.query.vortexDistribution.nextVortexId

Type

function nextVortexId(): VtxDistIdentifier

considerCurrentBalance

Flag indicating whether to consider current balances for reward calculations.

Namespace

api.query.vortexDistribution.considerCurrentBalance

Type

function considerCurrentBalance(): boolean

disableRedeem

Flag to disable token redemption functionality.

Namespace

api.query.vortexDistribution.disableRedeem

Type

function disableRedeem(): boolean

enableManualRewardInput

Flag to enable manual reward input.

Namespace

api.query.vortexDistribution.enableManualRewardInput

Type

function enableManualRewardInput(): boolean

vtxVaultRedeemAssetList

List of assets available for redemption.

Namespace

api.query.vortexDistribution.vtxVaultRedeemAssetList

Type

function vtxVaultRedeemAssetList(): Vec<AssetId>

totalRewardPoints

Total reward points for each distribution cycle.

Namespace

api.query.vortexDistribution.totalRewardPoints

Type

function totalRewardPoints(
  id: VtxDistIdentifier
): Balance

totalWorkPoints

Total work points for each distribution cycle.

Namespace

api.query.vortexDistribution.totalWorkPoints

Type

function totalWorkPoints(
  id: VtxDistIdentifier
): Balance

vtxDistStatuses

Status of each Vortex distribution.

Namespace

api.query.vortexDistribution.vtxDistStatuses

Type

function vtxDistStatuses(
  id: VtxDistIdentifier
): VtxDistStatus

vtxTotalSupply

Total supply of Vortex tokens for each distribution.

Namespace

api.query.vortexDistribution.vtxTotalSupply

Type

function vtxTotalSupply(
  id: VtxDistIdentifier
): Balance

vtxPrice

Vortex token price for each distribution.

Namespace

api.query.vortexDistribution.vtxPrice

Type

function vtxPrice(
  id: VtxDistIdentifier
): Balance

vtxDistOrderbook

Order book for each Vortex distribution.

Namespace

api.query.vortexDistribution.vtxDistOrderbook

Type

function vtxDistOrderbook(
  id: VtxDistIdentifier,
  account: AccountId
): (Balance, boolean)

rewardPoints

Reward points for each account in each distribution.

Namespace

api.query.vortexDistribution.rewardPoints

Type

function rewardPoints(
  id: VtxDistIdentifier,
  account: AccountId
): Balance

workPoints

Work points for each account in each distribution.

Namespace

api.query.vortexDistribution.workPoints

Type

function workPoints(
  id: VtxDistIdentifier,
  account: AccountId
): Balance

feePotAssetsList

Fee pot asset list for each distribution.

Namespace

api.query.vortexDistribution.feePotAssetsList

Type

function feePotAssetsList(
  id: VtxDistIdentifier
): Vec<(AssetId, Balance)>

vtxVaultAssetsList

Vortex vault asset list for each distribution.

Namespace

api.query.vortexDistribution.vtxVaultAssetsList

Type

function vtxVaultAssetsList(
  id: VtxDistIdentifier
): Vec<(AssetId, Balance)>

assetPrices

Asset prices for each distribution.

Namespace

api.query.vortexDistribution.assetPrices

Type

function assetPrices(
  id: VtxDistIdentifier,
  asset: AssetId
): Balance

totalNetworkReward

Total network reward for each distribution.

Namespace

api.query.vortexDistribution.totalNetworkReward

Type

function totalNetworkReward(
  id: VtxDistIdentifier
): Balance

totalBootstrapReward

Total bootstrap reward for each distribution.

Namespace

api.query.vortexDistribution.totalBootstrapReward

Type

function totalBootstrapReward(
  id: VtxDistIdentifier
): Balance

totalVortex

Total Vortex amount for each distribution.

Namespace

api.query.vortexDistribution.totalVortex

Type

function totalVortex(
  id: VtxDistIdentifier
): Balance

nextUnsignedAt

Next unsigned transaction block number.

Namespace

api.query.vortexDistribution.nextUnsignedAt

Type

function nextUnsignedAt(): BlockNumber

vtxDistPayoutPivot

Payout pivot block for each distribution.

Namespace

api.query.vortexDistribution.vtxDistPayoutPivot

Type

function vtxDistPayoutPivot(
  id: VtxDistIdentifier
): Vec<u8>

vtxRewardCalculationPivot

Reward calculation pivot block for each distribution.

Namespace

api.query.vortexDistribution.vtxRewardCalculationPivot

Type

function vtxRewardCalculationPivot(
  id: VtxDistIdentifier
): Vec<u8>

Constants

VTX_DIST_UNSIGNED_PRIORITY

Priority for unsigned transactions.

Type

TransactionPriority

PRECISION_MULTIPLIER

Precision multiplier for integer math (10^6).

Type

u128

PRICE_MULTIPLIER

Asset price multiplier (10^6).

Type

u128

Errors

RequireAdmin

When admin privileges are required.

VtxDistIdNotAvailable

When no distribution ID is available.

VtxDistAlreadyEnabled

When distribution is already enabled.

VtxDistDisabled

When distribution is disabled.

NoVtxAssetMinted

When no Vortex assets are minted.

InvalidAmount

When an invalid amount is provided.

VtxDistIdInUse

When distribution ID is already in use.

NotAValidator

When caller is not a validator.

VortexPeriodNotSet

When Vortex period is not set.

PivotStringTooLong

When pivot string is too long.

AssetsShouldNotIncludeVtxAsset

When assets include Vortex asset.

CannotTrigger

When distribution cannot be triggered.

CannotRedeem

When distribution cannot be redeemed.

NotTriggered

When distribution is not triggered.

ExceededMaxRewards

When rewards exceed maximum limit.

VortexPriceIsZero

When Vortex price is zero.

RootPriceIsZero

When root price is zero.

VtxRedeemDisabled

When Vortex redemption is disabled.

ManualRewardInputDisabled

When manual reward input is disabled.

VtxRewardPayoutFailed

When reward payout fails.

RewardPointsNotRegistered

When reward points are not registered.