Add orml{Oracle, Tokens} generic runtime definitions (#5006)
* Add orml{Oracle, Tokens} generic runtime definitions
* Adjust
This commit is contained in:
@@ -62,6 +62,10 @@ export { default as xcm } from './xcm/definitions';
|
||||
export { default as contractsAbi } from './contractsAbi/definitions';
|
||||
export { default as eth } from './eth/definitions';
|
||||
|
||||
// orml definitions
|
||||
export { default as ormlOracle } from './ormlOracle/definitions';
|
||||
export { default as ormlTokens } from './ormlTokens/definitions';
|
||||
|
||||
// pull in rpc last, assuming that is uses info from above
|
||||
export { default as rpc } from './rpc/definitions';
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
// https://github.com/open-web3-stack/open-runtime-module-library/blob/b57f88b39cd547e2fb51727d8bb9bcc64fddf8b5/oracle/rpc/runtime-api/src/lib.rs#L12-L21
|
||||
OracleApi: [
|
||||
{
|
||||
methods: {
|
||||
get_all_values: {
|
||||
description: 'Retrieves all values',
|
||||
params: [
|
||||
{
|
||||
name: 'providerId',
|
||||
// This is a Codec type
|
||||
type: 'Raw'
|
||||
}
|
||||
],
|
||||
// This won't actually work as expected - since we have
|
||||
// no information about the actual Raw sizes, we cannot
|
||||
// handle it in this format (it would need an override
|
||||
// for the specific Codec). So return the Raw value.
|
||||
// type: 'Vec<(Raw, Option<Raw>)>'
|
||||
type: 'Raw'
|
||||
},
|
||||
get_value: {
|
||||
description: 'Retrieves a single value',
|
||||
params: [
|
||||
{
|
||||
name: 'providerId',
|
||||
// This is a Codec type
|
||||
type: 'Raw'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
// This is a Codec type
|
||||
type: 'Raw'
|
||||
}
|
||||
],
|
||||
// This is an Option<Codec> type
|
||||
type: 'Option<Raw>'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_ORMLORACLE = 'ormlOracle';
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { runtime } from './runtime';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
// https://github.com/open-web3-stack/open-runtime-module-library/blob/b57f88b39cd547e2fb51727d8bb9bcc64fddf8b5/tokens/rpc/runtime-api/src/lib.rs#L11-L18
|
||||
TokensApi: [
|
||||
{
|
||||
methods: {
|
||||
query_existential_deposit: {
|
||||
description: 'Query the existential amount for a specific currency',
|
||||
params: [
|
||||
{
|
||||
name: 'currencyId',
|
||||
// This is CurrencyId, as per the return value, we are unsure
|
||||
// if this is specialized and/or global to the chain or not
|
||||
type: 'Raw'
|
||||
}
|
||||
],
|
||||
// This is Balance - since we don't understand enough about the way
|
||||
// in which this is used, we default to u128 here (it certainly could
|
||||
// be a specialized type that doesn't map to the on-chain Balance)
|
||||
type: 'u128'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export type PHANTOM_ORMLTOKENS = 'ormlTokens';
|
||||
@@ -39,6 +39,8 @@ export * from './lottery/types';
|
||||
export * from './mmr/types';
|
||||
export * from './offchain/types';
|
||||
export * from './offences/types';
|
||||
export * from './ormlOracle/types';
|
||||
export * from './ormlTokens/types';
|
||||
export * from './parachains/types';
|
||||
export * from './payment/types';
|
||||
export * from './poll/types';
|
||||
|
||||
Reference in New Issue
Block a user