VortexDistribution
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.setAdminType
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.createVtxDistType
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.disableVtxDistType
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.setConsiderCurrentBalanceType
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.setDisableRedeemType
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.setEnableManualRewardInputType
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.setFeePotAssetBalancesType
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.setVtxVaultAssetBalancesType
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.setVtxTotalSupplyType
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.setAssetPricesType
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.registerRewardPointsType
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.registerWorkPointsType
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.triggerVtxDistributionType
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.startVtxDistType
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.payUnsignedType
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.setVtxVaultRedeemAssetListType
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.registerRewardsType
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.redeemTokensFromVaultType
function redeemTokensFromVault(
vortex_token_amount: Balance
)Storage
adminAccount
The admin account that can perform privileged operations.
Namespace
api.query.vortexDistribution.adminAccountType
function adminAccount(): Option<AccountId>nextVortexId
The next available Vortex distribution ID.
Namespace
api.query.vortexDistribution.nextVortexIdType
function nextVortexId(): VtxDistIdentifierconsiderCurrentBalance
Flag indicating whether to consider current balances for reward calculations.
Namespace
api.query.vortexDistribution.considerCurrentBalanceType
function considerCurrentBalance(): booleandisableRedeem
Flag to disable token redemption functionality.
Namespace
api.query.vortexDistribution.disableRedeemType
function disableRedeem(): booleanenableManualRewardInput
Flag to enable manual reward input.
Namespace
api.query.vortexDistribution.enableManualRewardInputType
function enableManualRewardInput(): booleanvtxVaultRedeemAssetList
List of assets available for redemption.
Namespace
api.query.vortexDistribution.vtxVaultRedeemAssetListType
function vtxVaultRedeemAssetList(): Vec<AssetId>totalRewardPoints
Total reward points for each distribution cycle.
Namespace
api.query.vortexDistribution.totalRewardPointsType
function totalRewardPoints(
id: VtxDistIdentifier
): BalancetotalWorkPoints
Total work points for each distribution cycle.
Namespace
api.query.vortexDistribution.totalWorkPointsType
function totalWorkPoints(
id: VtxDistIdentifier
): BalancevtxDistStatuses
Status of each Vortex distribution.
Namespace
api.query.vortexDistribution.vtxDistStatusesType
function vtxDistStatuses(
id: VtxDistIdentifier
): VtxDistStatusvtxTotalSupply
Total supply of Vortex tokens for each distribution.
Namespace
api.query.vortexDistribution.vtxTotalSupplyType
function vtxTotalSupply(
id: VtxDistIdentifier
): BalancevtxPrice
Vortex token price for each distribution.
Namespace
api.query.vortexDistribution.vtxPriceType
function vtxPrice(
id: VtxDistIdentifier
): BalancevtxDistOrderbook
Order book for each Vortex distribution.
Namespace
api.query.vortexDistribution.vtxDistOrderbookType
function vtxDistOrderbook(
id: VtxDistIdentifier,
account: AccountId
): (Balance, boolean)rewardPoints
Reward points for each account in each distribution.
Namespace
api.query.vortexDistribution.rewardPointsType
function rewardPoints(
id: VtxDistIdentifier,
account: AccountId
): BalanceworkPoints
Work points for each account in each distribution.
Namespace
api.query.vortexDistribution.workPointsType
function workPoints(
id: VtxDistIdentifier,
account: AccountId
): BalancefeePotAssetsList
Fee pot asset list for each distribution.
Namespace
api.query.vortexDistribution.feePotAssetsListType
function feePotAssetsList(
id: VtxDistIdentifier
): Vec<(AssetId, Balance)>vtxVaultAssetsList
Vortex vault asset list for each distribution.
Namespace
api.query.vortexDistribution.vtxVaultAssetsListType
function vtxVaultAssetsList(
id: VtxDistIdentifier
): Vec<(AssetId, Balance)>assetPrices
Asset prices for each distribution.
Namespace
api.query.vortexDistribution.assetPricesType
function assetPrices(
id: VtxDistIdentifier,
asset: AssetId
): BalancetotalNetworkReward
Total network reward for each distribution.
Namespace
api.query.vortexDistribution.totalNetworkRewardType
function totalNetworkReward(
id: VtxDistIdentifier
): BalancetotalBootstrapReward
Total bootstrap reward for each distribution.
Namespace
api.query.vortexDistribution.totalBootstrapRewardType
function totalBootstrapReward(
id: VtxDistIdentifier
): BalancetotalVortex
Total Vortex amount for each distribution.
Namespace
api.query.vortexDistribution.totalVortexType
function totalVortex(
id: VtxDistIdentifier
): BalancenextUnsignedAt
Next unsigned transaction block number.
Namespace
api.query.vortexDistribution.nextUnsignedAtType
function nextUnsignedAt(): BlockNumbervtxDistPayoutPivot
Payout pivot block for each distribution.
Namespace
api.query.vortexDistribution.vtxDistPayoutPivotType
function vtxDistPayoutPivot(
id: VtxDistIdentifier
): Vec<u8>vtxRewardCalculationPivot
Reward calculation pivot block for each distribution.
Namespace
api.query.vortexDistribution.vtxRewardCalculationPivotType
function vtxRewardCalculationPivot(
id: VtxDistIdentifier
): Vec<u8>Constants
VTX_DIST_UNSIGNED_PRIORITY
Priority for unsigned transactions.
Type
TransactionPriorityPRECISION_MULTIPLIER
Precision multiplier for integer math (10^6).
Type
u128PRICE_MULTIPLIER
Asset price multiplier (10^6).
Type
u128Errors
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.