VortexDistribution

Calls

createVtxDist

List a vortex distribution

Namespace

api.tx.vortexDistribution.createVtxDist

Type

function createVtxDist(

)

disableVtxDist

Disable a distribution

id - The distribution id

Namespace

api.tx.vortexDistribution.disableVtxDist

Type

function disableVtxDist(
  id: u32
)

payUnsigned

Unsigned distribution of vortex, called by offchain worker

id - The distribution id current_block - Current block number

Namespace

api.tx.vortexDistribution.payUnsigned

Type

function payUnsigned(
  id: u32,
  current_block: u32
)

redeemTokensFromVault

Redeem tokens from vault

id - The distribution id vortex_token_amount - Amount of vortex to redeem

Namespace

api.tx.vortexDistribution.redeemTokensFromVault

Type

function redeemTokensFromVault(
  id: u32,
  vortex_token_amount: u128
)

registerRewards

Register distribution rewards

id - The distribution id rewards - Rewards list

Namespace

api.tx.vortexDistribution.registerRewards

Type

function registerRewards(
  id: u32,
  rewards: Vec<(SeedPrimitivesSignatureAccountId20,u128)>
)

setAdmin

Namespace

api.tx.vortexDistribution.setAdmin

Type

function setAdmin(
  new: SeedPrimitivesSignatureAccountId20
)

setAssetPrices

Set asset prices

asset_prices - List of asset prices id - The distribution id

Namespace

api.tx.vortexDistribution.setAssetPrices

Type

function setAssetPrices(
  asset_prices: Vec<(u32,u128)>,
  id: u32
)

setVtxDistEras

Set distribution eras

id - The distribution id start_era - Start era end_era - End era

Namespace

api.tx.vortexDistribution.setVtxDistEras

Type

function setVtxDistEras(
  id: u32,
  start_era: u32,
  end_era: u32
)

startVtxDist

Start distributing vortex

id - The distribution id

Namespace

api.tx.vortexDistribution.startVtxDist

Type

function startVtxDist(
  id: u32
)

triggerVtxDistribution

Trigger distribution

id - The distribution id

Namespace

api.tx.vortexDistribution.triggerVtxDistribution

Type

function triggerVtxDistribution(
  id: u32
)

Storage

adminAccount

Namespace

api.query.vortexDistribution.adminAccount

Type

function adminAccount(

): Option<SeedPrimitivesSignatureAccountId20>

assetPrices

Stores asset prices for each vortex distribution

Namespace

api.query.vortexDistribution.assetPrices

Type

function assetPrices(
  u32,
  u32
): u128

nextUnsignedAt

Stores next unsigned tx block number

Namespace

api.query.vortexDistribution.nextUnsignedAt

Type

function nextUnsignedAt(

): u32

nextVortexId

Namespace

api.query.vortexDistribution.nextVortexId

Type

function nextVortexId(

): u32

stakeRewardsPoints

Stores stake and roles reward points for each vortex distribution

Namespace

api.query.vortexDistribution.stakeRewardsPoints

Type

function stakeRewardsPoints(
  u32,
  SeedPrimitivesSignatureAccountId20
): (u128,u32)

totalVortex

Stores total vortex amount for each distribution

Namespace

api.query.vortexDistribution.totalVortex

Type

function totalVortex(
  u32
): u128

vtxDistEras

Stores start and end eras of each vortex distribution

Namespace

api.query.vortexDistribution.vtxDistEras

Type

function vtxDistEras(
  u32
): (u32,u32)

vtxDistOrderbook

Stores order books for each vortex distribution

Namespace

api.query.vortexDistribution.vtxDistOrderbook

Type

function vtxDistOrderbook(
  u32,
  SeedPrimitivesSignatureAccountId20
): (u128,bool)

vtxDistPayoutPivot

Stores payout pivot block for each vortex distribution

Namespace

api.query.vortexDistribution.vtxDistPayoutPivot

Type

function vtxDistPayoutPivot(
  u32
): Bytes

vtxDistStatuses

Stores status of each vortex distribution

Namespace

api.query.vortexDistribution.vtxDistStatuses

Type

function vtxDistStatuses(
  u32
): PalletVortexVtxDistStatus

Events

AdminAccountChanged

Admin Account changed

Namespace

api.events.vortexDistribution.AdminAccountChanged

Type

type AdminAccountChanged = {
  old_key: Option<SeedPrimitivesSignatureAccountId20>,
  new_key: SeedPrimitivesSignatureAccountId20
}

RewardRegistered

Rewards registered

Namespace

api.events.vortexDistribution.RewardRegistered

Type

type RewardRegistered = {
  id: u32,
  rewards: Vec<(SeedPrimitivesSignatureAccountId20,u128)>
}

SetAssetPrices

Set asset prices

Namespace

api.events.vortexDistribution.SetAssetPrices

Type

type SetAssetPrices = {
  id: u32,
  asset_prices: Vec<(u32,u128)>
}

SetVtxDistEras

Set distribution eras

Namespace

api.events.vortexDistribution.SetVtxDistEras

Type

type SetVtxDistEras = {
  id: u32,
  start_era: u32,
  end_era: u32
}

TriggerVtxDistribution

Trigger distribution calculation

Namespace

api.events.vortexDistribution.TriggerVtxDistribution

Type

type TriggerVtxDistribution = {
  id: u32
}

VtxDistCreated

Distribution created

Namespace

api.events.vortexDistribution.VtxDistCreated

Type

type VtxDistCreated = {
  id: u32
}

VtxDistDisabled

Distribution disabled

Namespace

api.events.vortexDistribution.VtxDistDisabled

Type

type VtxDistDisabled = {
  id: u32
}

VtxDistDone

Distribution done

Namespace

api.events.vortexDistribution.VtxDistDone

Type

type VtxDistDone = {
  id: u32
}

VtxDistPaidOut

Distribution paid out

Namespace

api.events.vortexDistribution.VtxDistPaidOut

Type

type VtxDistPaidOut = {
  id: u32,
  who: SeedPrimitivesSignatureAccountId20,
  amount: u128
}

VtxDistStarted

Distribution started

Namespace

api.events.vortexDistribution.VtxDistStarted

Type

type VtxDistStarted = {
  id: u32
}

Errors

AssetsShouldNotIncludeVtxAsset

Assets should not include vortex asset

Namespace

api.errors.vortexDistribution.AssetsShouldNotIncludeVtxAsset

CannotRedeem

Vortex distribution is not ready to be redeemed

Namespace

api.errors.vortexDistribution.CannotRedeem

CannotTrigger

Vortex distribution is not ready to be triggered

Namespace

api.errors.vortexDistribution.CannotTrigger

InvalidAmount

Invalid amount

Namespace

api.errors.vortexDistribution.InvalidAmount

InvalidEndBlock

Invalid end block

Namespace

api.errors.vortexDistribution.InvalidEndBlock

NotAValidator

Not a validator

Namespace

api.errors.vortexDistribution.NotAValidator

NotTriggered

Vortex distribution not triggered

Namespace

api.errors.vortexDistribution.NotTriggered

NoVtxAssetMinted

No Vtx asset minted

Namespace

api.errors.vortexDistribution.NoVtxAssetMinted

PivotStringTooLong

Pivot string too long

Namespace

api.errors.vortexDistribution.PivotStringTooLong

RequireAdmin

Require to be previous admin

Namespace

api.errors.vortexDistribution.RequireAdmin

VortexPeriodNotSet

Vortex period not set

Namespace

api.errors.vortexDistribution.VortexPeriodNotSet

VtxDistAlreadyEnabled

Vortex distribution already enabled

Namespace

api.errors.vortexDistribution.VtxDistAlreadyEnabled

VtxDistDisabled

Vortex distribution disabled

Namespace

api.errors.vortexDistribution.VtxDistDisabled

VtxDistIdInUse

ID already in use

Namespace

api.errors.vortexDistribution.VtxDistIdInUse

VtxDistIdNotAvailable

No available Dist id

Namespace

api.errors.vortexDistribution.VtxDistIdNotAvailable

Constants

historyDepth

History depth

Namespace

api.consts.vortexDistribution.historyDepth

Type

type historyDepth = u32

nativeAssetId

The native token asset Id (managed by pallet-balances)

Namespace

api.consts.vortexDistribution.nativeAssetId

Type

type nativeAssetId = u32

payoutBatchSize

Payout batch size

Namespace

api.consts.vortexDistribution.payoutBatchSize

Type

type payoutBatchSize = u32

rootPotId

Vortex root pot id

Namespace

api.consts.vortexDistribution.rootPotId

Type

type rootPotId = FrameSupportPalletId

txFeePotId

Vortex fee pot id

Namespace

api.consts.vortexDistribution.txFeePotId

Type

type txFeePotId = FrameSupportPalletId

unsignedInterval

Unsigned transaction interval

Namespace

api.consts.vortexDistribution.unsignedInterval

Type

type unsignedInterval = u32

vtxAssetId

Vortex token asset Id

Namespace

api.consts.vortexDistribution.vtxAssetId

Type

type vtxAssetId = u32

vtxDistPotId

Vortex distribution pot id

Namespace

api.consts.vortexDistribution.vtxDistPotId

Type

type vtxDistPotId = FrameSupportPalletId

Last updated

© 2023 -> ♾️