-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Generate metadata for v37 & v38 * Get changes to events from metadata * Accomodate null value for max_price * Accomodate market mdm change to disputeMechanism * Debug specVersion
- Loading branch information
1 parent
5f66851
commit 267514a
Showing
6 changed files
with
334 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import type {Result} from './support' | ||
|
||
export interface CommonPoolEventParams { | ||
poolId: bigint | ||
who: AccountId32 | ||
} | ||
|
||
export interface Pool { | ||
assets: Asset[] | ||
baseAsset: Asset | ||
marketId: bigint | ||
poolStatus: PoolStatus | ||
scoringRule: ScoringRule | ||
swapFee: (bigint | undefined) | ||
totalSubsidy: (bigint | undefined) | ||
totalWeight: (bigint | undefined) | ||
weights: ([Asset, bigint][] | undefined) | ||
} | ||
|
||
export type AccountId32 = Uint8Array | ||
|
||
export interface SwapEvent { | ||
assetAmountIn: bigint | ||
assetAmountOut: bigint | ||
assetBound: (bigint | undefined) | ||
assetIn: Asset | ||
assetOut: Asset | ||
cpep: CommonPoolEventParams | ||
maxPrice: (bigint | undefined) | ||
} | ||
|
||
export type Asset = Asset_CategoricalOutcome | Asset_ScalarOutcome | Asset_CombinatorialOutcome | Asset_PoolShare | Asset_Ztg | ||
|
||
export interface Asset_CategoricalOutcome { | ||
__kind: 'CategoricalOutcome' | ||
value: [bigint, number] | ||
} | ||
|
||
export interface Asset_ScalarOutcome { | ||
__kind: 'ScalarOutcome' | ||
value: [bigint, ScalarPosition] | ||
} | ||
|
||
export interface Asset_CombinatorialOutcome { | ||
__kind: 'CombinatorialOutcome' | ||
} | ||
|
||
export interface Asset_PoolShare { | ||
__kind: 'PoolShare' | ||
value: SerdeWrapper | ||
} | ||
|
||
export interface Asset_Ztg { | ||
__kind: 'Ztg' | ||
} | ||
|
||
export type PoolStatus = PoolStatus_Active | PoolStatus_CollectingSubsidy | PoolStatus_Closed | PoolStatus_Clean | ||
|
||
export interface PoolStatus_Active { | ||
__kind: 'Active' | ||
} | ||
|
||
export interface PoolStatus_CollectingSubsidy { | ||
__kind: 'CollectingSubsidy' | ||
} | ||
|
||
export interface PoolStatus_Closed { | ||
__kind: 'Closed' | ||
} | ||
|
||
export interface PoolStatus_Clean { | ||
__kind: 'Clean' | ||
} | ||
|
||
export type ScoringRule = ScoringRule_CPMM | ScoringRule_RikiddoSigmoidFeeMarketEma | ||
|
||
export interface ScoringRule_CPMM { | ||
__kind: 'CPMM' | ||
} | ||
|
||
export interface ScoringRule_RikiddoSigmoidFeeMarketEma { | ||
__kind: 'RikiddoSigmoidFeeMarketEma' | ||
} | ||
|
||
export type ScalarPosition = ScalarPosition_Long | ScalarPosition_Short | ||
|
||
export interface ScalarPosition_Long { | ||
__kind: 'Long' | ||
} | ||
|
||
export interface ScalarPosition_Short { | ||
__kind: 'Short' | ||
} | ||
|
||
export type SerdeWrapper = bigint |
Oops, something went wrong.