From 7037cb4edd93236fd2d4a15b7c7229caa464bf56 Mon Sep 17 00:00:00 2001 From: Nikhil Saboo <36529278+saboonikhil@users.noreply.github.com> Date: Thu, 2 Dec 2021 20:21:21 +0530 Subject: [PATCH] Update types.json (#371) * Update types.json * Order type lexicographically and use uniform style * Adjust Nominator types to match moonbeam rust structs * Add Rikiddo type Co-authored-by: Harald Heckmann --- misc/types.json | 108 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 7 deletions(-) diff --git a/misc/types.json b/misc/types.json index c7ed794ec..ea39057e2 100644 --- a/misc/types.json +++ b/misc/types.json @@ -29,11 +29,28 @@ "amount": "Balance" }, "CategoryIndex": "u16", + "Collator2": { + "id": "AccountId", + "bond": "Balance", + "nominators": "Vec", + "top_nominators": "Vec", + "bottom_nominators": "Vec", + "total_counted": "Balance", + "total_backing": "Balance", + "state": "CollatorStatus" + }, "CollatorSnapshot": { "bond": "Balance", - "nominators": "Vec", + "delegations": "Vec", "total": "Balance" }, + "CollatorStatus": { + "_enum": { + "Active": null, + "Idle": null, + "Leaving": "RoundIndex" + } + }, "CommonPoolEventParams": { "pool_id": "u128", "who": "AccountId" @@ -41,12 +58,42 @@ "Currency": "Asset", "CurrencyId": "Asset", "CurrencyIdOf": "Asset", + "DelegatorStatus": { + "_enum": { + "Active": null, + "Leaving": "RoundIndex" + } + }, + "EmaConfig": { + "ema_period": "Timespan", + "ema_period_estimate_after": "Option", + "smoothing": "u128" + }, + "EmaMarketVolume": { + "config": "EmaConfig", + "ema": "u128", + "multiplier": "u128", + "last_time": "UnixTimestamp", + "state": "MarketVolumeState", + "start_time": "UnixTimestamp", + "volumes_per_period": "u128" + }, "ExitQ": { "candidates": "Vec", "nominators_leaving": "Vec", "candidate_schedule": "Vec<(AccountId, RoundIndex)>", "nominator_schedule": "Vec<(AccountId, Option, RoundIndex)>" }, + "FeeSigmoid": { + "config": "FeeSigmoidConfig" + }, + "FeeSigmoidConfig": { + "m": "i128", + "p": "i128", + "n": "i128", + "initial_fee": "i128", + "min_revenue": "i128" + }, "Index": "u64", "InflationInfo": { "expect": "RangeBalance", @@ -122,6 +169,13 @@ "Scalar": "RangeInclusive" } }, + "MarketVolumeState": { + "_enum": [ + "Uninitialized", + "DataCollectionStarted", + "DataCollected" + ] + }, "MaxRuntimeUsize": "u64", "Moment": "u64", "MultiHash": { @@ -129,6 +183,20 @@ "Sha3_384": "[u8; 50]" } }, + "Nominator2": { + "delegations": "Vec", + "revocations": "Vec", + "total": "Balance", + "scheduled_revocations_count": "u32", + "scheduled_revocations_total": "Balance", + "status": "DelegatorStatus" + }, + "NominatorAdded": { + "_enum": { + "AddedToTop": "Balance", + "AddedToBottom": null + } + }, "Order": { "side": "OrderSide", "maker": "AccountId", @@ -145,6 +213,12 @@ ] }, "OrderedSet": "Vec", + "OwnedValuesParams": { + "participated_blocks": "BlockNumber", + "perpetual_incentives": "Balance", + "total_incentives": "Balance", + "total_shares": "Balance" + }, "RangeBalance": { "min": "Balance", "ideal": "Balance", @@ -160,6 +234,16 @@ "total_reward": "Balance", "claimed_reward": "Balance" }, + "Rikiddo": { + "config": "RikiddoConfig", + "fees": "FeeSigmoid", + "ma_short": "EmaMarketVolume", + "ma_long": "EmaMarketVolume" + }, + "RikiddoConfig": { + "initial_fee": "i128", + "log2_e": "i128" + }, "ScoringRule": { "_enum": [ "CPMM", @@ -201,11 +285,11 @@ }, "PoolId": "u128", "PoolStatus": { - "_enum": { - "Active": null, - "CollectingSubsidy": null, - "Stale": null - } + "_enum": [ + "Active", + "CollectingSubsidy", + "Stale" + ] }, "RegistrationInfo": { "account": "AccountId", @@ -242,10 +326,20 @@ "cpep": "CommonPoolEventParams", "max_price": "Balance" }, + "Timespan": { + "_enum": { + "Seconds": "u32", + "Minutes": "u32", + "Hours": "u32", + "Days": "u16", + "Weeks": "u16" + } + }, "TokensAccountData": { "free": "Balance", "reserved": "Balance", "frozen": "Balance" }, + "UnixTimestamp": "u64", "VestingBlockNumber": "u32" -} \ No newline at end of file +}