From d73fb7b2b78da0cd2534ccdfbb0bdf5e68765ec5 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 13 May 2022 21:14:37 +0500 Subject: [PATCH 01/21] ci: check cache --- .github/workflows/create_branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index d13878f..8cb7485 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -37,7 +37,7 @@ jobs: # cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install --immutable --immutable-cache + run: yarn install --immutable --immutable-cache --check-cache - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} From 8c4b524437f7c95ad3766bc5d4eafe81aa263eda Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 13 May 2022 21:20:38 +0500 Subject: [PATCH 02/21] ci: normal install --- .github/workflows/create_branches.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 8cb7485..53aadbd 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -34,10 +34,11 @@ jobs: with: node-version: "16.x" cache: "yarn" - # cache-dependency-path: "yarn.lock" + cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install --immutable --immutable-cache --check-cache + run: yarn install + # --immutable --immutable-cache --check-cache - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} From 5063b5fbdb97a6b65b42b3b56f83f22a06b6a551 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 13 May 2022 21:45:09 +0500 Subject: [PATCH 03/21] ci: cache yarn --- .github/workflows/create_branches.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 53aadbd..20e0df6 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -37,8 +37,7 @@ jobs: cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install - # --immutable --immutable-cache --check-cache + run: yarn install --immutable --immutable-cache --check-cache - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} From b5f852e83c1bc56b6b936c8f556060bf82bcd3a7 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 13 May 2022 21:46:45 +0500 Subject: [PATCH 04/21] ci: cache yarn --- .github/workflows/create_branches.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 53aadbd..20e0df6 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -37,8 +37,7 @@ jobs: cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install - # --immutable --immutable-cache --check-cache + run: yarn install --immutable --immutable-cache --check-cache - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} From 60a1b05920de66a5813faf5d62e02408b46fde5b Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 13 May 2022 21:49:22 +0500 Subject: [PATCH 05/21] refactor: ready for merge with main --- project.yaml | 6 +++--- src/constants/network.ts | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/project.yaml b/project.yaml index a86e825..0cb94d0 100644 --- a/project.yaml +++ b/project.yaml @@ -13,9 +13,9 @@ repository: https://github.com/ahmedali8/metadot-subql schema: file: ./schema.graphql network: - chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" - endpoint: wss://polkadot.api.onfinality.io/public-ws - dictionary: https://api.subquery.network/sq/subquery/polkadot-dictionary + chainId: + endpoint: + dictionary: dataSources: - kind: substrate/Runtime startBlock: 10086261 diff --git a/src/constants/network.ts b/src/constants/network.ts index 3f057a8..bd3637f 100644 --- a/src/constants/network.ts +++ b/src/constants/network.ts @@ -1,3 +1 @@ import { SupportedChains } from "./chains"; - -export const CHAIN_TOKEN = SupportedChains.POLKADOT; From a641ac59639b83741c24d4e8f7623455d277dc64 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Mon, 16 May 2022 17:15:44 +0500 Subject: [PATCH 06/21] feat: add version tags a/c to package.json version --- .github/workflows/create_branches.yml | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 20e0df6..a020f9e 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -61,3 +61,17 @@ jobs: commit_options: "--no-verify" skip_dirty_check: true skip_checkout: true + + - name: Get package.json version + id: package-version + uses: martinbeentjes/npm-get-version-action@main + + - name: Print package version + run: echo ${{ steps.package-version.outputs.current-version }} + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: v${{ steps.package-version.outputs.current-version }} + prerelease: true + title: "Deployed Build v${{ steps.package-version.outputs.current-version }}" diff --git a/package.json b/package.json index ff74600..50a3d7a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "metadot-multisig", "description": "multisig subquery for metadot", - "version": "0.0.4", + "version": "0.0.1", "author": { "name": "Ahmed Ali", "url": "https://github.com/ahmedali8" From 2e9213bfb31de73bae5b664f7677afc96ed36573 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 20 May 2022 13:00:52 +0500 Subject: [PATCH 07/21] fix: break if dest id not present --- src/handlers/batch.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/handlers/batch.ts b/src/handlers/batch.ts index 94bdbf9..caaf4ea 100644 --- a/src/handlers/batch.ts +++ b/src/handlers/batch.ts @@ -140,6 +140,7 @@ export async function batchHandler(event: SubstrateEvent): Promise { // check if transfer otherwise break if (!value.args.dest) break; + if (!value.args.dest.id) break; const { args: { From 8e095570c221294b5028da97970488dfaa4ad731 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 20 May 2022 15:43:26 +0500 Subject: [PATCH 08/21] feat: add transfer entity relation in multisig --- schema.graphql | 3 ++- src/constants/network.ts | 2 ++ src/handlers/multisig.ts | 20 ++++++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/schema.graphql b/schema.graphql index 7755980..544c13c 100644 --- a/schema.graphql +++ b/schema.graphql @@ -133,9 +133,10 @@ type MultisigRecord @entity { timestamp: Date status: ApproveStatus! # default/cancelled/confirmed - multisigAccount: MultisigAccount! block: Block! confirmBlock: Block + multisigAccount: MultisigAccount! + transfer: Transfer } type Transfer @entity { diff --git a/src/constants/network.ts b/src/constants/network.ts index bd3637f..3f057a8 100644 --- a/src/constants/network.ts +++ b/src/constants/network.ts @@ -1 +1,3 @@ import { SupportedChains } from "./chains"; + +export const CHAIN_TOKEN = SupportedChains.POLKADOT; diff --git a/src/handlers/multisig.ts b/src/handlers/multisig.ts index d8e5d97..5a96548 100644 --- a/src/handlers/multisig.ts +++ b/src/handlers/multisig.ts @@ -1,7 +1,14 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { SubstrateEvent } from "@subql/types"; -import { ApproveRecord, ApproveStatus, Extrinsic, MultisigAccount, MultisigRecord } from "../types"; +import { + ApproveRecord, + ApproveStatus, + Extrinsic, + MultisigAccount, + MultisigRecord, + Transfer, +} from "../types"; import { ensureBlock } from "./block"; export async function ensureMultisigAccount( @@ -122,9 +129,12 @@ export async function executedMultisigHandler(event: SubstrateEvent): Promise>> " + transferId); + const transfer = await Transfer.get(transferId); + logger.info("transfer status >>> " + transfer.status); // Save approve record. await saveApproveRecord(accountId, multisigAccountId, timepointExtrinsicIdx, callHash); @@ -136,6 +146,7 @@ export async function executedMultisigHandler(event: SubstrateEvent): Promise approveRecord.account); + multisigRecord.transferId = transferId; await multisigRecord.save(); } @@ -178,6 +189,7 @@ export async function multisigHandler(event: SubstrateEvent): Promise { } if (method === "MultisigExecuted") { + logger.info("executedMultisigHandler runing"); await executedMultisigHandler(event); } From d4874e18da29d1b0695e607fab74c94c66f104ec Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 20 May 2022 17:19:02 +0500 Subject: [PATCH 09/21] refactor: function refactoring --- schema.graphql | 8 +-- src/handlers/account.ts | 2 - src/handlers/batch.ts | 2 +- src/handlers/block.ts | 32 +++-------- src/handlers/event.ts | 97 +++++++++++---------------------- src/handlers/extrinsic.ts | 68 ++++++----------------- src/handlers/multisig.ts | 55 +++++++------------ src/handlers/transfer.ts | 11 ++-- src/mappings/mappingHandlers.ts | 6 +- 9 files changed, 89 insertions(+), 192 deletions(-) diff --git a/schema.graphql b/schema.graphql index 544c13c..47adbb9 100644 --- a/schema.graphql +++ b/schema.graphql @@ -49,7 +49,6 @@ type BatchRecord @entity { id: ID! # blockNumber-extrinsicHash confirmExtrinsicIdx: String cancelExtrinsicIdx: String - callsStringArray: [String] extrinsicHash: String fees: BigInt module: String # utility @@ -60,20 +59,20 @@ type BatchRecord @entity { block: Block calls: [CallData] status: BatchStatus # completed/interrupted - sender: [BatchRecordSender] @derivedFrom(field: "batch") receivers: [BatchRecordReceiver] @derivedFrom(field: "batch") + sender: [BatchRecordSender] @derivedFrom(field: "batch") } type BatchRecordReceiver @entity { id: ID! # combine id of batch and account id - receiver: Account batch: BatchRecord + receiver: Account } type BatchRecordSender @entity { id: ID! # combine id of batch and account id - sender: Account batch: BatchRecord + sender: Account } type CallData @jsonField { @@ -128,6 +127,7 @@ type MultisigRecord @entity { createExtrinsicIdx: String! # blockNumber-extrinsicIdx confirmExtrinsicIdx: String cancelExtrinsicIdx: String + fees: BigInt module: String! method: String! timestamp: Date diff --git a/src/handlers/account.ts b/src/handlers/account.ts index 7cd7bea..66b0d95 100644 --- a/src/handlers/account.ts +++ b/src/handlers/account.ts @@ -21,9 +21,7 @@ export async function ensureAccounts(ids: string[]): Promise { export async function getAccountById(id: string): Promise { await ensureAccount(id); - const account = await Account.get(id); - return account; } diff --git a/src/handlers/batch.ts b/src/handlers/batch.ts index caaf4ea..7e74ed2 100644 --- a/src/handlers/batch.ts +++ b/src/handlers/batch.ts @@ -40,7 +40,7 @@ const checkIfBatchTransfer = (values: Value[]): { hasTransfer: boolean; transfer for (let k = 0; k < values.length; k++) { const value: Value = values[k]; // check if transfer - if (value?.args?.dest) { + if (value?.args?.dest || value?.args?.dest?.id) { hasTransfer = true; transferCount = transferCount + 1; } else { diff --git a/src/handlers/block.ts b/src/handlers/block.ts index 0ef10b4..c48947e 100644 --- a/src/handlers/block.ts +++ b/src/handlers/block.ts @@ -11,35 +11,17 @@ export async function ensureBlock(id: string): Promise { } } -export async function blockHandler(block: SubstrateBlock): Promise<{ - hash: string; - number: bigint; - blockTimestamp: Date; - parentHash: string; - specVersion: number; - save: () => Promise; -}> { +export async function blockHandler(block: SubstrateBlock): Promise { const hash = block.block.hash.toString(); const number = block.block.header.number.toBigInt() || BigInt(0); const blockTimestamp = getBlockTimestamp(block.block); const parentHash = block.block.header.parentHash.toString(); const specVersion = block.specVersion; - const save = async (): Promise => { - const entity = new Block(hash); - entity.number = number; - entity.timestamp = blockTimestamp; - entity.specVersion = specVersion; - entity.parentHash = parentHash; - await entity.save(); - }; - - return { - hash, - number, - blockTimestamp, - parentHash, - specVersion, - save, - }; + const entity = new Block(hash); + entity.number = number; + entity.parentHash = parentHash; + entity.specVersion = specVersion; + entity.timestamp = blockTimestamp; + await entity.save(); } diff --git a/src/handlers/event.ts b/src/handlers/event.ts index d123fdb..251d743 100644 --- a/src/handlers/event.ts +++ b/src/handlers/event.ts @@ -1,4 +1,3 @@ -import { EventRecord } from "@polkadot/types/interfaces"; import { SubstrateEvent } from "@subql/types"; import { Event } from "../types"; @@ -8,19 +7,7 @@ import { handleExtrinsic } from "./extrinsic"; import { multisigHandler } from "./multisig"; import { transferHandler } from "./transfer"; -export async function eventHandler(event: SubstrateEvent): Promise<{ - index: number; - blockNumber: bigint; - blockHash: string; - events: EventRecord[]; - section: string; - method: string; - data: string; - extrinsicHash: string | undefined; - id: string; - timestamp: Date; - save: () => Promise; -}> { +export async function eventHandler(event: SubstrateEvent): Promise { const index = event.idx; const blockNumber = event.block.block.header.number.toBigInt(); const id = `${blockNumber}-${index}`; @@ -35,54 +22,36 @@ export async function eventHandler(event: SubstrateEvent): Promise<{ : event?.extrinsic?.extrinsic?.hash?.toString(); const timestamp = event.block.timestamp; - const save = async (): Promise => { - const entity = new Event(id); - - await ensureBlock(blockHash); - if (extrinsicHash) { - const handler = await handleExtrinsic(event.extrinsic); - await handler.save(); - entity.extrinsicId = extrinsicHash; - } - - entity.index = index; - entity.section = section; - entity.method = method; - entity.data = data; - entity.timestamp = timestamp; - entity.blockId = blockHash; - await entity.save(); - - // BATCH - if ( - (section === "utility" && method === "BatchCompleted") || - (section === "utility" && method === "BatchInterrupted") - ) { - // batchCompletedHandler - // batchInterruptedHandler - await batchHandler(event); - } - - // MULTISIG - if (section === "multisig") await multisigHandler(event); - - // TRANSFER - if (section === "balances" && method === "Transfer") { - await transferHandler(event); - } - }; - - return { - index, - blockNumber, - blockHash, - events, - section, - method, - data, - extrinsicHash, - id, - timestamp, - save, - }; + await ensureBlock(blockHash); + + const entity = new Event(id); + if (extrinsicHash) { + await handleExtrinsic(event.extrinsic); + entity.extrinsicId = extrinsicHash; + } + entity.index = index; + entity.section = section; + entity.method = method; + entity.data = data; + entity.timestamp = timestamp; + entity.blockId = blockHash; + await entity.save(); + + // BATCH + if ( + (section === "utility" && method === "BatchCompleted") || + (section === "utility" && method === "BatchInterrupted") + ) { + // batchCompletedHandler + // batchInterruptedHandler + await batchHandler(event); + } + + // MULTISIG + if (section === "multisig") await multisigHandler(event); + + // TRANSFER + if (section === "balances" && method === "Transfer") { + await transferHandler(event); + } } diff --git a/src/handlers/extrinsic.ts b/src/handlers/extrinsic.ts index 5f26ad6..71217bb 100644 --- a/src/handlers/extrinsic.ts +++ b/src/handlers/extrinsic.ts @@ -13,21 +13,7 @@ export async function ensureExtrinsic(id: string): Promise { } } -export async function handleExtrinsic(extrinsic: SubstrateExtrinsic): Promise<{ - id: string; - method: string; - section: string; - args: () => string; - signer: string; - nonce: bigint; - timestamp: Date; - blockHash: string; - isSigned: boolean; - signature: string; - tip: bigint; - isSuccess: boolean; - save: () => Promise; -}> { +export async function handleExtrinsic(extrinsic: SubstrateExtrinsic): Promise { const id = extrinsic?.extrinsic?.hash?.toString(); const method = extrinsic?.extrinsic.method.method; const section = extrinsic?.extrinsic.method.section; @@ -51,40 +37,20 @@ export async function handleExtrinsic(extrinsic: SubstrateExtrinsic): Promise<{ const tip = extrinsic?.extrinsic.tip.toBigInt() || BigInt(0); const isSuccess = checkIfExtrinsicExecuteSuccess(extrinsic); - const save = async (): Promise => { - const entity = new Extrinsic(id); - - await ensureBlock(blockHash); - await ensureAccount(signer); - - entity.method = method; - entity.section = section; - entity.args = args(); - entity.signerId = signer; - entity.nonce = nonce; - entity.isSigned = isSigned; - entity.timestamp = timestamp; - entity.signature = signature; - entity.tip = tip; - entity.isSuccess = isSuccess; - entity.blockId = blockHash; - - await entity.save(); - }; - - return { - id, - method, - section, - args, - signer, - nonce, - timestamp, - blockHash, - isSigned, - signature, - tip, - isSuccess, - save, - }; + await ensureBlock(blockHash); + await ensureAccount(signer); + + const entity = new Extrinsic(id); + entity.args = args(); + entity.isSigned = isSigned; + entity.isSuccess = isSuccess; + entity.method = method; + entity.nonce = nonce; + entity.section = section; + entity.signature = signature; + entity.timestamp = timestamp; + entity.tip = tip; + entity.blockId = blockHash; + entity.signerId = signer; + await entity.save(); } diff --git a/src/handlers/multisig.ts b/src/handlers/multisig.ts index 5a96548..cb50acd 100644 --- a/src/handlers/multisig.ts +++ b/src/handlers/multisig.ts @@ -1,14 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { SubstrateEvent } from "@subql/types"; -import { - ApproveRecord, - ApproveStatus, - Extrinsic, - MultisigAccount, - MultisigRecord, - Transfer, -} from "../types"; +import { calculateFees } from "../helpers/fees"; +import { ApproveRecord, ApproveStatus, Extrinsic, MultisigAccount, MultisigRecord } from "../types"; import { ensureBlock } from "./block"; export async function ensureMultisigAccount( @@ -20,22 +14,20 @@ export async function ensureMultisigAccount( if (entity === undefined) { entity = new MultisigAccount(multisigAccountId); const jsonExtrinsicArgs = JSON.parse(extrinsicArgs) as any[]; - let threshold = 0; let members: string[] = []; + let threshold = 0; jsonExtrinsicArgs.forEach((arg) => { - if (arg.name === "threshold") { - threshold = Number(arg.value); - } - if (arg.name === "otherSignatories" || arg.name === "other_signatories") { members = [sender, ...arg.value]; } + if (arg.name === "threshold") { + threshold = Number(arg.value); + } }); - entity.threshold = threshold; entity.members = members; - + entity.threshold = threshold; await entity.save(); } } @@ -71,14 +63,14 @@ export async function newMultisigHandler(event: SubstrateEvent): Promise { // Save new multisig record. const entity = new MultisigRecord(`${multisigAccountId}-${extrinsicIdx}`); + entity.approvals = [accountId]; entity.createExtrinsicIdx = extrinsicIdx; entity.module = event.event.section; entity.method = event.event.method; - entity.multisigAccountId = multisigAccountId; entity.timestamp = event.block.timestamp; - entity.blockId = event.block.block.header.hash.toString(); entity.status = ApproveStatus.default; - entity.approvals = [accountId]; + entity.blockId = event.block.block.header.hash.toString(); + entity.multisigAccountId = multisigAccountId; await entity.save(); // Save approve record. @@ -100,9 +92,7 @@ export async function approveMultisigHandler(event: SubstrateEvent): Promise>> " + transferId); - const transfer = await Transfer.get(transferId); - logger.info("transfer status >>> " + transfer.status); - // Save approve record. await saveApproveRecord(accountId, multisigAccountId, timepointExtrinsicIdx, callHash); // Update multisig record. + const transferId = `${event.block.block.header.number.toNumber()}-${event.extrinsic?.extrinsic.hash.toString()}`; const blockNumber = event.block.block.header.number; - multisigRecord.status = ApproveStatus.confirmed; - multisigRecord.confirmBlockId = currentBlockId; - multisigRecord.confirmExtrinsicIdx = `${blockNumber}-${event.extrinsic?.idx}`; + const fees = event.extrinsic ? calculateFees(event.extrinsic) : BigInt(0); const approveRecords = await ApproveRecord.getByMultisigRecordId(multisigRecordId); multisigRecord.approvals = approveRecords.map((approveRecord) => approveRecord.account); + multisigRecord.confirmExtrinsicIdx = `${blockNumber}-${event.extrinsic?.idx}`; + multisigRecord.fees = fees; + multisigRecord.status = ApproveStatus.confirmed; + multisigRecord.confirmBlockId = currentBlockId; multisigRecord.transferId = transferId; await multisigRecord.save(); } @@ -159,19 +147,16 @@ export async function cancelledMultisigHandler(event: SubstrateEvent): Promise { await ensureBlock(blockId); const entity = new Transfer(`${blockNumber}-${extrinsicHash}`); - entity.fromId = from; - entity.toId = to; - entity.token = { name, decimals }; entity.amount = transformedAmount; - entity.timestamp = timestamp; entity.extrinsicHash = extrinsicHash; - entity.status = isSuccess; entity.fees = fees; + entity.status = isSuccess; + entity.timestamp = timestamp; entity.blockId = blockId; - + entity.fromId = from; + entity.toId = to; + entity.token = { name, decimals }; await entity.save(); } diff --git a/src/mappings/mappingHandlers.ts b/src/mappings/mappingHandlers.ts index 225fbcc..5be5850 100644 --- a/src/mappings/mappingHandlers.ts +++ b/src/mappings/mappingHandlers.ts @@ -4,11 +4,9 @@ import { blockHandler } from "../handlers/block"; import { eventHandler } from "../handlers/event"; export async function handleBlock(block: SubstrateBlock): Promise { - const handler = await blockHandler(block); - await handler.save(); + await blockHandler(block); } export async function handleEvent(event: SubstrateEvent): Promise { - const handler = await eventHandler(event); - await handler.save(); + await eventHandler(event); } From b5e3aef056c561140e98477ddc6638003ad1f438 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 20 May 2022 17:35:18 +0500 Subject: [PATCH 10/21] refactor: separate release functionality --- .github/workflows/create_branches.yml | 14 ----------- .github/workflows/create_release.yml | 34 +++++++++++++++++++++++++++ package.json | 2 +- project.yaml | 8 +++---- 4 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/create_release.yml diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index a020f9e..20e0df6 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -61,17 +61,3 @@ jobs: commit_options: "--no-verify" skip_dirty_check: true skip_checkout: true - - - name: Get package.json version - id: package-version - uses: martinbeentjes/npm-get-version-action@main - - - name: Print package version - run: echo ${{ steps.package-version.outputs.current-version }} - - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: v${{ steps.package-version.outputs.current-version }} - prerelease: true - title: "Deployed Build v${{ steps.package-version.outputs.current-version }}" diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..00c19ed --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,34 @@ +name: Create release + +on: + push: + branches: + - main + pull_request: + branches: + - main + + # Allow workflow to be manually run from the GitHub UI + workflow_dispatch: + +jobs: + create-all-network-branches: + permissions: write-all + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Get package.json version + id: package-version + uses: martinbeentjes/npm-get-version-action@main + + - name: Print package version + run: echo ${{ steps.package-version.outputs.current-version }} + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: v${{ steps.package-version.outputs.current-version }} + prerelease: true + title: "Deployed Build v${{ steps.package-version.outputs.current-version }}" diff --git a/package.json b/package.json index 50a3d7a..185430d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "metadot-multisig", "description": "multisig subquery for metadot", - "version": "0.0.1", + "version": "0.0.2", "author": { "name": "Ahmed Ali", "url": "https://github.com/ahmedali8" diff --git a/project.yaml b/project.yaml index 0cb94d0..25ebfc7 100644 --- a/project.yaml +++ b/project.yaml @@ -13,12 +13,12 @@ repository: https://github.com/ahmedali8/metadot-subql schema: file: ./schema.graphql network: - chainId: - endpoint: - dictionary: + chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" + endpoint: wss://polkadot.api.onfinality.io/public-ws + dictionary: https://api.subquery.network/sq/subquery/polkadot-dictionary dataSources: - kind: substrate/Runtime - startBlock: 10086261 + startBlock: 10366087 mapping: file: ./dist/index.js handlers: From 065f6ae3417102c8233dca533ea5c9dda32e4776 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 10:27:55 +0500 Subject: [PATCH 11/21] refactor: fix project.yaml and network.ts and updated batch and multisig --- project.yaml | 8 ++++---- src/constants/network.ts | 3 --- src/handlers/batch.ts | 6 ++++++ src/handlers/multisig.ts | 1 - 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/project.yaml b/project.yaml index 25ebfc7..0621ddd 100644 --- a/project.yaml +++ b/project.yaml @@ -13,12 +13,12 @@ repository: https://github.com/ahmedali8/metadot-subql schema: file: ./schema.graphql network: - chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" - endpoint: wss://polkadot.api.onfinality.io/public-ws - dictionary: https://api.subquery.network/sq/subquery/polkadot-dictionary + chainId: + endpoint: + dictionary: dataSources: - kind: substrate/Runtime - startBlock: 10366087 + startBlock: mapping: file: ./dist/index.js handlers: diff --git a/src/constants/network.ts b/src/constants/network.ts index 3f057a8..e69de29 100644 --- a/src/constants/network.ts +++ b/src/constants/network.ts @@ -1,3 +0,0 @@ -import { SupportedChains } from "./chains"; - -export const CHAIN_TOKEN = SupportedChains.POLKADOT; diff --git a/src/handlers/batch.ts b/src/handlers/batch.ts index 7e74ed2..87e6427 100644 --- a/src/handlers/batch.ts +++ b/src/handlers/batch.ts @@ -86,6 +86,12 @@ export async function batchHandler(event: SubstrateEvent): Promise { const { name, decimals } = ensureToken(blockNumber); + if (!extrinsicHash) { + logger.info("blockNumber >>> " + blockNumber); + logger.info("extrinsicHash >>> " + extrinsicHash); + return; + } + const extrinsicRecord = await Extrinsic.get(extrinsicHash); const args: Arg[] = JSON.parse(extrinsicRecord.args); diff --git a/src/handlers/multisig.ts b/src/handlers/multisig.ts index cb50acd..0de52dc 100644 --- a/src/handlers/multisig.ts +++ b/src/handlers/multisig.ts @@ -174,7 +174,6 @@ export async function multisigHandler(event: SubstrateEvent): Promise { } if (method === "MultisigExecuted") { - logger.info("executedMultisigHandler runing"); await executedMultisigHandler(event); } From b2150934c2bdb1f7b4cc739385d2cbecd565fbf5 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 10:32:16 +0500 Subject: [PATCH 12/21] ci: only run on PR --- .github/workflows/create_branches.yml | 6 +++--- .github/workflows/create_release.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 20e0df6..76e5de1 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -1,9 +1,9 @@ name: Create all network branches on: - push: - branches: - - main + # push: + # branches: + # - main pull_request: branches: - main diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 00c19ed..ac10232 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -1,9 +1,9 @@ name: Create release on: - push: - branches: - - main + # push: + # branches: + # - main pull_request: branches: - main From 7b7184807b7547d6c5e1e36a680a05d9eca42d33 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 12:30:29 +0500 Subject: [PATCH 13/21] fix: return fn if transfer not available in multisig --- package.json | 1 + scripts/sudo_rm.sh | 8 +++++++ src/handlers/event.ts | 7 +++---- src/handlers/extrinsic.ts | 6 +++--- src/handlers/multisig.ts | 44 +++++++++++++++++++++++++++++++-------- 5 files changed, 50 insertions(+), 16 deletions(-) create mode 100755 scripts/sudo_rm.sh diff --git a/package.json b/package.json index 185430d..5077019 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "postinstall": "husky install", "prepack": "yarn clean && yarn build", "start": "./scripts/start.sh", + "sudo:rm": "./scripts/sudo_rm.sh", "prettier": "prettier --config ./.prettierrc.yaml --ignore-path ./.prettierignore --write \"./src/**/*.{js,json,md,ts,yaml,yml}\"", "prettier:check": "prettier --check --config ./.prettierrc.yaml --ignore-path ./.prettierignore \"./src/**/*.{js,json,md,ts,yaml,yml}\"", "typecheck": "tsc --noEmit" diff --git a/scripts/sudo_rm.sh b/scripts/sudo_rm.sh new file mode 100755 index 0000000..3a102c6 --- /dev/null +++ b/scripts/sudo_rm.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +echo "removing everything..." + +sudo rm -rf .data dist node_modules src/types .yarn/cache .yarn/install-state.gz +sudo docker system prune -a -f --volumes + +echo "done!" diff --git a/src/handlers/event.ts b/src/handlers/event.ts index 251d743..b294d6c 100644 --- a/src/handlers/event.ts +++ b/src/handlers/event.ts @@ -11,8 +11,7 @@ export async function eventHandler(event: SubstrateEvent): Promise { const index = event.idx; const blockNumber = event.block.block.header.number.toBigInt(); const id = `${blockNumber}-${index}`; - const blockHash = event.block.block.hash.toString(); - const events = event.block.events; + const blockId = event.block.block.hash.toString(); const section = event.event.section; const method = event.event.method; const data = event.event.data.toString(); @@ -22,7 +21,7 @@ export async function eventHandler(event: SubstrateEvent): Promise { : event?.extrinsic?.extrinsic?.hash?.toString(); const timestamp = event.block.timestamp; - await ensureBlock(blockHash); + await ensureBlock(blockId); const entity = new Event(id); if (extrinsicHash) { @@ -34,7 +33,7 @@ export async function eventHandler(event: SubstrateEvent): Promise { entity.method = method; entity.data = data; entity.timestamp = timestamp; - entity.blockId = blockHash; + entity.blockId = blockId; await entity.save(); // BATCH diff --git a/src/handlers/extrinsic.ts b/src/handlers/extrinsic.ts index 71217bb..41a03a0 100644 --- a/src/handlers/extrinsic.ts +++ b/src/handlers/extrinsic.ts @@ -31,13 +31,13 @@ export async function handleExtrinsic(extrinsic: SubstrateExtrinsic): Promise { - await ensureBlock(event.block.block.header.hash.toString()); + const blockId = event.block.block.hash.toString(); + await ensureBlock(blockId); const { event: { data }, } = event; @@ -58,7 +66,6 @@ export async function newMultisigHandler(event: SubstrateEvent): Promise { const callHash = data[2].toString(); const extrinsicRecord = await Extrinsic.get(event.extrinsic?.extrinsic?.hash?.toString()); - await ensureMultisigAccount(multisigAccountId, accountId, extrinsicRecord.args); // Save new multisig record. @@ -69,7 +76,7 @@ export async function newMultisigHandler(event: SubstrateEvent): Promise { entity.method = event.event.method; entity.timestamp = event.block.timestamp; entity.status = ApproveStatus.default; - entity.blockId = event.block.block.header.hash.toString(); + entity.blockId = blockId; entity.multisigAccountId = multisigAccountId; await entity.save(); @@ -78,7 +85,8 @@ export async function newMultisigHandler(event: SubstrateEvent): Promise { } export async function approveMultisigHandler(event: SubstrateEvent): Promise { - await ensureBlock(event.block.block.header.hash.toString()); + const blockId = event.block.block.hash.toString(); + await ensureBlock(blockId); const { event: { data }, @@ -121,14 +129,32 @@ export async function executedMultisigHandler(event: SubstrateEvent): Promise>> " + blockNumber); + logger.info("extrinsicHash >>> " + extrinsicHash); + return; + } + + const transferId = `${event.block.block.header.number.toNumber()}-${extrinsicHash}`; + const fees = event.extrinsic ? calculateFees(event.extrinsic) : BigInt(0); + const approveRecords = await ApproveRecord.getByMultisigRecordId(multisigRecordId); + + // ensure tranfer entity exists before storing otherwise return + const transfer = await Transfer.get(transferId); + const transferPresent = transfer?.amount || transfer?.timestamp ? true : false; + logger.info("transfer amount >>> " + transfer?.amount); + logger.info("transfer status >>> " + transfer?.status); + + // return if transfer not present in multisig + if (!transferPresent) return; + // Save approve record. await saveApproveRecord(accountId, multisigAccountId, timepointExtrinsicIdx, callHash); // Update multisig record. - const transferId = `${event.block.block.header.number.toNumber()}-${event.extrinsic?.extrinsic.hash.toString()}`; - const blockNumber = event.block.block.header.number; - const fees = event.extrinsic ? calculateFees(event.extrinsic) : BigInt(0); - const approveRecords = await ApproveRecord.getByMultisigRecordId(multisigRecordId); multisigRecord.approvals = approveRecords.map((approveRecord) => approveRecord.account); multisigRecord.confirmExtrinsicIdx = `${blockNumber}-${event.extrinsic?.idx}`; multisigRecord.fees = fees; From 181111d55aee1c021ea88fa95b01b68deef01a21 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 12:43:54 +0500 Subject: [PATCH 14/21] build: bump versions --- package.json | 16 +- yarn.lock | 855 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 516 insertions(+), 355 deletions(-) diff --git a/package.json b/package.json index 5077019..f3c21e7 100644 --- a/package.json +++ b/package.json @@ -7,19 +7,19 @@ "url": "https://github.com/ahmedali8" }, "devDependencies": { - "@commitlint/cli": "^16.2.4", - "@commitlint/config-conventional": "^16.2.4", - "@polkadot/api": "^8.3.2", + "@commitlint/cli": "^17.0.0", + "@commitlint/config-conventional": "^17.0.0", + "@polkadot/api": "^8.4.2", "@subql/cli": "1.0.0", "@subql/types": "1.0.0", "@trivago/prettier-plugin-sort-imports": "^3.2.0", - "@types/node": "^17.0.33", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@types/node": "^17.0.35", + "@typescript-eslint/eslint-plugin": "^5.25.0", + "@typescript-eslint/parser": "^5.25.0", "commander": "^6.1.0", "commitizen": "^4.2.4", "cz-conventional-changelog": "^3.3.0", - "eslint": "^8.15.0", + "eslint": "^8.16.0", "eslint-config-prettier": "^8.5.0", "husky": "^8.0.1", "lint-staged": "^12.4.1", @@ -29,7 +29,7 @@ "ts-generator": "^0.1.1", "ts-node": "^10.7.0", "typescript": "^4.6.4", - "yaml": "^2.0.1" + "yaml": "^2.1.0" }, "files": [ "dist", diff --git a/yarn.lock b/yarn.lock index 3e751ef..ecdb73c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -282,31 +282,31 @@ __metadata: languageName: node linkType: hard -"@commitlint/cli@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/cli@npm:16.2.4" - dependencies: - "@commitlint/format": ^16.2.1 - "@commitlint/lint": ^16.2.4 - "@commitlint/load": ^16.2.4 - "@commitlint/read": ^16.2.1 - "@commitlint/types": ^16.2.1 +"@commitlint/cli@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/cli@npm:17.0.0" + dependencies: + "@commitlint/format": ^17.0.0 + "@commitlint/lint": ^17.0.0 + "@commitlint/load": ^17.0.0 + "@commitlint/read": ^17.0.0 + "@commitlint/types": ^17.0.0 lodash: ^4.17.19 resolve-from: 5.0.0 resolve-global: 1.0.0 yargs: ^17.0.0 bin: commitlint: cli.js - checksum: 0ae61ed8a5e02ab76bc1820a10dda6bf3e2600a040772f91f141f01bb1b5cbdbe1324e7e098f70f1781a410f2f6b0ce789f9f5260b4fabf913bb4c8a49dedafa + checksum: ac7159458ee6d6271898795dd30fb74efb84e549934aabba189dcc495cf49c48b71ab3ef444175636895526300b914db9c72d59161591e26517fc1cab9f83461 languageName: node linkType: hard -"@commitlint/config-conventional@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/config-conventional@npm:16.2.4" +"@commitlint/config-conventional@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/config-conventional@npm:17.0.0" dependencies: conventional-changelog-conventionalcommits: ^4.3.1 - checksum: 211a322967c1eeee961eb0be9752782d16c025213520b7ada173d6b16050efe477778103f32b62361ad595b79ff6703694569d99705469cb2be0ac5ffba6465e + checksum: d2a8973c65de53bfc283795480c2d12d61507cb13e7e2be129de693c966cf39601e5ebf9b0928508a379f287487fc5ae022ba16868186edf98b5e0a9d73ee96f languageName: node linkType: hard @@ -320,13 +320,23 @@ __metadata: languageName: node linkType: hard -"@commitlint/ensure@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/ensure@npm:16.2.1" +"@commitlint/config-validator@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/config-validator@npm:17.0.0" dependencies: - "@commitlint/types": ^16.2.1 + "@commitlint/types": ^17.0.0 + ajv: ^6.12.6 + checksum: 3130f5b57eff3f2b0fb0044a292f63ed37f501bb6764ba7a85e53125c6962b5914332397ce0f8bb8f0a0ede479e109c8cfa4aabd4ed5983af5eccf09aa5661d1 + languageName: node + linkType: hard + +"@commitlint/ensure@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/ensure@npm:17.0.0" + dependencies: + "@commitlint/types": ^17.0.0 lodash: ^4.17.19 - checksum: 388a124e515c02f14d026973821a6ce1d586ac966da8a51e69fabb925ee858e864696cd2b398bb5bec8d7ceee97f9f04c77630061b7784a10b06e0a436447d44 + checksum: 5ce3c624417dc64ed0d406954b7684ed287142535b0f55df6984093d0f82eadf0da5ab3e472e3020139304cd007c682a4bdfb95cf53fb99e7c7ae6d4711ada6b languageName: node linkType: hard @@ -337,35 +347,42 @@ __metadata: languageName: node linkType: hard -"@commitlint/format@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/format@npm:16.2.1" +"@commitlint/execute-rule@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/execute-rule@npm:17.0.0" + checksum: cb37e5c6e0e16bf04e8f344094146ed2de8155456191da88fb9a1b943a9b5a98e0f6ef49c55b239104eb68634df681fd3be05311bf2da0cb6b171fdd24371669 + languageName: node + linkType: hard + +"@commitlint/format@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/format@npm:17.0.0" dependencies: - "@commitlint/types": ^16.2.1 - chalk: ^4.0.0 - checksum: d8f26a789f0ffc2dd763ed6467262e2cfa94900d7f517f39d32b0f0e9e5222767da12b5302bdccfb1e8a4805c667e5dc36ef98d41754c3ed0e339c35664c0ba6 + "@commitlint/types": ^17.0.0 + chalk: ^4.1.0 + checksum: e54705bdc91741632bac6ae330ba5d08110ec7575900585f4947487e7189a3d586396a3da3f1622fd3b6a49be9af1f71519a1ffeaa562d4cc7349bde3846eb8a languageName: node linkType: hard -"@commitlint/is-ignored@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/is-ignored@npm:16.2.4" +"@commitlint/is-ignored@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/is-ignored@npm:17.0.0" dependencies: - "@commitlint/types": ^16.2.1 + "@commitlint/types": ^17.0.0 semver: 7.3.7 - checksum: 1ae5f3ca1394fc3d211e8c3bf8f8a16b77e8b04050390a6231990d3802865d465273976f4d3ea1d6ec7ca4c9a8220044f10ea5cae3c13db826d56f7d9c69cbaa + checksum: 3070c6de24f4210aabe6da15a48487928a8185b2911b88d42b30aefc673d9bb22f6afab14b3d6ede2ee9cd5d4e0de9de137fed101d42bce6bac004ffeb8bb435 languageName: node linkType: hard -"@commitlint/lint@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/lint@npm:16.2.4" +"@commitlint/lint@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/lint@npm:17.0.0" dependencies: - "@commitlint/is-ignored": ^16.2.4 - "@commitlint/parse": ^16.2.1 - "@commitlint/rules": ^16.2.4 - "@commitlint/types": ^16.2.1 - checksum: 189d3070fb0c131d6ac2b2e8c864c37892fd2d202b866be9f0d9fdf5a5d5a0d5e8221bc373f29977ac1e5e33015abd71640dbd104e86137b60d8d4783d61679f + "@commitlint/is-ignored": ^17.0.0 + "@commitlint/parse": ^17.0.0 + "@commitlint/rules": ^17.0.0 + "@commitlint/types": ^17.0.0 + checksum: 0bd3fdb0e199580a92af2f059b1582b86c86a33526a4ce85e11433f90cff1df7e9381ac11bd2427aeaf7cf6e749010fdb5b978f16342717088a0520b6cba4266 languageName: node linkType: hard @@ -388,52 +405,52 @@ __metadata: languageName: node linkType: hard -"@commitlint/load@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/load@npm:16.2.4" +"@commitlint/load@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/load@npm:17.0.0" dependencies: - "@commitlint/config-validator": ^16.2.1 - "@commitlint/execute-rule": ^16.2.1 - "@commitlint/resolve-extends": ^16.2.1 - "@commitlint/types": ^16.2.1 + "@commitlint/config-validator": ^17.0.0 + "@commitlint/execute-rule": ^17.0.0 + "@commitlint/resolve-extends": ^17.0.0 + "@commitlint/types": ^17.0.0 "@types/node": ">=12" - chalk: ^4.0.0 + chalk: ^4.1.0 cosmiconfig: ^7.0.0 - cosmiconfig-typescript-loader: ^1.0.0 + cosmiconfig-typescript-loader: ^2.0.0 lodash: ^4.17.19 resolve-from: ^5.0.0 - typescript: ^4.4.3 - checksum: b12b6ba2a7fc9ce934b38a22a507a0e414e2d5f95921314049478e2a22c658768570d6db0caafd58411a57369aa9b12e93f313069eb5e136ee10e578d97b7739 + typescript: ^4.6.4 + checksum: c35f7c5d7a8e2812a62b2d10f304c4b4ab8754923b0e59c66f3d9ce5ff3ea84502539c905b82fafbe666b02db5e7d818c119764af5d46485532a8bb73dba0661 languageName: node linkType: hard -"@commitlint/message@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/message@npm:16.2.1" - checksum: 172e18bd5bd47bf7d61356ba1da4a552a5f96860fadb277b9431e1ecfe6b49dd8f303e6d7ad120961325093346ec6764231975f8c73434f5487b05493406d551 +"@commitlint/message@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/message@npm:17.0.0" + checksum: ec80ea7f98082e48116fda1203277ac139bf2f442a8f58f87f8b823c6e526ec3771a9de7821b249254d580bff59a3fe205d044d1e9df29c34c3014a41e851c5d languageName: node linkType: hard -"@commitlint/parse@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/parse@npm:16.2.1" +"@commitlint/parse@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/parse@npm:17.0.0" dependencies: - "@commitlint/types": ^16.2.1 + "@commitlint/types": ^17.0.0 conventional-changelog-angular: ^5.0.11 conventional-commits-parser: ^3.2.2 - checksum: 8f966c45b2838900dfe8af14fa5085707a2c2ece7d6f00d8e61dad1fdd617b202177cfcc428ef6f7a41b7e6872560c9a040cf92eb122ad31a8f7777e3f9bab7b + checksum: 86610df080665b8ba83037c598f4e6d0538a5ec40fdb0c2ad1925bfdf0f494934deafa020d2e21663f64dbc20fec4e889d21675573d3860c379c2d305db7a141 languageName: node linkType: hard -"@commitlint/read@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/read@npm:16.2.1" +"@commitlint/read@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/read@npm:17.0.0" dependencies: - "@commitlint/top-level": ^16.2.1 - "@commitlint/types": ^16.2.1 + "@commitlint/top-level": ^17.0.0 + "@commitlint/types": ^17.0.0 fs-extra: ^10.0.0 git-raw-commits: ^2.0.0 - checksum: c2eb6c299a6af0ffda8ba27a5534210638b227855dd5d01d757fbf7a26a05a5c3d4d1f30e91bdd5ce12de023e482a329fad049df1f5b0f232049e7212e3cf947 + checksum: 5307d9ba06279343280cae4ab64bc6a153a44a24bc8948bbd80f07f5fac1f5b64586d34386ce5f6fd0fd221de4787c21fd82607f44a7969ab499c84bab1f0fa6 languageName: node linkType: hard @@ -451,32 +468,46 @@ __metadata: languageName: node linkType: hard -"@commitlint/rules@npm:^16.2.4": - version: 16.2.4 - resolution: "@commitlint/rules@npm:16.2.4" +"@commitlint/resolve-extends@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/resolve-extends@npm:17.0.0" dependencies: - "@commitlint/ensure": ^16.2.1 - "@commitlint/message": ^16.2.1 - "@commitlint/to-lines": ^16.2.1 - "@commitlint/types": ^16.2.1 + "@commitlint/config-validator": ^17.0.0 + "@commitlint/types": ^17.0.0 + import-fresh: ^3.0.0 + lodash: ^4.17.19 + resolve-from: ^5.0.0 + resolve-global: ^1.0.0 + checksum: 5ebf45caf2062f7a5410bef50b5e2ee9cabab56c8390790140ad8150d434410a1061ad9f585447c2f4171903bcf7d63bc2064c0330787ea0be5284ef8ecb4728 + languageName: node + linkType: hard + +"@commitlint/rules@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/rules@npm:17.0.0" + dependencies: + "@commitlint/ensure": ^17.0.0 + "@commitlint/message": ^17.0.0 + "@commitlint/to-lines": ^17.0.0 + "@commitlint/types": ^17.0.0 execa: ^5.0.0 - checksum: 117373efcec540512747832ab75af30a584e054ff92cce6f47b7fc552cc2048af5f9812b78d1dd5b128e7eeec7623f7bd45f139451020258d87548348c5bf08b + checksum: cd0944069932bee738a0ed70cb972fa0d14c0e35642310ca856d5e368ddc48513d05ece00f2e309ebcf4ecb119f8b44b322ff086edaa5208edb3cec0968dac06 languageName: node linkType: hard -"@commitlint/to-lines@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/to-lines@npm:16.2.1" - checksum: 94b1523298f335583307cff4f634137788bdce67f572dcdd6f08ca09cbe1176193ba2e308158696951ce3dd93cb2c6d1d8946e8ee376f506ac5212a65d87ed58 +"@commitlint/to-lines@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/to-lines@npm:17.0.0" + checksum: ccad787a3baf567c6c589e96e110aa2582103b50eaa9b70493116c08a0e5c6c50669c05e67b0a77cd803d66c031b1dcb9805b752d604178dbc4c744fc7f9bb04 languageName: node linkType: hard -"@commitlint/top-level@npm:^16.2.1": - version: 16.2.1 - resolution: "@commitlint/top-level@npm:16.2.1" +"@commitlint/top-level@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/top-level@npm:17.0.0" dependencies: find-up: ^5.0.0 - checksum: db6ae0483a4b7fbe3e2ca02541049180f87d88417039ea58e7539f22fb042fe50e465f5654394555bf9759b1c1e6130b435e4e80fbcec1d0e58cf24f9ccaf728 + checksum: 2e43d021a63faee67aa0e63b86a3ab9347ccda1b81f1f0722841223bd6bf127de954933c2ca3172fac0a1ce07a8b3bed62ac8f4afa04d50281dc5f80b43b61fb languageName: node linkType: hard @@ -489,6 +520,15 @@ __metadata: languageName: node linkType: hard +"@commitlint/types@npm:^17.0.0": + version: 17.0.0 + resolution: "@commitlint/types@npm:17.0.0" + dependencies: + chalk: ^4.1.0 + checksum: 210636d3923f93f7cfc409eac04376b0fe50356a0e08f25a37b43d5cd9ca4363f7b03ca2e7736cbf95b62d67733fe8e1028269d35b4fddd1b3f2a653c90ca85c + languageName: node + linkType: hard + "@cspotcode/source-map-consumer@npm:0.8.0": version: 0.8.0 resolution: "@cspotcode/source-map-consumer@npm:0.8.0" @@ -505,20 +545,20 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.2.3": - version: 1.2.3 - resolution: "@eslint/eslintrc@npm:1.2.3" +"@eslint/eslintrc@npm:^1.3.0": + version: 1.3.0 + resolution: "@eslint/eslintrc@npm:1.3.0" dependencies: ajv: ^6.12.4 debug: ^4.3.2 espree: ^9.3.2 - globals: ^13.9.0 + globals: ^13.15.0 ignore: ^5.2.0 import-fresh: ^3.2.1 js-yaml: ^4.1.0 minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 48e7b7ac05cd514eee2ebb1d487600f0dd637ac21f63605e353cff6a08c7223275fe4f571d15ee9deae4e78c53edc73369ffcbed15fba4dfc1806179dbf4dc85 + checksum: a1e734ad31a8b5328dce9f479f185fd4fc83dd7f06c538e1fa457fd8226b89602a55cc6458cd52b29573b01cdfaf42331be8cfc1fec732570086b591f4ed6515 languageName: node linkType: hard @@ -1131,245 +1171,261 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/api-augment@npm:8.3.2" +"@polkadot/api-augment@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/api-augment@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/api-base": 8.3.2 - "@polkadot/rpc-augment": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/types-augment": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/util": ^9.1.1 - checksum: 9b3df0f0518db43e17d46290a7ecd196083973f9a5ecbfb8ef7fcc82c9a1486e675a54452245d282e4f29e817000f9d26912217f9a0483470c377daf20f297e3 + "@polkadot/api-base": 8.4.2 + "@polkadot/rpc-augment": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/types-augment": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/util": ^9.2.1 + checksum: 2712f279090d64cf58d971f5c03056bff34fb9cfc54371d669cc2d0538b72a4645e2446cd6c8da77829e4b84545a89226a7b1296082b4ef26abd15137bd37fb6 languageName: node linkType: hard -"@polkadot/api-base@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/api-base@npm:8.3.2" +"@polkadot/api-base@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/api-base@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/rpc-core": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/util": ^9.1.1 + "@polkadot/rpc-core": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/util": ^9.2.1 rxjs: ^7.5.5 - checksum: 0675eb7c68688f6abeb18126911660e38a4480845f7e74357d57dc3bdc12e2d7503b00fad119bbc2f007cd0213aee0fe12b5d8cc68402160cbe1262c887ea882 + checksum: 1a3098bbbdcc1fa6e174f03f4692fcf86c6ab78d30aeaa0480034bc8614db638047bfe72d3205fc53e380e26244b94d22ba0f868096916c8180b54412686fc85 languageName: node linkType: hard -"@polkadot/api-derive@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/api-derive@npm:8.3.2" +"@polkadot/api-derive@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/api-derive@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/api": 8.3.2 - "@polkadot/api-augment": 8.3.2 - "@polkadot/api-base": 8.3.2 - "@polkadot/rpc-core": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/util": ^9.1.1 - "@polkadot/util-crypto": ^9.1.1 + "@polkadot/api": 8.4.2 + "@polkadot/api-augment": 8.4.2 + "@polkadot/api-base": 8.4.2 + "@polkadot/rpc-core": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/util": ^9.2.1 + "@polkadot/util-crypto": ^9.2.1 rxjs: ^7.5.5 - checksum: 08bbd10ffceacf197d7ba751b62beef2e98ecd17fccc080fc10fcabd32d46be3bd129dade7539d4dbf5c979306ba781d2f0e8cab9e7381424883cf470435c1f9 + checksum: 5a5f871d9898d1f11dfa8b0b84d947ef67901e2d50b19471c16060609f106b61482943dbfb49eafe83b3e76815c6de636e22417aa5a8f1f5f02fea019bea0a3e languageName: node linkType: hard -"@polkadot/api@npm:8.3.2, @polkadot/api@npm:^8.3.2": - version: 8.3.2 - resolution: "@polkadot/api@npm:8.3.2" +"@polkadot/api@npm:8.4.2, @polkadot/api@npm:^8.4.2": + version: 8.4.2 + resolution: "@polkadot/api@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/api-augment": 8.3.2 - "@polkadot/api-base": 8.3.2 - "@polkadot/api-derive": 8.3.2 - "@polkadot/keyring": ^9.1.1 - "@polkadot/rpc-augment": 8.3.2 - "@polkadot/rpc-core": 8.3.2 - "@polkadot/rpc-provider": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/types-augment": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/types-create": 8.3.2 - "@polkadot/types-known": 8.3.2 - "@polkadot/util": ^9.1.1 - "@polkadot/util-crypto": ^9.1.1 + "@polkadot/api-augment": 8.4.2 + "@polkadot/api-base": 8.4.2 + "@polkadot/api-derive": 8.4.2 + "@polkadot/keyring": ^9.2.1 + "@polkadot/rpc-augment": 8.4.2 + "@polkadot/rpc-core": 8.4.2 + "@polkadot/rpc-provider": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/types-augment": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/types-create": 8.4.2 + "@polkadot/types-known": 8.4.2 + "@polkadot/util": ^9.2.1 + "@polkadot/util-crypto": ^9.2.1 eventemitter3: ^4.0.7 rxjs: ^7.5.5 - checksum: e3deaedd4d7ae9f5887b0739f61cefece8f121d5e300a9a352aba9ccdafc71da5cc6ec2d928df7845314f4267fcf20b4f4a87c29f9717fac149ee39be756b6dc + checksum: 4d7566d9766c9c13dea65a2d7f50ce9ea1efc079ba9e7b4a6a4971e07b308d09654809d007cd443bb526479b66c46df8a36c5e14c24c5d9010aa825c2b745e94 languageName: node linkType: hard -"@polkadot/keyring@npm:^9.1.1": - version: 9.1.1 - resolution: "@polkadot/keyring@npm:9.1.1" +"@polkadot/keyring@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/keyring@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/util": 9.1.1 - "@polkadot/util-crypto": 9.1.1 + "@polkadot/util": 9.2.1 + "@polkadot/util-crypto": 9.2.1 peerDependencies: - "@polkadot/util": 9.1.1 - "@polkadot/util-crypto": 9.1.1 - checksum: b09ea8c69bcfe5283be1378419633d48ed848ffbddf7c866c51fee6accb761f62f4eb0c1acbc60b25338d27cb193e2a3d46a065827bdf1a1e664fcd1f22922fc + "@polkadot/util": 9.2.1 + "@polkadot/util-crypto": 9.2.1 + checksum: edc930cbdc001b82ab4f604f0f7cb79bec038f8d628f5168f5dbbc1f3ad7b727d103a6db7a4092ee1de54eb6957f5b0a342de0a8e00054675262b4119b2c0e29 languageName: node linkType: hard -"@polkadot/networks@npm:9.1.1, @polkadot/networks@npm:^9.1.1": - version: 9.1.1 - resolution: "@polkadot/networks@npm:9.1.1" +"@polkadot/networks@npm:9.2.1, @polkadot/networks@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/networks@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/util": 9.1.1 - "@substrate/ss58-registry": ^1.17.0 - checksum: de83bad75cb26790209f7739ad9cc3b12d95384aa3c415b4ab4d7be78448f57a5ccc46f28cd4f1848cdf1aa68cf52792c48206533902745eb7e7cc6ace212e50 + "@polkadot/util": 9.2.1 + "@substrate/ss58-registry": ^1.18.0 + checksum: 606d4deaa11cbffc755a7e53b911b72a0457312d0dec0c984364e68a1986fc614a4c02d8bf27ef5bb25077325e963f024d156dc47ef3068d82783b28ce0dc7b8 languageName: node linkType: hard -"@polkadot/rpc-augment@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/rpc-augment@npm:8.3.2" +"@polkadot/rpc-augment@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/rpc-augment@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/rpc-core": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/util": ^9.1.1 - checksum: 38ed73270cb6d54d388d2b09d60dae32ce277249c72370db81dd6a4017eb0f6b8b0512a90bee46a79f25941958e241a27a15175ef7081b2f436a4e396079fc3e + "@polkadot/rpc-core": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/util": ^9.2.1 + checksum: e9d1939073834276f053916b04f66107cdc177a1301fff6a4f4880ea01e8192b895a062220d77d413729b6dd95acd8cc117b03183093bc2bcc4ff44db27662d6 languageName: node linkType: hard -"@polkadot/rpc-core@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/rpc-core@npm:8.3.2" +"@polkadot/rpc-core@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/rpc-core@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/rpc-augment": 8.3.2 - "@polkadot/rpc-provider": 8.3.2 - "@polkadot/types": 8.3.2 - "@polkadot/util": ^9.1.1 + "@polkadot/rpc-augment": 8.4.2 + "@polkadot/rpc-provider": 8.4.2 + "@polkadot/types": 8.4.2 + "@polkadot/util": ^9.2.1 rxjs: ^7.5.5 - checksum: c64bcec4ffc123a6e8028ae20d00b85836d3b7d5eff9afd5ab1bfbc41c507b7a152ab62a496b846b2fdc27b666805918c9d1260c0f8271990cb0aba80c8f0788 + checksum: 97053177ffdb6bc7d826cd44e2c18ac8886cec1777f35f7572cdcb9ce8ec13e0022f2285391186d07f527bc44f5d4736d2e30e2e74dfa4fcfb59ddbfecbdb9f0 languageName: node linkType: hard -"@polkadot/rpc-provider@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/rpc-provider@npm:8.3.2" +"@polkadot/rpc-provider@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/rpc-provider@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/keyring": ^9.1.1 - "@polkadot/types": 8.3.2 - "@polkadot/types-support": 8.3.2 - "@polkadot/util": ^9.1.1 - "@polkadot/util-crypto": ^9.1.1 - "@polkadot/x-fetch": ^9.1.1 - "@polkadot/x-global": ^9.1.1 - "@polkadot/x-ws": ^9.1.1 + "@polkadot/keyring": ^9.2.1 + "@polkadot/types": 8.4.2 + "@polkadot/types-support": 8.4.2 + "@polkadot/util": ^9.2.1 + "@polkadot/util-crypto": ^9.2.1 + "@polkadot/x-fetch": ^9.2.1 + "@polkadot/x-global": ^9.2.1 + "@polkadot/x-ws": ^9.2.1 "@substrate/connect": 0.7.4 eventemitter3: ^4.0.7 mock-socket: ^9.1.3 nock: ^13.2.4 - checksum: 8050d244a3ec69a90a0c4d383a742f31e44fcaf38658c7723fe427a176d878c7fc3a11f6b68750cfd9dcc6ef482b837323ecf86c9b7589b2643cd35aa245b4ff + checksum: d65bc3f5e331b8b5cc4842580901c50c816bd8065987324d0e7d427f46f7ea4b5ea17f5a41ad162612effe0e9ea999f888434ad398248ed6e29cdbf53e137893 languageName: node linkType: hard -"@polkadot/types-augment@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types-augment@npm:8.3.2" +"@polkadot/types-augment@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types-augment@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/types": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/util": ^9.1.1 - checksum: 0331f67edcd2c07df16486351be2e7c39c490b9ff3b557195207073766b0cef5bd1378dc5370074947ce8682f5fc9931ab85afa51fb183bb9237cbe551735fac + "@polkadot/types": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/util": ^9.2.1 + checksum: 5f39f3e2fce8f7c520530ec5c6e5d3dad701d493a3681a6616a90b52b83fb5a945a15e3001f074c0683edf1e1d19e2ff94afa3ad392e0a55aa3181f310dcc3fc languageName: node linkType: hard -"@polkadot/types-codec@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types-codec@npm:8.3.2" +"@polkadot/types-codec@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types-codec@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/util": ^9.1.1 - checksum: c84760c0da9e3c0081f6f6f8d0026f821c4f0d8b696d9279a9f54d6a2ae8dc3ff788037109230b1521824f8c80f2de4f88f2261d6572f08f759f85201eec68ff + "@polkadot/util": ^9.2.1 + checksum: 2544994fb0c521c250ecfdb7e866358671538841e54710e0269eb7c0756b8ce1c4924c9680c2ca25863c5b25f6e6961e1079346540a6a4c88704e9477f8d336f languageName: node linkType: hard -"@polkadot/types-create@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types-create@npm:8.3.2" +"@polkadot/types-create@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types-create@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/types-codec": 8.3.2 - "@polkadot/util": ^9.1.1 - checksum: 6f9c60098a2e2da015d5026829a85a6f5a576b29aa49b53c9ca9934204c7fc4e12e28c6c37ddfc2f33e2493dde84bde5328f126130ef1a3dc67b0eb34e0dc020 + "@polkadot/types-codec": 8.4.2 + "@polkadot/util": ^9.2.1 + checksum: 6fec0d9bbb3865cb54772aaae544dacbcc757dad43e0dc18953dcf243db3f2604b4e252052cc73a4e4ddf74441c34029359000d35427b4e41cca4a2a77e28505 languageName: node linkType: hard -"@polkadot/types-known@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types-known@npm:8.3.2" +"@polkadot/types-known@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types-known@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/networks": ^9.1.1 - "@polkadot/types": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/types-create": 8.3.2 - "@polkadot/util": ^9.1.1 - checksum: 305c190608533244cea2e84206622fdb2d6f052e0357d11ac08ebb5eccd4b5c196facd854176dc1584f6bfcea8f72b506049ffad109e021c69123bbbd5c4f6ec + "@polkadot/networks": ^9.2.1 + "@polkadot/types": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/types-create": 8.4.2 + "@polkadot/util": ^9.2.1 + checksum: 8950f230dedb5e5d951c87e5d912920098cf19bf6e741f78d4d2b85f44b014c836069532f699c71fd76cd252f3d36a3983b57ed0ff193f46ff348c39089a74ad languageName: node linkType: hard -"@polkadot/types-support@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types-support@npm:8.3.2" +"@polkadot/types-support@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types-support@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/util": ^9.1.1 - checksum: c96f7aa4faf16117e4bb3079fc6357e198dfabe48ab74502ed51baf42d055367705e56ff2854500d1b46a2e6880c2873c21a58c0eb67ca975709ce9f2f90732d + "@polkadot/util": ^9.2.1 + checksum: 5decdb781d4eb162a46874b87bea184492023234e1ddbc5dc4988089348a117fa31d92f28c9a39f7dd3279dd94e238c996953dff77bd82e2f85f1582e3be5917 languageName: node linkType: hard -"@polkadot/types@npm:8.3.2": - version: 8.3.2 - resolution: "@polkadot/types@npm:8.3.2" +"@polkadot/types@npm:8.4.2": + version: 8.4.2 + resolution: "@polkadot/types@npm:8.4.2" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/keyring": ^9.1.1 - "@polkadot/types-augment": 8.3.2 - "@polkadot/types-codec": 8.3.2 - "@polkadot/types-create": 8.3.2 - "@polkadot/util": ^9.1.1 - "@polkadot/util-crypto": ^9.1.1 + "@polkadot/keyring": ^9.2.1 + "@polkadot/types-augment": 8.4.2 + "@polkadot/types-codec": 8.4.2 + "@polkadot/types-create": 8.4.2 + "@polkadot/util": ^9.2.1 + "@polkadot/util-crypto": ^9.2.1 rxjs: ^7.5.5 - checksum: fc20ded0e35273b0d0447ad839603a88ec741064c950dc1d9c703ceedb6ecb32ad74b9d82a2e54e0c3432a2816510b190e2a12da44cc74b72e5547be9cc61e84 + checksum: 1a8877c56fef9c2e62e3d47c7b72a16970b3614fd209952355ca8fe4db0c763b39361f8fb2cc9bc5d7b89be35a6d25fd69843e09d9b681cfcc85585826c656c9 languageName: node linkType: hard -"@polkadot/util-crypto@npm:9.1.1, @polkadot/util-crypto@npm:^9.1.1": - version: 9.1.1 - resolution: "@polkadot/util-crypto@npm:9.1.1" +"@polkadot/util-crypto@npm:9.2.1, @polkadot/util-crypto@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/util-crypto@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 "@noble/hashes": 1.0.0 "@noble/secp256k1": 1.5.5 - "@polkadot/networks": 9.1.1 - "@polkadot/util": 9.1.1 - "@polkadot/wasm-crypto": ^6.0.1 - "@polkadot/x-bigint": 9.1.1 - "@polkadot/x-randomvalues": 9.1.1 + "@polkadot/networks": 9.2.1 + "@polkadot/util": 9.2.1 + "@polkadot/wasm-crypto": ^6.1.1 + "@polkadot/x-bigint": 9.2.1 + "@polkadot/x-randomvalues": 9.2.1 "@scure/base": 1.0.0 ed2curve: ^0.3.0 tweetnacl: ^1.0.3 peerDependencies: - "@polkadot/util": 9.1.1 - checksum: 972257d0ff40d69b54fb55e52e842cc90ebe7039248e5881650314aeebdf1302fe93201c90615c2c0f03df58481b7c28521cf82d3decdcef993b1175cb068ec0 + "@polkadot/util": 9.2.1 + checksum: 606fadb8246c53823160bb83ccc6941d84b598f0ab14be8fe4764179cd725df5eb4eb8616ddcbb06a03ba7013d0c40758980547e2154d454a8f4069084ad1d7c + languageName: node + linkType: hard + +"@polkadot/util@npm:9.2.1, @polkadot/util@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/util@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/x-bigint": 9.2.1 + "@polkadot/x-global": 9.2.1 + "@polkadot/x-textdecoder": 9.2.1 + "@polkadot/x-textencoder": 9.2.1 + "@types/bn.js": ^5.1.0 + bn.js: ^5.2.0 + ip-regex: ^4.3.0 + checksum: 1a1f50e74ae5cd39e2e9e6a7c926370688653cb092cdc2ac1e573e1e09113f792d64af02c85d4bc056c1dcf955b3de9f0db0dcb2115c97e7511b4e2bef9daddd languageName: node linkType: hard -"@polkadot/util@npm:9.1.1, @polkadot/util@npm:^9, @polkadot/util@npm:^9.1.1": +"@polkadot/util@npm:^9": version: 9.1.1 resolution: "@polkadot/util@npm:9.1.1" dependencies: @@ -1385,39 +1441,79 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-crypto-asmjs@npm:^6.0.1": - version: 6.0.1 - resolution: "@polkadot/wasm-crypto-asmjs@npm:6.0.1" +"@polkadot/wasm-bridge@npm:6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-bridge@npm:6.1.1" dependencies: "@babel/runtime": ^7.17.9 peerDependencies: "@polkadot/util": "*" - checksum: 665cf6ae6468f76955b66f9a8645110de62b961d533c1c46b2dacd20981def099ca51da2fb9a50dd032ba948e7afcf7bdd80491516829ca6be3e7dae7457290e + "@polkadot/x-randomvalues": "*" + checksum: 2280101d71d497a5c86de4c43b3ace5ac24942e7672c12e254de231bed5cd90c30ed06c364ff36e8b96b2fff51a5a47e03918a54325d1dc68b94c2b8f26c3df9 languageName: node linkType: hard -"@polkadot/wasm-crypto-wasm@npm:^6.0.1": - version: 6.0.1 - resolution: "@polkadot/wasm-crypto-wasm@npm:6.0.1" +"@polkadot/wasm-crypto-asmjs@npm:6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-crypto-asmjs@npm:6.1.1" dependencies: "@babel/runtime": ^7.17.9 peerDependencies: "@polkadot/util": "*" - checksum: e13cb3a04e9f90d16f2e7299cdeb25d53347dd1c4080a6e8d40240416666a3e8af25eee7f5b823b3371133f9bdcfcb523c25543d063c46c47e50fac7910e6f0b + checksum: f33afe2325f230b32cfa9bd809a362d45d1690b210a6703eae3b74bcc1cd68f7d2a46a6fd458144481c57580ac12d6d8d2950e8fc353b77401898b14e9ba4aa5 languageName: node linkType: hard -"@polkadot/wasm-crypto@npm:^6.0.1": - version: 6.0.1 - resolution: "@polkadot/wasm-crypto@npm:6.0.1" +"@polkadot/wasm-crypto-init@npm:6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-crypto-init@npm:6.1.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/wasm-crypto-asmjs": ^6.0.1 - "@polkadot/wasm-crypto-wasm": ^6.0.1 + "@polkadot/wasm-bridge": 6.1.1 + "@polkadot/wasm-crypto-asmjs": 6.1.1 + "@polkadot/wasm-crypto-wasm": 6.1.1 peerDependencies: "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 71b8ce5c88c38ac8cc11e64c91dee94361b68f6e540afb8448c3bc4daac53d7ecb364fdc700b9ae1403c3291b959b4fdf2a3adc00b2a2adacf31bac1aeb0185b + checksum: 9e283bc6fa37c658bbac0598b9f86be5c1ae41b715188c5b1120b2fe10eb276f094dfbe0e515592d0a4c1aaef3694aa653a70d411214e49bedc8578ede8c1ec1 + languageName: node + linkType: hard + +"@polkadot/wasm-crypto-wasm@npm:6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-crypto-wasm@npm:6.1.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/wasm-util": 6.1.1 + peerDependencies: + "@polkadot/util": "*" + checksum: 53c46a60dc69b3f8a2a2897c9daf4b888f80abdb421fd4d5576b06673cf69b5598c2d9773620c1be7cff20fc7f4e310fd66eb8a235bdc0040a692bef2d761be5 + languageName: node + linkType: hard + +"@polkadot/wasm-crypto@npm:^6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-crypto@npm:6.1.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/wasm-bridge": 6.1.1 + "@polkadot/wasm-crypto-asmjs": 6.1.1 + "@polkadot/wasm-crypto-init": 6.1.1 + "@polkadot/wasm-crypto-wasm": 6.1.1 + "@polkadot/wasm-util": 6.1.1 + peerDependencies: + "@polkadot/util": "*" + checksum: 957754f2ada301941b17f1123ed25290b03ce2cf8dbcb1acdc764cf646cb5d373d93f58f352b2f62cfd84b2056c062215ad89fefbfb26377863419bfe16ed98e + languageName: node + linkType: hard + +"@polkadot/wasm-util@npm:6.1.1": + version: 6.1.1 + resolution: "@polkadot/wasm-util@npm:6.1.1" + dependencies: + "@babel/runtime": ^7.17.9 + peerDependencies: + "@polkadot/util": "*" + checksum: 7b8e61d149e6a7a3c56c396aad982ef0ef23f1b5e0bdfbd08f046bd7d7b9ee1c423e89cc58cf567b4a69c7f40e4f07642d0134b86123861e98bf2c6dd53e5ad3 languageName: node linkType: hard @@ -1431,19 +1527,29 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^9.1.1": - version: 9.1.1 - resolution: "@polkadot/x-fetch@npm:9.1.1" +"@polkadot/x-bigint@npm:9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-bigint@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/x-global": 9.1.1 + "@polkadot/x-global": 9.2.1 + checksum: a508c2c694a3869c90447095868c17af6eab2e0d592b0c7018e18d8812b324a6fb68f0a3d922423e389b71e0192c15488c6a215a7af5dca1c3b1814a1bbf8126 + languageName: node + linkType: hard + +"@polkadot/x-fetch@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-fetch@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/x-global": 9.2.1 "@types/node-fetch": ^2.6.1 node-fetch: ^2.6.7 - checksum: b432fb38584b565b20de1adb7a70f6c2968e13d6b92313b5ff6dedbcc000820b8c81e1665bd49867c7688dea8a36c7df0527ae3622b55a03da5d7517749ea3b6 + checksum: 553913ba543d909bf3ebb6d4277d7117c3a1735defe19b23e680a8aa3ffe7809cd46033019d02e16a1b6550a893d929322bd0992c6b24b60089a7ff5082447a9 languageName: node linkType: hard -"@polkadot/x-global@npm:9.1.1, @polkadot/x-global@npm:^9.1.1": +"@polkadot/x-global@npm:9.1.1": version: 9.1.1 resolution: "@polkadot/x-global@npm:9.1.1" dependencies: @@ -1452,13 +1558,22 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:9.1.1": - version: 9.1.1 - resolution: "@polkadot/x-randomvalues@npm:9.1.1" +"@polkadot/x-global@npm:9.2.1, @polkadot/x-global@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-global@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/x-global": 9.1.1 - checksum: 9510c71dd7581fd9b2efbb5289f0a56eecef5db84c3cbd3bd5962dfcf37d77bd2fd1a95ace7516f6e4487677074d28332c9a112878738fd22aa966fa61f362bf + checksum: 54c4cce0557276e2664ae4829be9ca346eccd069543d7a84c000974458c146f8eda9af8bc3849ada65e26f7fd70f49b23026d551f239056af6235ac13e2679b4 + languageName: node + linkType: hard + +"@polkadot/x-randomvalues@npm:9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-randomvalues@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/x-global": 9.2.1 + checksum: 91a633c4db068d420a6d6dd5f352042a68c589769705ad931e2c3919896cb55d4b15868f2601b1e8d6932a6c5d0c1958a46321659c6ccc9e9dc9ef7f1a48aae0 languageName: node linkType: hard @@ -1472,6 +1587,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-textdecoder@npm:9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-textdecoder@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/x-global": 9.2.1 + checksum: 8ae0748595f2311eaad53ac803a3deff7ccac61cd54118a7727958b2022b483451d5221c8d380ff260f01d732b2deab27e0100143d156cbd84addf1c1f4591a9 + languageName: node + linkType: hard + "@polkadot/x-textencoder@npm:9.1.1": version: 9.1.1 resolution: "@polkadot/x-textencoder@npm:9.1.1" @@ -1482,15 +1607,25 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-ws@npm:^9.1.1": - version: 9.1.1 - resolution: "@polkadot/x-ws@npm:9.1.1" +"@polkadot/x-textencoder@npm:9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-textencoder@npm:9.2.1" dependencies: "@babel/runtime": ^7.17.9 - "@polkadot/x-global": 9.1.1 + "@polkadot/x-global": 9.2.1 + checksum: 9f2690a4b4cb9c02a9626b24580556349d85650e54e04ed4a4a7fa75afa7a89a209e649851f2fffb38c31c3e62515fd17a190ebb84ae6872dd2a4b6f0d2ce279 + languageName: node + linkType: hard + +"@polkadot/x-ws@npm:^9.2.1": + version: 9.2.1 + resolution: "@polkadot/x-ws@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.17.9 + "@polkadot/x-global": 9.2.1 "@types/websocket": ^1.0.5 websocket: ^1.0.34 - checksum: a14d8abc62e6d5048df63b66ea59141f3e4695762b88e8ef3550c8abb1c0ca2b4fb47c31c1304af19eed3e068c3930fc354955a60fe79b91536f79a8721f1058 + checksum: 493e003088b29eb36797c60b68515cfa8edb54920271fd7de96d85db5c28e1d936f5316f9d2fbf1beb87d2d01b30b4497a880192146583b97d9066c0547fee22 languageName: node linkType: hard @@ -1734,10 +1869,10 @@ __metadata: languageName: node linkType: hard -"@substrate/ss58-registry@npm:^1.17.0": - version: 1.17.0 - resolution: "@substrate/ss58-registry@npm:1.17.0" - checksum: 48d1e28e143514ae93a0faf4406a59db9d2ccaff3f5db36d8174657fc2d12c66be786aeaa78c4f5ba52e741588dfa033faf7915882c467b78dc77eefb5ef8ee3 +"@substrate/ss58-registry@npm:^1.18.0": + version: 1.18.0 + resolution: "@substrate/ss58-registry@npm:1.18.0" + checksum: 0d7ed0a741f7574e9225727b50988726b0a04fb552f8899763681d23d0dfaaf01a7ccee477855540a38109fc792e8b8db39b5e79768e4877d90077494dc15795 languageName: node linkType: hard @@ -1954,10 +2089,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^17.0.33": - version: 17.0.33 - resolution: "@types/node@npm:17.0.33" - checksum: 6620652cc89ce125e1162e060ec4608c25b3635185e3e5dcaae4ed09e4770dc8bf168ba48bcd7059a1a56087a05000d7ed562e81aea7b6a512e2b13d4409c6b6 +"@types/node@npm:^17.0.35": + version: 17.0.35 + resolution: "@types/node@npm:17.0.35" + checksum: 7a24946ae7fd20267ed92466384f594e448bfb151081158d565cc635d406ecb29ea8fb85fcd2a1f71efccf26fb5bd3c6f509bde56077eb8b832b847a6664bc62 languageName: node linkType: hard @@ -2026,18 +2161,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.23.0" +"@typescript-eslint/eslint-plugin@npm:^5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.25.0" dependencies: - "@typescript-eslint/scope-manager": 5.23.0 - "@typescript-eslint/type-utils": 5.23.0 - "@typescript-eslint/utils": 5.23.0 - debug: ^4.3.2 + "@typescript-eslint/scope-manager": 5.25.0 + "@typescript-eslint/type-utils": 5.25.0 + "@typescript-eslint/utils": 5.25.0 + debug: ^4.3.4 functional-red-black-tree: ^1.0.1 - ignore: ^5.1.8 + ignore: ^5.2.0 regexpp: ^3.2.0 - semver: ^7.3.5 + semver: ^7.3.7 tsutils: ^3.21.0 peerDependencies: "@typescript-eslint/parser": ^5.0.0 @@ -2045,101 +2180,101 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 19ee37c0be172469968f61d156d6ce36a975ab72ccbb8f702eb4573c94d1cf9247ff32352ed85eda5e7b2eaace567d5c66b32846f042f9711349213496ec37d4 + checksum: 7a47dc9b95031ab9e8d94a062b95c124486d471fa385335ef0129eff0854043b1894233fe28a2832cbf1c2be235242cf1eba087f4da1f4262599f18147ee1edd languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/parser@npm:5.23.0" +"@typescript-eslint/parser@npm:^5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/parser@npm:5.25.0" dependencies: - "@typescript-eslint/scope-manager": 5.23.0 - "@typescript-eslint/types": 5.23.0 - "@typescript-eslint/typescript-estree": 5.23.0 - debug: ^4.3.2 + "@typescript-eslint/scope-manager": 5.25.0 + "@typescript-eslint/types": 5.25.0 + "@typescript-eslint/typescript-estree": 5.25.0 + debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: b65a732b0be06ac9e4b13df78c466517e33fd382985c5d85b6d51cfa295cdf3351594cc2f95dda41d57abb6115e3b8df815fbbb7793aa0c4eddbac11077b90a8 + checksum: 9bd53d6f5f5e7b64282760a4f68411f6f6e272754aa8b4c54951bd03c18981183277dfefff1207c3d549d25d34dbe162472f7fa102ec5306113a7811f263fc00 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/scope-manager@npm:5.23.0" +"@typescript-eslint/scope-manager@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/scope-manager@npm:5.25.0" dependencies: - "@typescript-eslint/types": 5.23.0 - "@typescript-eslint/visitor-keys": 5.23.0 - checksum: cd3dda0b18d6730e34784fc63135fc9fe31673898d3e0868cd765ad78855351f285fe577297193cf179b3ce918c3d44453de85159a925f5c02d12a5626e787d8 + "@typescript-eslint/types": 5.25.0 + "@typescript-eslint/visitor-keys": 5.25.0 + checksum: 0616bad66bd3fe885df3401bbc3ab6631dca3b70ca3d2e8a9881d9a27654e3df9fd219abc9b7e1c23668c113d54bbb049c6231af3a2d86abcd919329b1cb4ff4 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/type-utils@npm:5.23.0" +"@typescript-eslint/type-utils@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/type-utils@npm:5.25.0" dependencies: - "@typescript-eslint/utils": 5.23.0 - debug: ^4.3.2 + "@typescript-eslint/utils": 5.25.0 + debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: eslint: "*" peerDependenciesMeta: typescript: optional: true - checksum: 88bf7c7a08c11f2a02a05fe331750c569bfc2b4759e0dea6ec72ffd1597624a01100965052a5fede1e3f25ea8ef503bd424e03c9805f0a1af223f28b4fd74946 + checksum: f733b42437e7a023985ad9324e57171c8b358f54a0c5a3be3b7bc7f317f1eeee4a60d14a1873efd820a3f9011c395f5e3a75eac4eaac520948aeba4d3e4e4953 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/types@npm:5.23.0" - checksum: 96ae3e80cfae7b34f2846db692c31fb1804bf9651bce1d29f2eb8ae4c763d22f3283adc02dedeebd7cf70e4d8be54ec7f6ca593e03cdca26c791207e7556c2c1 +"@typescript-eslint/types@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/types@npm:5.25.0" + checksum: 0fa7eba1e35bbc32d865ce38cc5800aedf2b1d8aa17e8a20ff1cf05b59a92a684c0727f7ac2a26ecdf17483957bea163fe03fc1556503f23e0d974a8d9c33b82 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.23.0" +"@typescript-eslint/typescript-estree@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.25.0" dependencies: - "@typescript-eslint/types": 5.23.0 - "@typescript-eslint/visitor-keys": 5.23.0 - debug: ^4.3.2 - globby: ^11.0.4 + "@typescript-eslint/types": 5.25.0 + "@typescript-eslint/visitor-keys": 5.25.0 + debug: ^4.3.4 + globby: ^11.1.0 is-glob: ^4.0.3 - semver: ^7.3.5 + semver: ^7.3.7 tsutils: ^3.21.0 peerDependenciesMeta: typescript: optional: true - checksum: 8d85bb1cd777e93cc7322ae8fea25f9b924def02494cdb8395c1d5d17b5fd3ac9bc969418a1d20a5dc28c2cdd85da20e13527e28b595c06ff6f84cd22a78d73f + checksum: 72638b1a9826a3062f629e23d3c9147646dc2740add1aa8bb2e63131215eed3309bc86647f7e52acecf3c169e94677d869690a050de37b7cd880ea89c63bde2a languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/utils@npm:5.23.0" +"@typescript-eslint/utils@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/utils@npm:5.25.0" dependencies: "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.23.0 - "@typescript-eslint/types": 5.23.0 - "@typescript-eslint/typescript-estree": 5.23.0 + "@typescript-eslint/scope-manager": 5.25.0 + "@typescript-eslint/types": 5.25.0 + "@typescript-eslint/typescript-estree": 5.25.0 eslint-scope: ^5.1.1 eslint-utils: ^3.0.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 72207399f29856b601148fe1aff07049021fad8e780ee6e896279d2291806d4608f1c28ddc5c3c5616ce94f25dcbcd26f295669e524fc1c4b4db810569c90f85 + checksum: 744ab15cf003882db2f63b4cef1b788d5f3ab0f4b2f2fb0c1eee942cf899df9c66a34e2f6f614f1c562257041119ec03c12446f4ae72147b5f7cc0a2e5276ea6 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.23.0": - version: 5.23.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.23.0" +"@typescript-eslint/visitor-keys@npm:5.25.0": + version: 5.25.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.25.0" dependencies: - "@typescript-eslint/types": 5.23.0 - eslint-visitor-keys: ^3.0.0 - checksum: 322e10d52a985e8a90d3612bb9d09a87dc64fc4cb1248484f1a9a7a98f65d3ef65a465ce868773a4939e35fa3b726ad609dac5a168efd7eaca4b06df33e965e3 + "@typescript-eslint/types": 5.25.0 + eslint-visitor-keys: ^3.3.0 + checksum: ec4d0558cf53305703c18dfd7e1cd53fc0736303a51d93a875227896a230fd049951cc0600c539719cc351d2c96cb4abc6aa9dd9b3a8401f27bb8033093f35b7 languageName: node linkType: hard @@ -3544,6 +3679,20 @@ __metadata: languageName: node linkType: hard +"cosmiconfig-typescript-loader@npm:^2.0.0": + version: 2.0.0 + resolution: "cosmiconfig-typescript-loader@npm:2.0.0" + dependencies: + cosmiconfig: ^7 + ts-node: ^10.7.0 + peerDependencies: + "@types/node": "*" + cosmiconfig: ">=7" + typescript: ">=3" + checksum: a32db823436b722734957f413036126740ccfee32c466fc21067d7dd1f7160ea1a2e76bd675e8e6b7e8f9fb6f516b35103aae1ff4ec41525476ca1a0f4d75585 + languageName: node + linkType: hard + "cosmiconfig@npm:^7, cosmiconfig@npm:^7.0.0": version: 7.0.1 resolution: "cosmiconfig@npm:7.0.1" @@ -3676,6 +3825,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + "debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" @@ -4099,18 +4260,18 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.0.0, eslint-visitor-keys@npm:^3.3.0": +"eslint-visitor-keys@npm:^3.3.0": version: 3.3.0 resolution: "eslint-visitor-keys@npm:3.3.0" checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 languageName: node linkType: hard -"eslint@npm:^8.15.0": - version: 8.15.0 - resolution: "eslint@npm:8.15.0" +"eslint@npm:^8.16.0": + version: 8.16.0 + resolution: "eslint@npm:8.16.0" dependencies: - "@eslint/eslintrc": ^1.2.3 + "@eslint/eslintrc": ^1.3.0 "@humanwhocodes/config-array": ^0.9.2 ajv: ^6.10.0 chalk: ^4.0.0 @@ -4128,7 +4289,7 @@ __metadata: file-entry-cache: ^6.0.1 functional-red-black-tree: ^1.0.1 glob-parent: ^6.0.1 - globals: ^13.6.0 + globals: ^13.15.0 ignore: ^5.2.0 import-fresh: ^3.0.0 imurmurhash: ^0.1.4 @@ -4147,7 +4308,7 @@ __metadata: v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: d8896393832e154e1381a21041cfe4d12a73a76fac26ea27cabbc0e5fdac87918ad651f07f804ef6faacd3868572de3c1ec5d96edf5502bc999eff0c423638f7 + checksum: 654a0200b49dc07280673fee13cdfb04326466790e031dfa9660b69fba3b1cf766a51504328f9de56bd18e6b5eb7578985cf29dc7f016c5ec851220ff9db95eb languageName: node linkType: hard @@ -4886,12 +5047,12 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.6.0, globals@npm:^13.9.0": - version: 13.13.0 - resolution: "globals@npm:13.13.0" +"globals@npm:^13.15.0": + version: 13.15.0 + resolution: "globals@npm:13.15.0" dependencies: type-fest: ^0.20.2 - checksum: c55ea8fd3afecb72567bac41605577e19e68476993dfb0ca4c49b86075af5f0ae3f0f5502525f69010f7c5ea5db6a1c540a80a4f80ebdfb2f686d87b0f05d7e9 + checksum: 383ade0873b2ab29ce6d143466c203ed960491575bc97406395e5c8434026fb02472ab2dfff5bc16689b8460269b18fda1047975295cd0183904385c51258bae languageName: node linkType: hard @@ -4911,7 +5072,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.1, globby@npm:^11.0.3, globby@npm:^11.0.4, globby@npm:^11.1.0": +"globby@npm:^11.0.1, globby@npm:^11.0.3, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -5161,7 +5322,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0": +"ignore@npm:^5.1.1, ignore@npm:^5.2.0": version: 5.2.0 resolution: "ignore@npm:5.2.0" checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77 @@ -6342,19 +6503,19 @@ __metadata: version: 0.0.0-use.local resolution: "metadot-multisig@workspace:." dependencies: - "@commitlint/cli": ^16.2.4 - "@commitlint/config-conventional": ^16.2.4 - "@polkadot/api": ^8.3.2 + "@commitlint/cli": ^17.0.0 + "@commitlint/config-conventional": ^17.0.0 + "@polkadot/api": ^8.4.2 "@subql/cli": 1.0.0 "@subql/types": 1.0.0 "@trivago/prettier-plugin-sort-imports": ^3.2.0 - "@types/node": ^17.0.33 - "@typescript-eslint/eslint-plugin": ^5.23.0 - "@typescript-eslint/parser": ^5.23.0 + "@types/node": ^17.0.35 + "@typescript-eslint/eslint-plugin": ^5.25.0 + "@typescript-eslint/parser": ^5.25.0 commander: ^6.1.0 commitizen: ^4.2.4 cz-conventional-changelog: ^3.3.0 - eslint: ^8.15.0 + eslint: ^8.16.0 eslint-config-prettier: ^8.5.0 husky: ^8.0.1 lint-staged: ^12.4.1 @@ -6364,7 +6525,7 @@ __metadata: ts-generator: ^0.1.1 ts-node: ^10.7.0 typescript: ^4.6.4 - yaml: ^2.0.1 + yaml: ^2.1.0 languageName: unknown linkType: soft @@ -9640,10 +9801,10 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.1": - version: 2.0.1 - resolution: "yaml@npm:2.0.1" - checksum: 23f95ff0d646c894048ac5072b5b6d393a398af1b2553916f0de276d62dbb3279ae3c969d7fcefe7a213be4efc9b4aa3ae1439c97095d3d3765fc6bc424807ac +"yaml@npm:^2.1.0": + version: 2.1.0 + resolution: "yaml@npm:2.1.0" + checksum: 59323a8b51b10d9ad0eab951e7a1f315f1076c123b08ffe60441add1df4fa3433b1d5783b21c50a65536e9d853b23fa567921dbd4bc0d711be2dbf14a06be03b languageName: node linkType: hard From 0091c929b6f8613985d268288425efe45c8f5d11 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 15:07:28 +0500 Subject: [PATCH 15/21] chore: update polkadot block number --- src/scripts/chain-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/chain-config.ts b/src/scripts/chain-config.ts index 2b22b7b..ced5f0a 100644 --- a/src/scripts/chain-config.ts +++ b/src/scripts/chain-config.ts @@ -44,7 +44,7 @@ const chainConfig = { dictionary: "https://api.subquery.network/sq/AcalaNetwork/karura-dictionary", }, [SupportedChains.POLKADOT]: { - startBlock: 10086261, + startBlock: 10399000, chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3", endpoint: "wss://polkadot.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/polkadot-dictionary", From 599b4fe0fd601df64acfcad0bf786bd1e7703629 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 21 May 2022 15:24:07 +0500 Subject: [PATCH 16/21] fix: remove logger and add yarn build in ci --- .github/workflows/create_branches.yml | 3 +++ src/handlers/multisig.ts | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 76e5de1..944c4a2 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -45,6 +45,9 @@ jobs: - name: Print project.yaml run: cat ./project.yaml + - name: Build project + run: yarn codegen && yarn build + - name: Delete branch uses: dawidd6/action-delete-branch@v3 with: diff --git a/src/handlers/multisig.ts b/src/handlers/multisig.ts index 1dde9f0..fe2878a 100644 --- a/src/handlers/multisig.ts +++ b/src/handlers/multisig.ts @@ -145,8 +145,6 @@ export async function executedMultisigHandler(event: SubstrateEvent): Promise>> " + transfer?.amount); - logger.info("transfer status >>> " + transfer?.status); // return if transfer not present in multisig if (!transferPresent) return; From 4e1ecbd0f61ebce85299ecfdb46c11e19c7a955e Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 28 May 2022 19:02:44 +0500 Subject: [PATCH 17/21] fix: add chaintypes --- base-project.yaml | 2 + chaintypes.json | 121 ++ package.json | 1 + src/scripts/chain-config.ts | 19 + src/scripts/patch-chain.ts | 9 + src/scripts/type-definitions.ts | 3300 +++++++++++++++++++++++++++++++ yarn.lock | 19 + 7 files changed, 3471 insertions(+) create mode 100644 chaintypes.json create mode 100644 src/scripts/type-definitions.ts diff --git a/base-project.yaml b/base-project.yaml index 51080ea..7d33e20 100644 --- a/base-project.yaml +++ b/base-project.yaml @@ -17,6 +17,8 @@ network: chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3" endpoint: wss://rpc.polkadot.io dictionary: https://api.subquery.network/sq/subquery/dictionary-polkadot + chaintypes: + file: ./chaintypes.json dataSources: - kind: substrate/Runtime startBlock: 780104 # Polkadot diff --git a/chaintypes.json b/chaintypes.json new file mode 100644 index 0000000..c82ad11 --- /dev/null +++ b/chaintypes.json @@ -0,0 +1,121 @@ +{ + "typesBundle": { + "spec": { + "contextfree": { + "types": [ + { + "minmax": [0, null], + "types": { + "ResourceId": "[u8; 32]", + "DepositNonce": "u64", + "ProposalStatus": { + "_enum": ["Initiated", "Approved", "Rejected"] + }, + "ProposalVotes": { + "votes_for": "Vec", + "votes_against": "Vec", + "status": "ProposalStatus" + }, + "BridgeTokenId": "U256", + "BridgeChainId": "u8", + "VestingPlan": { + "start_time": "u64", + "cliff_duration": "u64", + "total_duration": "u64", + "interval": "u64", + "initial_amount": "Balance", + "total_amount": "Balance", + "vesting_during_cliff": "bool" + }, + "ProposalId": "u32", + "ProjectId": "u32", + "ChainIndex": "u32", + "Protocol": { + "_enum": ["Solidity", "Substrate"] + }, + "Chain": { + "_protocol": "Protocol" + }, + "CrossChainAccount": { + "_enum": { + "Solidity": "H160", + "Substrate": "AccountId" + } + }, + "IpfsHash": "Text", + "SolidityStrategy": { + "_enum": { + "ERC20Balance": "H160" + } + }, + "SubstrateStrategy": { + "_enum": ["NativeBalance"] + }, + "Strategy": { + "_enum": { + "Solidity": "SolidityStrategy", + "Substrate": "SubstrateStrategy" + } + }, + "Workspace": { + "_chain": "ChainIndex", + "strategies": "Vec" + }, + "UserGroup": { + "owner": "CrossChainAccount", + "admins": "Vec", + "maintainers": "Vec", + "proposers": "Option>" + }, + "Project": { + "usergroup": "UserGroup", + "data": "IpfsHash", + "workspaces": "Vec" + }, + "VotingFormat": { + "_enum": ["SingleChoice", "SplitVote"] + }, + "OptionIndex": "u8", + "PrivacyLevel": { + "_enum": { + "Opaque": "u8", + "Rank": "Null", + "Private": "Null", + "Public": "Null", + "Mixed": "Null" + } + }, + "VotingPower": "U256", + "DAOProposalState": { + "finalized": "bool", + "snapshots": "Vec>", + "blacklisted": "bool", + "votes": "Vec", + "pub_voters": "Option", + "updates": "u32" + }, + "DAOProposal": { + "_author": "CrossChainAccount", + "_voting_format": "VotingFormat", + "_option_count": "OptionIndex", + "_data": "IpfsHash", + "_privacy": "PrivacyLevel", + "_start": "u64", + "_end": "u64", + "_frequency": "Option", + "_workspaces": "Vec", + "state": "DAOProposalState" + }, + "VoteUpdate": { + "project": "ProjectId", + "proposal": "ProposalId", + "votes": "Vec", + "pub_voters": "Option" + } + } + } + ] + } + } + } +} diff --git a/package.json b/package.json index f3c21e7..b227d80 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "url": "https://github.com/ahmedali8" }, "devDependencies": { + "@acala-network/type-definitions": "^4.1.3", "@commitlint/cli": "^17.0.0", "@commitlint/config-conventional": "^17.0.0", "@polkadot/api": "^8.4.2", diff --git a/src/scripts/chain-config.ts b/src/scripts/chain-config.ts index ced5f0a..bf51096 100644 --- a/src/scripts/chain-config.ts +++ b/src/scripts/chain-config.ts @@ -1,4 +1,12 @@ import { SupportedChains } from "../constants/chains"; +import { + acala_type_definition, + astar_type_definitions, + bifrost_types_definitions, + contextfree_type_definitions, + karura_type_defition, + shiden_type_definitions, +} from "./type-definitions"; const chainConfig = { [SupportedChains.ACALA]: { @@ -6,66 +14,77 @@ const chainConfig = { chainId: "0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c", endpoint: "wss://acala-polkadot.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/acala-dictionary", + chaintypes: { typesBundle: acala_type_definition }, }, [SupportedChains.ASTAR]: { startBlock: 924132, chainId: "0x9eb76c5184c4ab8679d2d5d819fdf90b9c001403e9e17da2e14b6d8aec4029c6", endpoint: "wss://astar.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/astar-dictionary", + chaintypes: { typesBundle: astar_type_definitions }, }, [SupportedChains.BIFROST_MAINNET]: { startBlock: 1654897, chainId: "0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed", endpoint: "wss://bifrost-rpc.liebi.com/ws", dictionary: "", + chaintypes: bifrost_types_definitions, }, [SupportedChains.BIFROST_TESTNET]: { startBlock: 180859, chainId: "0x8b290fa39a8808f29d7309ea99442c95bf964838aef14be5a6449ae48f8a5f1f", endpoint: "wss://bifrost-rpc.testnet.liebi.com/ws", dictionary: "https://api.subquery.network/sq/subquery/bifrost-parachain-dictionary", + chaintypes: bifrost_types_definitions, }, [SupportedChains.CONTEXTFREE]: { startBlock: 2929900, chainId: "0x6254c948b5eb7199a112cb308be3385c39c8c942625540ac749c77fe2aebc299", endpoint: "wss://contextfree.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/contextfree-dictionary", + chaintypes: { typesBundle: { spec: { contextfree: contextfree_type_definitions } } }, }, [SupportedChains.KUSAMA]: { startBlock: 12464962, chainId: "0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe", endpoint: "wss://kusama.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/kusama-dictionary", + chaintypes: null, }, [SupportedChains.KARURA]: { startBlock: 1820021, chainId: "0xbaf5aabe40646d11f0ee8abbdc64f4a4b7674925cba08e4a05ff9ebed6e2126b", endpoint: "wss://karura.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/AcalaNetwork/karura-dictionary", + chaintypes: { typesBundle: karura_type_defition }, }, [SupportedChains.POLKADOT]: { startBlock: 10399000, chainId: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3", endpoint: "wss://polkadot.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/polkadot-dictionary", + chaintypes: null, }, [SupportedChains.SHIBUYA]: { startBlock: 1347428, chainId: "0xddb89973361a170839f80f152d2e9e38a376a5a7eccefcade763f46a8e567019", endpoint: "wss://rpc.shibuya.astar.network", dictionary: "", + chaintypes: null, }, [SupportedChains.SHIDEN]: { startBlock: 1500245, chainId: "0xf1cf9022c7ebb34b162d5b5e34e705a5a740b2d0ecc1009fb89023e62a488108", endpoint: "wss://shiden.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/shiden-dictionary", + chaintypes: { typesBundle: { spec: { shiden: shiden_type_definitions } } }, }, [SupportedChains.WESTEND]: { startBlock: 10622832, chainId: "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e", endpoint: "wss://westend.api.onfinality.io/public-ws", dictionary: "https://api.subquery.network/sq/subquery/westend-dictionary", + chaintypes: null, }, }; diff --git a/src/scripts/patch-chain.ts b/src/scripts/patch-chain.ts index 55ddeaa..68b9732 100644 --- a/src/scripts/patch-chain.ts +++ b/src/scripts/patch-chain.ts @@ -53,6 +53,7 @@ function patchManifest(manifest) { const chainId = commandlineInput.chainId ? commandlineInput.chainId : obj.chainId; const endpoint = commandlineInput.endpoint ? commandlineInput.endpoint : obj.endpoint; const dictionary = commandlineInput.dictionary ? commandlineInput.dictionary : obj.dictionary; + const chaintypes = obj.chaintypes; // delete chaintypes.json if (fs.existsSync(CHAINTYPES_PATH)) { @@ -72,6 +73,14 @@ function patchManifest(manifest) { _manifest["network"].dictionary = dictionary; } + // create chaintypes file if chaintypes exist + if (chaintypes) { + fs.writeFileSync(path.resolve(CHAINTYPES_PATH), JSON.stringify(chaintypes, null, 2), { + encoding: "utf-8", + }); + _manifest["network"].chaintypes = { file: "./chaintypes.json" }; + } + return _manifest; } diff --git a/src/scripts/type-definitions.ts b/src/scripts/type-definitions.ts new file mode 100644 index 0000000..5f4c9d4 --- /dev/null +++ b/src/scripts/type-definitions.ts @@ -0,0 +1,3300 @@ +import { typesBundleForPolkadot } from "@acala-network/type-definitions"; + +export const astar_type_definitions = { + types: [ + { + // on all versions + minmax: [0, undefined], + types: { + Keys: "AccountId", + Address: "MultiAddress", + LookupSource: "MultiAddress", + AmountOf: "Amount", + Amount: "i128", + SmartContract: { + _enum: { + Evm: "H160", + Wasm: "AccountId", + }, + }, + EraStakingPoints: { + total: "Balance", + stakers: "BTreeMap", + formerStakedEra: "EraIndex", + claimedRewards: "Balance", + }, + EraRewardAndStake: { + rewards: "Balance", + staked: "Balance", + }, + EraIndex: "u32", + }, + }, + ], +}; +export const contextfree_type_definitions = { + types: [ + { + // on all versions + minmax: [0, undefined], + types: { + ResourceId: "[u8; 32]", + DepositNonce: "u64", + ProposalStatus: { + _enum: ["Initiated", "Approved", "Rejected"], + }, + ProposalVotes: { + votes_for: "Vec", + votes_against: "Vec", + status: "ProposalStatus", + }, + BridgeTokenId: "U256", + BridgeChainId: "u8", + VestingPlan: { + start_time: "u64", + cliff_duration: "u64", + total_duration: "u64", + interval: "u64", + initial_amount: "Balance", + total_amount: "Balance", + vesting_during_cliff: "bool", + }, + ProposalId: "u32", + ProjectId: "u32", + ChainIndex: "u32", + Protocol: { + _enum: ["Solidity", "Substrate"], + }, + Chain: { + _protocol: "Protocol", + }, + CrossChainAccount: { + _enum: { + Solidity: "H160", + Substrate: "AccountId", + }, + }, + IpfsHash: "Text", + SolidityStrategy: { + _enum: { + ERC20Balance: "H160", + }, + }, + SubstrateStrategy: { + _enum: ["NativeBalance"], + }, + Strategy: { + _enum: { + Solidity: "SolidityStrategy", + Substrate: "SubstrateStrategy", + }, + }, + Workspace: { + _chain: "ChainIndex", + strategies: "Vec", + }, + UserGroup: { + owner: "CrossChainAccount", + admins: "Vec", + maintainers: "Vec", + proposers: "Option>", + }, + Project: { + usergroup: "UserGroup", + data: "IpfsHash", + workspaces: "Vec", + }, + VotingFormat: { + _enum: ["SingleChoice", "SplitVote"], + }, + OptionIndex: "u8", + PrivacyLevel: { + _enum: { + Opaque: "u8", + Rank: "Null", + Private: "Null", + Public: "Null", + Mixed: "Null", + }, + }, + VotingPower: "U256", + DAOProposalState: { + finalized: "bool", + snapshots: "Vec>", + blacklisted: "bool", + votes: "Vec", + pub_voters: "Option", + updates: "u32", + }, + DAOProposal: { + _author: "CrossChainAccount", + _voting_format: "VotingFormat", + _option_count: "OptionIndex", + _data: "IpfsHash", + _privacy: "PrivacyLevel", + _start: "u64", + _end: "u64", + _frequency: "Option", + _workspaces: "Vec", + state: "DAOProposalState", + }, + VoteUpdate: { + project: "ProjectId", + proposal: "ProposalId", + votes: "Vec", + pub_voters: "Option", + }, + }, + }, + ], +}; +export const shiden_type_definitions = { + types: [ + { + // on all versions + minmax: [0, undefined], + types: { + Keys: "AccountId", + Address: "MultiAddress", + LookupSource: "MultiAddress", + AmountOf: "Amount", + Amount: "i128", + SmartContract: { + _enum: { + Evm: "H160", + Wasm: "AccountId", + }, + }, + EraStakingPoints: { + total: "Balance", + stakers: "BTreeMap", + formerStakedEra: "EraIndex", + claimedRewards: "Balance", + }, + PalletDappsStakingEraStakingPoints: { + total: "Balance", + stakers: "BTreeMap", + formerStakedEra: "EraIndex", + claimedRewards: "Balance", + }, + EraRewardAndStake: { + rewards: "Balance", + staked: "Balance", + }, + PalletDappsStakingEraRewardAndStake: { + rewards: "Balance", + staked: "Balance", + }, + EraIndex: "u32", + }, + }, + ], +}; +export const bifrost_types_definitions = { + types: { + CallOf: "Call", + DispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { + delay: "BlockNumber", + origin: "PalletsOrigin", + }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue", + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { + value: "OracleValue", + timestamp: "Moment", + }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance", + }, + OrmlBalanceLock: { + amount: "Balance", + id: "LockIdentifier", + }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option", + }, + DelayedDispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact", + }, + VestingScheduleOf: "OrmlVestingSchedule", + PoolInfo: { + pool_id: "PoolId", + keeper: "AccountId", + investor: "Option", + trading_pair: "(CurrencyId, CurrencyId)", + duration: "BlockNumber", + type: "PoolType", + min_deposit_to_start: "Balance", + after_block_to_start: "BlockNumber", + deposit: "Balance", + rewards: "BTreeMap", + update_b: "BlockNumber", + state: "PoolState", + block_startup: "Option", + block_retired: "Option", + }, + Share: "u128", + OracleValue: "Price", + BiddingOrderId: "u64", + EraId: "u32", + BiddingOrderUnit: { + bidder_id: "AccountId", + token_id: "AssetId", + block_num: "BlockNumber", + votes: "Balance", + annual_roi: "Permill", + validator: "AccountId", + }, + BiddingOrderUnitOf: "BiddingOrderUnit", + VersionId: "u32", + PermissionName: "u64", + PermissionLevel: { + actor: "AccountName", + permission: "PermissionName", + }, + Action: { + account: "AccountName", + name: "ActionName", + authorization: "Vec", + data: "Vec", + }, + AccountName: "u64", + Checksum256: "([u8;32])", + ActionName: "u64", + FlatMap: { + map: "Vec<(ActionName, u64)>", + }, + UnsignedInt: "u32", + ActionReceipt: { + receiver: "AccountName", + act_digest: "Checksum256", + global_sequence: "u64", + recv_sequence: "u64", + auth_sequence: "FlatMap", + code_sequence: "UnsignedInt", + abi_sequence: "UnsignedInt", + }, + BlockchainType: { + _enum: ["BIFROST", "EOS", "IOST"], + }, + Precision: "u32", + BridgeAssetSymbol: { + blockchain: "BlockchainType", + symbol: "Vec", + precision: "Precision", + }, + PublicKey: { + type_: "UnsignedInt", + data: "[u8;33]", + }, + ProducerKey: { + producer_name: "AccountName", + block_signing_key: "PublicKey", + }, + ProducerSchedule: { + version: "u32", + producers: "Vec", + }, + bridgeEosSignature: { + type_: "UnsignedInt", + data: "[u8;65]", + }, + BlockTimestamp: "(u32)", + Extension: "(u16, Vec)", + BlockHeader: { + timestamp: "BlockTimestamp", + producer: "AccountName", + confirmed: "u16", + previous: "Checksum256", + transaction_mroot: "Checksum256", + action_mroot: "Checksum256", + schedule_version: "u32", + new_producers: "Option", + header_extensions: "Vec", + }, + SignedBlockHeader: { + block_header: "BlockHeader", + producer_signature: "bridgeEosSignature", + }, + Checksum256Array: "Vec", + IncrementalMerkle: { + _node_count: "u64", + _active_nodes: "Checksum256Array", + }, + TxSig: { + signature: "Vec", + author: "AccountId", + }, + MultiSig: { + signatures: "Vec", + threshold: "u8", + }, + MultiSigTx: { + chain_id: "Vec", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "Action", + from: "AccountId", + asset_id: "AssetId", + }, + Sent: { + tx_id: "Vec", + from: "AccountId", + asset_id: "AssetId", + }, + Succeeded: { + tx_id: "Vec", + }, + Failed: { + tx_id: "Vec", + reason: "Vec", + }, + TxOut: { + _enum: { + Initialized: "MultiSigTx", + Created: "MultiSigTx", + SignComplete: "MultiSigTx", + Sent: "Sent", + Succeeded: "Succeeded", + Failed: "Failed", + }, + }, + TransactionStatus: { + _enum: ["Initialized", "Created", "SignComplete", "Sent", "Succeeded", "Failed"], + }, + ProducerAuthoritySchedule: { + version: "u32", + producers: "Vec", + }, + ProducerAuthority: { + producer_name: "ActionName", + authority: "BlockSigningAuthority", + }, + BlockSigningAuthority: "(UnsignedInt, BlockSigningAuthorityV0)", + BlockSigningAuthorityV0: { + threshold: "u32", + keyWeights: "Vec", + }, + KeyWeight: { + key: "PublicKey", + weight: "u16", + }, + BancorPool: { + currency_id: "CurrencyId", + token_pool: "Balance", + vstoken_pool: "Balance", + token_ceiling: "Balance", + token_base_supply: "Balance", + vstoken_base_supply: "Balance", + }, + IostAction: { + contract: "Vec", + action_name: "Vec", + data: "Vec", + }, + IostMultiSigTx: { + chain_id: "i32", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "IostAction", + from: "AccountId", + asset_id: "AssetId", + }, + Processing: { + tx_id: "Vec", + multi_sig_tx: "IostMultiSigTx", + }, + IostTxOut: { + _enum: { + Initial: "IostMultiSigTx", + Generated: "IostMultiSigTx", + Signed: "IostMultiSigTx", + Processing: "Processing", + Success: "Vec", + Fail: "Failed", + }, + }, + PalletBalanceOf: "Balance", + NumberOrHex: { + _enum: { + Number: "u64", + Hex: "U256", + }, + }, + ExtraFeeName: { + _enum: ["SalpContribute", "NoExtraFee"], + }, + IsExtended: "bool", + SystemPalletId: "PalletId", + TrieIndex: "u32", + FundInfo: { + raised: "Balance", + cap: "Balance", + first_slot: "LeasePeriod", + last_slot: "LeasePeriod", + trie_index: "TrieIndex", + status: "FundStatus", + }, + RedeemStatus: "BalanceOf", + FundStatus: { + _enum: { + Ongoing: 0, + Retired: 1, + Success: 2, + Failed: 3, + RefundWithdrew: 4, + RedeemWithdrew: 5, + End: 6, + }, + }, + ContributionStatus: { + _enum: ["Idle", "Refunded", "Unlocked", "Refunding", "Contributing"], + }, + CrowdloanContributeCall: { + _enum: { + CrowdloanContribute: "ContributeCall", + }, + }, + ContributeCall: { + _enum: { + Contribute: "Contribution", + }, + }, + Contribution: { + index: "ParaId", + value: "BalanceOf", + signature: "Option", + }, + Withdraw: { + who: "AccountIdOf", + index: "ParaId", + }, + WithdrawCall: { + _enum: { + Withdraw: "Withdraw", + }, + }, + ParachainTransactProxyType: { + _enum: { + Primary: 0, + Derived: 1, + }, + }, + ParachainDerivedProxyAccountType: { + _enum: { + Salp: 0, + Staking: 1, + }, + }, + Keys: "SessionKeys1", + ParachainTransactType: { + _enum: { + Xcm: 0, + Proxy: 1, + }, + }, + RpcContributionStatus: { + _enum: { + Idle: 0, + Contributing: 1, + Refunded: 2, + Unlocked: 3, + Redeemed: 4, + }, + }, + RewardRecord: { + account_id: "AccountId", + record_amount: "Balance", + }, + PoolId: "u32", + SwapFee: "u128", + PoolDetails: { + owner: "AccountId", + swap_fee_rate: "SwapFee", + active: "bool", + }, + PoolWeight: "Balance", + PoolToken: "u128", + PoolCreateTokenDetails: { + token_id: "AssetId", + token_balance: "Balance", + token_weight: "PoolWeight", + }, + MaxLocksOf: "u32", + BifrostVestingInfo: { + locked: "Balance", + per_block: "Balance", + starting_block: "BlockNumber", + }, + OracleKey: "CurrencyId", + BlockNumberFor: "BlockNumber", + OrderId: "u64", + OrderInfo: { + owner: "AccountIdOf", + vsbond: "CurrencyId", + supply: "u128", + remain: "u128", + unit_price: "U64F64", + order_id: "OrderId", + order_state: "OrderState", + }, + OrderState: { + _enum: ["InTrade", "Revoked", "Clinchd"], + }, + U64F64: "u128", + ZenlinkAssetId: { + chain_id: "u32", + asset_type: "u8", + asset_index: "u64", + }, + ZenlinkAssetBalance: "u128", + PairInfo: { + asset0: "ZenlinkAssetId", + asset1: "ZenlinkAssetId", + account: "AccountId", + totalLiquidity: "ZenlinkAssetBalance", + holdingLiquidity: "ZenlinkAssetBalance", + reserve0: "ZenlinkAssetBalance", + reserve1: "ZenlinkAssetBalance", + lpAssetId: "ZenlinkAssetId", + }, + PairMetadata: { + pair_account: "AccountId", + target_supply: "ZenlinkAssetBalance", + }, + BootstrapParamter: { + min_contribution: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + target_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + accumulated_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + end_block_number: "BlockNumber", + pair_account: "AccountId", + }, + PairStatus: { + _enum: { + Trading: "PairMetadata", + Bootstrap: "BootstrapParamter", + Disable: null, + }, + }, + TokenSymbol: { + _enum: { + ASG: 0, + BNC: 1, + KUSD: 2, + DOT: 3, + KSM: 4, + ETH: 5, + KAR: 6, + ZLK: 7, + }, + }, + CurrencyId: { + _enum: { + Native: "TokenSymbol", + VToken: "TokenSymbol", + Token: "TokenSymbol", + Stable: "TokenSymbol", + VSToken: "TokenSymbol", + VSBond: "(TokenSymbol, ParaId, LeasePeriod, LeasePeriod)", + LPToken: "(TokenSymbol, u8, TokenSymbol, u8)", + }, + }, + CurrencyIdOf: "CurrencyId", + TAssetBalance: "Balance", + AmountOf: "Balance", + StorageVersion: "Releases", + ShareWeight: "Balance", + Currency: "CurrencyIdOf", + Amount: "AmountOf", + TransferOriginType: { + _enum: { + FromSelf: 0, + FromRelayChain: 1, + FromSiblingParaChain: 2, + }, + }, + PoolType: { + _enum: { + Mining: 0, + Farming: 1, + EBFarming: 2, + }, + }, + PoolState: { + _enum: { + UnCharged: 0, + Charged: 1, + Ongoing: 2, + Retired: 3, + Dead: 4, + }, + }, + DepositData: { + deposit: "Balance", + gain_avgs: "BTreeMap", + update_b: "BlockNumber", + }, + RewardData: { + total: "Balance", + per_block: "Balance", + claimed: "Balance", + gain_avg: "FixedU128", + }, + AssetInstance: "AssetInstanceV1", + }, + typesBundle: { + spec: { + bifrost: { + rpc: { + oracle: { + getValue: { + description: "Retrieves the oracle value for a given key.", + params: [ + { + name: "providerId", + type: "RpcDataProviderId", + }, + { + name: "key", + type: "OracleKey", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "Option", + isSubscription: false, + jsonrpc: "oracle_getValue", + method: "getValue", + section: "oracle", + }, + getAllValues: { + description: "Retrieves all oracle values.", + params: [ + { + name: "providerId", + type: "RpcDataProviderId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "Vec<(OracleKey, Option)>", + isSubscription: false, + jsonrpc: "oracle_getAllValues", + method: "getAllValues", + section: "oracle", + }, + }, + flexibleFee: { + getFeeTokenAndAmount: { + description: + "Get charging token type and amount in terms of flexible transaction fee.", + params: [ + { + name: "who", + type: "AccountId", + }, + { + name: "extrinsic", + type: "Bytes", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "(CurrencyId, NumberOrHex)", + isSubscription: false, + jsonrpc: "flexibleFee_getFeeTokenAndAmount", + method: "getFeeTokenAndAmount", + section: "flexibleFee", + }, + }, + salp: { + getContribution: { + description: "salp getContribution", + params: [ + { + name: "index", + type: "ParaId", + }, + { + name: "who", + type: "AccountIdOf", + }, + ], + type: "(Balance, ContributionStatus)", + isSubscription: false, + jsonrpc: "salp_getContribution", + method: "getContribution", + section: "salp", + }, + }, + vtokenMint: { + getVtokenMintRate: { + description: "Get current vtoken mint rate.", + params: [ + { + name: "asset_id", + type: "CurrencyId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "String", + isSubscription: false, + jsonrpc: "vtokenMint_getVtokenMintRate", + method: "getVtokenMintRate", + section: "vtokenMint", + }, + }, + zenlinkProtocol: { + getAllAssets: { + description: "zenlinkProtocol getAllAssets", + params: [ + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "Vec", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAllAssets", + method: "getAllAssets", + section: "zenlinkProtocol", + }, + getBalance: { + description: "zenlinkProtocol getBalance", + params: [ + { + name: "asset_id", + type: "ZenlinkAssetId", + }, + { + name: "account", + type: "AccountId", + }, + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "String", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getBalance", + method: "getBalance", + section: "zenlinkProtocol", + }, + getSovereignsInfo: { + description: "Get the ownership of a certain currency for each parachain.", + params: [ + { + name: "asset_id", + type: "ZenlinkAssetId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "(u32, AccountId, String)", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getSovereignsInfo", + method: "getSovereignsInfo", + section: "zenlinkProtocol", + }, + getPairByAssetId: { + description: "Get the detailed information of a particular exchange pair.", + params: [ + { + name: "asset_0", + type: "ZenlinkAssetId", + }, + { + name: "asset_1", + type: "ZenlinkAssetId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "PairInfo", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getPairByAssetId", + method: "getPairByAssetId", + section: "zenlinkProtocol", + }, + getAmountInPrice: { + description: "Get the output token amount for an exact input token amount.", + params: [ + { + name: "supply", + type: "ZenlinkAssetBalance", + }, + { + name: "path", + type: "Vec", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAmountInPrice", + method: "getAmountInPrice", + section: "zenlinkProtocol", + }, + getAmountOutPrice: { + description: "Get the input token amount for an exact output token amount.", + params: [ + { + name: "supply", + type: "ZenlinkAssetBalance", + }, + { + name: "path", + type: "Vec", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAmountOutPrice", + method: "getAmountOutPrice", + section: "zenlinkProtocol", + }, + getEstimateLptoken: { + description: + "Get the estimated number of LP token acquired given the desired and minimum amount for both in-token and out-token.", + params: [ + { + name: "asset_0", + type: "ZenlinkAssetId", + }, + { + name: "asset_1", + type: "ZenlinkAssetId", + }, + { + name: "amount_0_desired", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_1_desired", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_0_min", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_1_min", + type: "ZenlinkAssetBalance", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getEstimateLptoken", + method: "getEstimateLptoken", + section: "zenlinkProtocol", + }, + }, + liquidityMining: { + getRewards: { + description: "Get the rewards users deserve", + params: [ + { + name: "who", + type: "AccountId", + }, + { + name: "pid", + type: "PoolId", + }, + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "Vec<(CurrencyId, Balance)>", + isSubscription: false, + jsonrpc: "liquidityMining_getRewards", + method: "getRewards", + section: "liquidityMining", + }, + }, + }, + types: [ + { + minmax: [0, 901], + types: { + CallOf: "Call", + DispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { + delay: "BlockNumber", + origin: "PalletsOrigin", + }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue", + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { + value: "OracleValue", + timestamp: "Moment", + }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance", + }, + OrmlBalanceLock: { + amount: "Balance", + id: "LockIdentifier", + }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option", + }, + DelayedDispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact", + }, + VestingScheduleOf: "OrmlVestingSchedule", + PoolInfo: { + pool_id: "PoolId", + keeper: "AccountId", + investor: "Option", + trading_pair: "(CurrencyId, CurrencyId)", + duration: "BlockNumber", + type: "PoolType", + min_deposit_to_start: "Balance", + after_block_to_start: "BlockNumber", + deposit: "Balance", + rewards: "BTreeMap", + update_b: "BlockNumber", + state: "PoolState", + block_startup: "Option", + block_retired: "Option", + }, + Share: "u128", + OracleValue: "Price", + BiddingOrderId: "u64", + EraId: "u32", + BiddingOrderUnit: { + bidder_id: "AccountId", + token_id: "AssetId", + block_num: "BlockNumber", + votes: "Balance", + annual_roi: "Permill", + validator: "AccountId", + }, + BiddingOrderUnitOf: "BiddingOrderUnit", + VersionId: "u32", + PermissionName: "u64", + PermissionLevel: { + actor: "AccountName", + permission: "PermissionName", + }, + Action: { + account: "AccountName", + name: "ActionName", + authorization: "Vec", + data: "Vec", + }, + AccountName: "u64", + Checksum256: "([u8;32])", + ActionName: "u64", + FlatMap: { + map: "Vec<(ActionName, u64)>", + }, + UnsignedInt: "u32", + ActionReceipt: { + receiver: "AccountName", + act_digest: "Checksum256", + global_sequence: "u64", + recv_sequence: "u64", + auth_sequence: "FlatMap", + code_sequence: "UnsignedInt", + abi_sequence: "UnsignedInt", + }, + BlockchainType: { + _enum: ["BIFROST", "EOS", "IOST"], + }, + Precision: "u32", + BridgeAssetSymbol: { + blockchain: "BlockchainType", + symbol: "Vec", + precision: "Precision", + }, + PublicKey: { + type_: "UnsignedInt", + data: "[u8;33]", + }, + ProducerKey: { + producer_name: "AccountName", + block_signing_key: "PublicKey", + }, + ProducerSchedule: { + version: "u32", + producers: "Vec", + }, + bridgeEosSignature: { + type_: "UnsignedInt", + data: "[u8;65]", + }, + BlockTimestamp: "(u32)", + Extension: "(u16, Vec)", + BlockHeader: { + timestamp: "BlockTimestamp", + producer: "AccountName", + confirmed: "u16", + previous: "Checksum256", + transaction_mroot: "Checksum256", + action_mroot: "Checksum256", + schedule_version: "u32", + new_producers: "Option", + header_extensions: "Vec", + }, + SignedBlockHeader: { + block_header: "BlockHeader", + producer_signature: "bridgeEosSignature", + }, + Checksum256Array: "Vec", + IncrementalMerkle: { + _node_count: "u64", + _active_nodes: "Checksum256Array", + }, + TxSig: { + signature: "Vec", + author: "AccountId", + }, + MultiSig: { + signatures: "Vec", + threshold: "u8", + }, + MultiSigTx: { + chain_id: "Vec", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "Action", + from: "AccountId", + asset_id: "AssetId", + }, + Sent: { + tx_id: "Vec", + from: "AccountId", + asset_id: "AssetId", + }, + Succeeded: { + tx_id: "Vec", + }, + Failed: { + tx_id: "Vec", + reason: "Vec", + }, + TxOut: { + _enum: { + Initialized: "MultiSigTx", + Created: "MultiSigTx", + SignComplete: "MultiSigTx", + Sent: "Sent", + Succeeded: "Succeeded", + Failed: "Failed", + }, + }, + TransactionStatus: { + _enum: ["Initialized", "Created", "SignComplete", "Sent", "Succeeded", "Failed"], + }, + ProducerAuthoritySchedule: { + version: "u32", + producers: "Vec", + }, + ProducerAuthority: { + producer_name: "ActionName", + authority: "BlockSigningAuthority", + }, + BlockSigningAuthority: "(UnsignedInt, BlockSigningAuthorityV0)", + BlockSigningAuthorityV0: { + threshold: "u32", + keyWeights: "Vec", + }, + KeyWeight: { + key: "PublicKey", + weight: "u16", + }, + BancorPool: { + currency_id: "CurrencyId", + token_pool: "Balance", + vstoken_pool: "Balance", + token_ceiling: "Balance", + token_base_supply: "Balance", + vstoken_base_supply: "Balance", + }, + IostAction: { + contract: "Vec", + action_name: "Vec", + data: "Vec", + }, + IostMultiSigTx: { + chain_id: "i32", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "IostAction", + from: "AccountId", + asset_id: "AssetId", + }, + Processing: { + tx_id: "Vec", + multi_sig_tx: "IostMultiSigTx", + }, + IostTxOut: { + _enum: { + Initial: "IostMultiSigTx", + Generated: "IostMultiSigTx", + Signed: "IostMultiSigTx", + Processing: "Processing", + Success: "Vec", + Fail: "Failed", + }, + }, + PalletBalanceOf: "Balance", + NumberOrHex: { + _enum: { + Number: "u64", + Hex: "U256", + }, + }, + ExtraFeeName: { + _enum: ["SalpContribute", "NoExtraFee"], + }, + IsExtended: "bool", + SystemPalletId: "PalletId", + TrieIndex: "u32", + FundInfo: { + raised: "Balance", + cap: "Balance", + first_slot: "LeasePeriod", + last_slot: "LeasePeriod", + trie_index: "TrieIndex", + status: "FundStatus", + }, + RedeemStatus: "BalanceOf", + FundStatus: { + _enum: { + Ongoing: 0, + Retired: 1, + Success: 2, + Failed: 3, + RefundWithdrew: 4, + RedeemWithdrew: 5, + End: 6, + }, + }, + ContributionStatus: { + _enum: ["Idle", "Refunded", "Unlocked", "Refunding", "Contributing"], + }, + CrowdloanContributeCall: { + _enum: { + CrowdloanContribute: "ContributeCall", + }, + }, + ContributeCall: { + _enum: { + Contribute: "Contribution", + }, + }, + Contribution: { + index: "ParaId", + value: "BalanceOf", + signature: "Option", + }, + Withdraw: { + who: "AccountIdOf", + index: "ParaId", + }, + WithdrawCall: { + _enum: { + Withdraw: "Withdraw", + }, + }, + ParachainTransactProxyType: { + _enum: { + Primary: 0, + Derived: 1, + }, + }, + ParachainDerivedProxyAccountType: { + _enum: { + Salp: 0, + Staking: 1, + }, + }, + Keys: "SessionKeys1", + ParachainTransactType: { + _enum: { + Xcm: 0, + Proxy: 1, + }, + }, + RpcContributionStatus: { + _enum: { + Idle: 0, + Contributing: 1, + Refunded: 2, + Unlocked: 3, + Redeemed: 4, + }, + }, + RewardRecord: { + account_id: "AccountId", + record_amount: "Balance", + }, + PoolId: "u32", + SwapFee: "u128", + PoolDetails: { + owner: "AccountId", + swap_fee_rate: "SwapFee", + active: "bool", + }, + PoolWeight: "Balance", + PoolToken: "u128", + PoolCreateTokenDetails: { + token_id: "AssetId", + token_balance: "Balance", + token_weight: "PoolWeight", + }, + MaxLocksOf: "u32", + BifrostVestingInfo: { + locked: "Balance", + per_block: "Balance", + starting_block: "BlockNumber", + }, + OracleKey: "CurrencyId", + BlockNumberFor: "BlockNumber", + OrderId: "u64", + OrderInfo: { + owner: "AccountIdOf", + vsbond: "CurrencyId", + supply: "u128", + remain: "u128", + unit_price: "U64F64", + order_id: "OrderId", + order_state: "OrderState", + }, + OrderState: { + _enum: ["InTrade", "Revoked", "Clinchd"], + }, + U64F64: "u128", + ZenlinkAssetId: { + chain_id: "u32", + asset_type: "u8", + asset_index: "u64", + }, + ZenlinkAssetBalance: "u128", + PairInfo: { + asset0: "ZenlinkAssetId", + asset1: "ZenlinkAssetId", + account: "AccountId", + totalLiquidity: "ZenlinkAssetBalance", + holdingLiquidity: "ZenlinkAssetBalance", + reserve0: "ZenlinkAssetBalance", + reserve1: "ZenlinkAssetBalance", + lpAssetId: "ZenlinkAssetId", + }, + PairMetadata: { + pair_account: "AccountId", + target_supply: "ZenlinkAssetBalance", + }, + BootstrapParamter: { + min_contribution: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + target_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + accumulated_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + end_block_number: "BlockNumber", + pair_account: "AccountId", + }, + PairStatus: { + _enum: { + Trading: "PairMetadata", + Bootstrap: "BootstrapParamter", + Disable: null, + }, + }, + TokenSymbol: { + _enum: { + BNC: 1, + KUSD: 2, + DOT: 3, + KSM: 4, + KAR: 6, + }, + }, + CurrencyId: { + _enum: { + Native: "TokenSymbol", + VToken: "TokenSymbol", + Token: "TokenSymbol", + Stable: "TokenSymbol", + VSToken: "TokenSymbol", + VSBond: "(TokenSymbol, ParaId, LeasePeriod, LeasePeriod)", + LPToken: "(TokenSymbol, u8, TokenSymbol, u8)", + }, + }, + CurrencyIdOf: "CurrencyId", + TAssetBalance: "Balance", + AmountOf: "Balance", + StorageVersion: "Releases", + ShareWeight: "Balance", + Currency: "CurrencyIdOf", + Amount: "AmountOf", + TransferOriginType: { + _enum: { + FromSelf: 0, + FromRelayChain: 1, + FromSiblingParaChain: 2, + }, + }, + PoolType: { + _enum: { + Mining: 0, + Farming: 1, + EBFarming: 2, + }, + }, + PoolState: { + _enum: { + UnCharged: 0, + Charged: 1, + Ongoing: 2, + Retired: 3, + Dead: 4, + }, + }, + DepositData: { + deposit: "Balance", + gain_avgs: "BTreeMap", + update_b: "BlockNumber", + }, + RewardData: { + total: "Balance", + per_block: "Balance", + claimed: "Balance", + gain_avg: "FixedU128", + }, + AssetInstance: "AssetInstanceV1", + MultiAsset: "MultiAssetV0", + Xcm: "XcmV0", + XcmOrder: "XcmOrderV0", + MultiLocation: "MultiLocationV0", + XcmError: "XcmErrorV0", + Response: "ResponseV0", + }, + }, + { + minmax: [902, null], + types: { + CallOf: "Call", + DispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { + delay: "BlockNumber", + origin: "PalletsOrigin", + }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue", + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { + value: "OracleValue", + timestamp: "Moment", + }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance", + }, + OrmlBalanceLock: { + amount: "Balance", + id: "LockIdentifier", + }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option", + }, + DelayedDispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact", + }, + VestingScheduleOf: "OrmlVestingSchedule", + PoolInfo: { + pool_id: "PoolId", + keeper: "AccountId", + investor: "Option", + trading_pair: "(CurrencyId, CurrencyId)", + duration: "BlockNumber", + type: "PoolType", + min_deposit_to_start: "Balance", + after_block_to_start: "BlockNumber", + deposit: "Balance", + rewards: "BTreeMap", + update_b: "BlockNumber", + state: "PoolState", + block_startup: "Option", + block_retired: "Option", + }, + Share: "u128", + OracleValue: "Price", + BiddingOrderId: "u64", + EraId: "u32", + BiddingOrderUnit: { + bidder_id: "AccountId", + token_id: "AssetId", + block_num: "BlockNumber", + votes: "Balance", + annual_roi: "Permill", + validator: "AccountId", + }, + BiddingOrderUnitOf: "BiddingOrderUnit", + VersionId: "u32", + PermissionName: "u64", + PermissionLevel: { + actor: "AccountName", + permission: "PermissionName", + }, + Action: { + account: "AccountName", + name: "ActionName", + authorization: "Vec", + data: "Vec", + }, + AccountName: "u64", + Checksum256: "([u8;32])", + ActionName: "u64", + FlatMap: { + map: "Vec<(ActionName, u64)>", + }, + UnsignedInt: "u32", + ActionReceipt: { + receiver: "AccountName", + act_digest: "Checksum256", + global_sequence: "u64", + recv_sequence: "u64", + auth_sequence: "FlatMap", + code_sequence: "UnsignedInt", + abi_sequence: "UnsignedInt", + }, + BlockchainType: { + _enum: ["BIFROST", "EOS", "IOST"], + }, + Precision: "u32", + BridgeAssetSymbol: { + blockchain: "BlockchainType", + symbol: "Vec", + precision: "Precision", + }, + PublicKey: { + type_: "UnsignedInt", + data: "[u8;33]", + }, + ProducerKey: { + producer_name: "AccountName", + block_signing_key: "PublicKey", + }, + ProducerSchedule: { + version: "u32", + producers: "Vec", + }, + bridgeEosSignature: { + type_: "UnsignedInt", + data: "[u8;65]", + }, + BlockTimestamp: "(u32)", + Extension: "(u16, Vec)", + BlockHeader: { + timestamp: "BlockTimestamp", + producer: "AccountName", + confirmed: "u16", + previous: "Checksum256", + transaction_mroot: "Checksum256", + action_mroot: "Checksum256", + schedule_version: "u32", + new_producers: "Option", + header_extensions: "Vec", + }, + SignedBlockHeader: { + block_header: "BlockHeader", + producer_signature: "bridgeEosSignature", + }, + Checksum256Array: "Vec", + IncrementalMerkle: { + _node_count: "u64", + _active_nodes: "Checksum256Array", + }, + TxSig: { + signature: "Vec", + author: "AccountId", + }, + MultiSig: { + signatures: "Vec", + threshold: "u8", + }, + MultiSigTx: { + chain_id: "Vec", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "Action", + from: "AccountId", + asset_id: "AssetId", + }, + Sent: { + tx_id: "Vec", + from: "AccountId", + asset_id: "AssetId", + }, + Succeeded: { + tx_id: "Vec", + }, + Failed: { + tx_id: "Vec", + reason: "Vec", + }, + TxOut: { + _enum: { + Initialized: "MultiSigTx", + Created: "MultiSigTx", + SignComplete: "MultiSigTx", + Sent: "Sent", + Succeeded: "Succeeded", + Failed: "Failed", + }, + }, + TransactionStatus: { + _enum: ["Initialized", "Created", "SignComplete", "Sent", "Succeeded", "Failed"], + }, + ProducerAuthoritySchedule: { + version: "u32", + producers: "Vec", + }, + ProducerAuthority: { + producer_name: "ActionName", + authority: "BlockSigningAuthority", + }, + BlockSigningAuthority: "(UnsignedInt, BlockSigningAuthorityV0)", + BlockSigningAuthorityV0: { + threshold: "u32", + keyWeights: "Vec", + }, + KeyWeight: { + key: "PublicKey", + weight: "u16", + }, + BancorPool: { + currency_id: "CurrencyId", + token_pool: "Balance", + vstoken_pool: "Balance", + token_ceiling: "Balance", + token_base_supply: "Balance", + vstoken_base_supply: "Balance", + }, + IostAction: { + contract: "Vec", + action_name: "Vec", + data: "Vec", + }, + IostMultiSigTx: { + chain_id: "i32", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "IostAction", + from: "AccountId", + asset_id: "AssetId", + }, + Processing: { + tx_id: "Vec", + multi_sig_tx: "IostMultiSigTx", + }, + IostTxOut: { + _enum: { + Initial: "IostMultiSigTx", + Generated: "IostMultiSigTx", + Signed: "IostMultiSigTx", + Processing: "Processing", + Success: "Vec", + Fail: "Failed", + }, + }, + PalletBalanceOf: "Balance", + NumberOrHex: { + _enum: { + Number: "u64", + Hex: "U256", + }, + }, + ExtraFeeName: { + _enum: ["SalpContribute", "NoExtraFee"], + }, + IsExtended: "bool", + SystemPalletId: "PalletId", + TrieIndex: "u32", + FundInfo: { + raised: "Balance", + cap: "Balance", + first_slot: "LeasePeriod", + last_slot: "LeasePeriod", + trie_index: "TrieIndex", + status: "FundStatus", + }, + RedeemStatus: "BalanceOf", + FundStatus: { + _enum: { + Ongoing: 0, + Retired: 1, + Success: 2, + Failed: 3, + RefundWithdrew: 4, + RedeemWithdrew: 5, + End: 6, + }, + }, + ContributionStatus: { + _enum: ["Idle", "Refunded", "Unlocked", "Refunding", "Contributing"], + }, + CrowdloanContributeCall: { + _enum: { + CrowdloanContribute: "ContributeCall", + }, + }, + ContributeCall: { + _enum: { + Contribute: "Contribution", + }, + }, + Contribution: { + index: "ParaId", + value: "BalanceOf", + signature: "Option", + }, + Withdraw: { + who: "AccountIdOf", + index: "ParaId", + }, + WithdrawCall: { + _enum: { + Withdraw: "Withdraw", + }, + }, + ParachainTransactProxyType: { + _enum: { + Primary: 0, + Derived: 1, + }, + }, + ParachainDerivedProxyAccountType: { + _enum: { + Salp: 0, + Staking: 1, + }, + }, + Keys: "SessionKeys1", + ParachainTransactType: { + _enum: { + Xcm: 0, + Proxy: 1, + }, + }, + RpcContributionStatus: { + _enum: { + Idle: 0, + Contributing: 1, + Refunded: 2, + Unlocked: 3, + Redeemed: 4, + }, + }, + RewardRecord: { + account_id: "AccountId", + record_amount: "Balance", + }, + PoolId: "u32", + SwapFee: "u128", + PoolDetails: { + owner: "AccountId", + swap_fee_rate: "SwapFee", + active: "bool", + }, + PoolWeight: "Balance", + PoolToken: "u128", + PoolCreateTokenDetails: { + token_id: "AssetId", + token_balance: "Balance", + token_weight: "PoolWeight", + }, + MaxLocksOf: "u32", + BifrostVestingInfo: { + locked: "Balance", + per_block: "Balance", + starting_block: "BlockNumber", + }, + OracleKey: "CurrencyId", + BlockNumberFor: "BlockNumber", + OrderId: "u64", + OrderInfo: { + owner: "AccountIdOf", + vsbond: "CurrencyId", + supply: "u128", + remain: "u128", + unit_price: "U64F64", + order_id: "OrderId", + order_state: "OrderState", + }, + OrderState: { + _enum: ["InTrade", "Revoked", "Clinchd"], + }, + U64F64: "u128", + ZenlinkAssetId: { + chain_id: "u32", + asset_type: "u8", + asset_index: "u64", + }, + ZenlinkAssetBalance: "u128", + PairInfo: { + asset0: "ZenlinkAssetId", + asset1: "ZenlinkAssetId", + account: "AccountId", + totalLiquidity: "ZenlinkAssetBalance", + holdingLiquidity: "ZenlinkAssetBalance", + reserve0: "ZenlinkAssetBalance", + reserve1: "ZenlinkAssetBalance", + lpAssetId: "ZenlinkAssetId", + }, + PairMetadata: { + pair_account: "AccountId", + target_supply: "ZenlinkAssetBalance", + }, + BootstrapParamter: { + min_contribution: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + target_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + accumulated_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + end_block_number: "BlockNumber", + pair_account: "AccountId", + }, + PairStatus: { + _enum: { + Trading: "PairMetadata", + Bootstrap: "BootstrapParamter", + Disable: null, + }, + }, + TokenSymbol: { + _enum: { + BNC: 1, + KUSD: 2, + DOT: 3, + KSM: 4, + KAR: 6, + }, + }, + CurrencyId: { + _enum: { + Native: "TokenSymbol", + VToken: "TokenSymbol", + Token: "TokenSymbol", + Stable: "TokenSymbol", + VSToken: "TokenSymbol", + VSBond: "(TokenSymbol, ParaId, LeasePeriod, LeasePeriod)", + LPToken: "(TokenSymbol, u8, TokenSymbol, u8)", + }, + }, + CurrencyIdOf: "CurrencyId", + TAssetBalance: "Balance", + AmountOf: "Balance", + StorageVersion: "Releases", + ShareWeight: "Balance", + Currency: "CurrencyIdOf", + Amount: "AmountOf", + TransferOriginType: { + _enum: { + FromSelf: 0, + FromRelayChain: 1, + FromSiblingParaChain: 2, + }, + }, + PoolType: { + _enum: { + Mining: 0, + Farming: 1, + EBFarming: 2, + }, + }, + PoolState: { + _enum: { + UnCharged: 0, + Charged: 1, + Ongoing: 2, + Retired: 3, + Dead: 4, + }, + }, + DepositData: { + deposit: "Balance", + gain_avgs: "BTreeMap", + update_b: "BlockNumber", + }, + RewardData: { + total: "Balance", + per_block: "Balance", + claimed: "Balance", + gain_avg: "FixedU128", + }, + AssetInstance: "AssetInstanceV1", + MultiAsset: "MultiAssetV1", + Xcm: "XcmV1", + XcmOrder: "XcmOrderV1", + MultiLocation: "MultiLocationV1", + XcmError: "XcmErrorV1", + Response: "ResponseV1", + }, + }, + ], + alias: { + tokens: { + AccountData: "OrmlAccountData", + BalanceLock: "OrmlBalanceLock", + }, + }, + }, + asgard: { + rpc: { + oracle: { + getValue: { + description: "Retrieves the oracle value for a given key.", + params: [ + { + name: "providerId", + type: "RpcDataProviderId", + }, + { + name: "key", + type: "OracleKey", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "Option", + isSubscription: false, + jsonrpc: "oracle_getValue", + method: "getValue", + section: "oracle", + }, + getAllValues: { + description: "Retrieves all oracle values.", + params: [ + { + name: "providerId", + type: "RpcDataProviderId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "Vec<(OracleKey, Option)>", + isSubscription: false, + jsonrpc: "oracle_getAllValues", + method: "getAllValues", + section: "oracle", + }, + }, + flexibleFee: { + getFeeTokenAndAmount: { + description: + "Get charging token type and amount in terms of flexible transaction fee.", + params: [ + { + name: "who", + type: "AccountId", + }, + { + name: "extrinsic", + type: "Bytes", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "(CurrencyId, NumberOrHex)", + isSubscription: false, + jsonrpc: "flexibleFee_getFeeTokenAndAmount", + method: "getFeeTokenAndAmount", + section: "flexibleFee", + }, + }, + salp: { + getContribution: { + description: "salp getContribution", + params: [ + { + name: "index", + type: "ParaId", + }, + { + name: "who", + type: "AccountIdOf", + }, + ], + type: "(Balance, ContributionStatus)", + isSubscription: false, + jsonrpc: "salp_getContribution", + method: "getContribution", + section: "salp", + }, + }, + vtokenMint: { + getVtokenMintRate: { + description: "Get current vtoken mint rate.", + params: [ + { + name: "asset_id", + type: "CurrencyId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "String", + isSubscription: false, + jsonrpc: "vtokenMint_getVtokenMintRate", + method: "getVtokenMintRate", + section: "vtokenMint", + }, + }, + zenlinkProtocol: { + getAllAssets: { + description: "zenlinkProtocol getAllAssets", + params: [ + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "Vec", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAllAssets", + method: "getAllAssets", + section: "zenlinkProtocol", + }, + getBalance: { + description: "zenlinkProtocol getBalance", + params: [ + { + name: "asset_id", + type: "ZenlinkAssetId", + }, + { + name: "account", + type: "AccountId", + }, + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "String", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getBalance", + method: "getBalance", + section: "zenlinkProtocol", + }, + getSovereignsInfo: { + description: "Get the ownership of a certain currency for each parachain.", + params: [ + { + name: "asset_id", + type: "ZenlinkAssetId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "(u32, AccountId, String)", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getSovereignsInfo", + method: "getSovereignsInfo", + section: "zenlinkProtocol", + }, + getPairByAssetId: { + description: "Get the detailed information of a particular exchange pair.", + params: [ + { + name: "asset_0", + type: "ZenlinkAssetId", + }, + { + name: "asset_1", + type: "ZenlinkAssetId", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "PairInfo", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getPairByAssetId", + method: "getPairByAssetId", + section: "zenlinkProtocol", + }, + getAmountInPrice: { + description: "Get the output token amount for an exact input token amount.", + params: [ + { + name: "supply", + type: "ZenlinkAssetBalance", + }, + { + name: "path", + type: "Vec", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAmountInPrice", + method: "getAmountInPrice", + section: "zenlinkProtocol", + }, + getAmountOutPrice: { + description: "Get the input token amount for an exact output token amount.", + params: [ + { + name: "supply", + type: "ZenlinkAssetBalance", + }, + { + name: "path", + type: "Vec", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getAmountOutPrice", + method: "getAmountOutPrice", + section: "zenlinkProtocol", + }, + getEstimateLptoken: { + description: + "Get the estimated number of LP token acquired given the desired and minimum amount for both in-token and out-token.", + params: [ + { + name: "asset_0", + type: "ZenlinkAssetId", + }, + { + name: "asset_1", + type: "ZenlinkAssetId", + }, + { + name: "amount_0_desired", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_1_desired", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_0_min", + type: "ZenlinkAssetBalance", + }, + { + name: "amount_1_min", + type: "ZenlinkAssetBalance", + }, + { + name: "at", + type: "BlockHash", + isHistoric: true, + isOptional: true, + }, + ], + type: "u128", + isSubscription: false, + jsonrpc: "zenlinkProtocol_getEstimateLptoken", + method: "getEstimateLptoken", + section: "zenlinkProtocol", + }, + }, + liquidityMining: { + getRewards: { + description: "Get the rewards users deserve", + params: [ + { + name: "who", + type: "AccountId", + }, + { + name: "pid", + type: "PoolId", + }, + { + name: "at", + type: "Hash", + isOptional: true, + }, + ], + type: "Vec<(CurrencyId, Balance)>", + isSubscription: false, + jsonrpc: "liquidityMining_getRewards", + method: "getRewards", + section: "liquidityMining", + }, + }, + }, + types: [ + { + minmax: [0, 901], + types: { + CallOf: "Call", + DispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { + delay: "BlockNumber", + origin: "PalletsOrigin", + }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue", + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { + value: "OracleValue", + timestamp: "Moment", + }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance", + }, + OrmlBalanceLock: { + amount: "Balance", + id: "LockIdentifier", + }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option", + }, + DelayedDispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact", + }, + VestingScheduleOf: "OrmlVestingSchedule", + PoolInfo: { + pool_id: "PoolId", + keeper: "AccountId", + investor: "Option", + trading_pair: "(CurrencyId, CurrencyId)", + duration: "BlockNumber", + type: "PoolType", + min_deposit_to_start: "Balance", + after_block_to_start: "BlockNumber", + deposit: "Balance", + rewards: "BTreeMap", + update_b: "BlockNumber", + state: "PoolState", + block_startup: "Option", + block_retired: "Option", + }, + Share: "u128", + OracleValue: "Price", + BiddingOrderId: "u64", + EraId: "u32", + BiddingOrderUnit: { + bidder_id: "AccountId", + token_id: "AssetId", + block_num: "BlockNumber", + votes: "Balance", + annual_roi: "Permill", + validator: "AccountId", + }, + BiddingOrderUnitOf: "BiddingOrderUnit", + VersionId: "u32", + PermissionName: "u64", + PermissionLevel: { + actor: "AccountName", + permission: "PermissionName", + }, + Action: { + account: "AccountName", + name: "ActionName", + authorization: "Vec", + data: "Vec", + }, + AccountName: "u64", + Checksum256: "([u8;32])", + ActionName: "u64", + FlatMap: { + map: "Vec<(ActionName, u64)>", + }, + UnsignedInt: "u32", + ActionReceipt: { + receiver: "AccountName", + act_digest: "Checksum256", + global_sequence: "u64", + recv_sequence: "u64", + auth_sequence: "FlatMap", + code_sequence: "UnsignedInt", + abi_sequence: "UnsignedInt", + }, + BlockchainType: { + _enum: ["BIFROST", "EOS", "IOST"], + }, + Precision: "u32", + BridgeAssetSymbol: { + blockchain: "BlockchainType", + symbol: "Vec", + precision: "Precision", + }, + PublicKey: { + type_: "UnsignedInt", + data: "[u8;33]", + }, + ProducerKey: { + producer_name: "AccountName", + block_signing_key: "PublicKey", + }, + ProducerSchedule: { + version: "u32", + producers: "Vec", + }, + bridgeEosSignature: { + type_: "UnsignedInt", + data: "[u8;65]", + }, + BlockTimestamp: "(u32)", + Extension: "(u16, Vec)", + BlockHeader: { + timestamp: "BlockTimestamp", + producer: "AccountName", + confirmed: "u16", + previous: "Checksum256", + transaction_mroot: "Checksum256", + action_mroot: "Checksum256", + schedule_version: "u32", + new_producers: "Option", + header_extensions: "Vec", + }, + SignedBlockHeader: { + block_header: "BlockHeader", + producer_signature: "bridgeEosSignature", + }, + Checksum256Array: "Vec", + IncrementalMerkle: { + _node_count: "u64", + _active_nodes: "Checksum256Array", + }, + TxSig: { + signature: "Vec", + author: "AccountId", + }, + MultiSig: { + signatures: "Vec", + threshold: "u8", + }, + MultiSigTx: { + chain_id: "Vec", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "Action", + from: "AccountId", + asset_id: "AssetId", + }, + Sent: { + tx_id: "Vec", + from: "AccountId", + asset_id: "AssetId", + }, + Succeeded: { + tx_id: "Vec", + }, + Failed: { + tx_id: "Vec", + reason: "Vec", + }, + TxOut: { + _enum: { + Initialized: "MultiSigTx", + Created: "MultiSigTx", + SignComplete: "MultiSigTx", + Sent: "Sent", + Succeeded: "Succeeded", + Failed: "Failed", + }, + }, + TransactionStatus: { + _enum: ["Initialized", "Created", "SignComplete", "Sent", "Succeeded", "Failed"], + }, + ProducerAuthoritySchedule: { + version: "u32", + producers: "Vec", + }, + ProducerAuthority: { + producer_name: "ActionName", + authority: "BlockSigningAuthority", + }, + BlockSigningAuthority: "(UnsignedInt, BlockSigningAuthorityV0)", + BlockSigningAuthorityV0: { + threshold: "u32", + keyWeights: "Vec", + }, + KeyWeight: { + key: "PublicKey", + weight: "u16", + }, + BancorPool: { + currency_id: "CurrencyId", + token_pool: "Balance", + vstoken_pool: "Balance", + token_ceiling: "Balance", + token_base_supply: "Balance", + vstoken_base_supply: "Balance", + }, + IostAction: { + contract: "Vec", + action_name: "Vec", + data: "Vec", + }, + IostMultiSigTx: { + chain_id: "i32", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "IostAction", + from: "AccountId", + asset_id: "AssetId", + }, + Processing: { + tx_id: "Vec", + multi_sig_tx: "IostMultiSigTx", + }, + IostTxOut: { + _enum: { + Initial: "IostMultiSigTx", + Generated: "IostMultiSigTx", + Signed: "IostMultiSigTx", + Processing: "Processing", + Success: "Vec", + Fail: "Failed", + }, + }, + PalletBalanceOf: "Balance", + NumberOrHex: { + _enum: { + Number: "u64", + Hex: "U256", + }, + }, + ExtraFeeName: { + _enum: ["SalpContribute", "NoExtraFee"], + }, + IsExtended: "bool", + SystemPalletId: "PalletId", + TrieIndex: "u32", + FundInfo: { + raised: "Balance", + cap: "Balance", + first_slot: "LeasePeriod", + last_slot: "LeasePeriod", + trie_index: "TrieIndex", + status: "FundStatus", + }, + RedeemStatus: "BalanceOf", + FundStatus: { + _enum: { + Ongoing: 0, + Retired: 1, + Success: 2, + Failed: 3, + RefundWithdrew: 4, + RedeemWithdrew: 5, + End: 6, + }, + }, + ContributionStatus: { + _enum: ["Idle", "Refunded", "Unlocked", "Refunding", "Contributing"], + }, + CrowdloanContributeCall: { + _enum: { + CrowdloanContribute: "ContributeCall", + }, + }, + ContributeCall: { + _enum: { + Contribute: "Contribution", + }, + }, + Contribution: { + index: "ParaId", + value: "BalanceOf", + signature: "Option", + }, + Withdraw: { + who: "AccountIdOf", + index: "ParaId", + }, + WithdrawCall: { + _enum: { + Withdraw: "Withdraw", + }, + }, + ParachainTransactProxyType: { + _enum: { + Primary: 0, + Derived: 1, + }, + }, + ParachainDerivedProxyAccountType: { + _enum: { + Salp: 0, + Staking: 1, + }, + }, + Keys: "SessionKeys1", + ParachainTransactType: { + _enum: { + Xcm: 0, + Proxy: 1, + }, + }, + RpcContributionStatus: { + _enum: { + Idle: 0, + Contributing: 1, + Refunded: 2, + Unlocked: 3, + Redeemed: 4, + }, + }, + RewardRecord: { + account_id: "AccountId", + record_amount: "Balance", + }, + PoolId: "u32", + SwapFee: "u128", + PoolDetails: { + owner: "AccountId", + swap_fee_rate: "SwapFee", + active: "bool", + }, + PoolWeight: "Balance", + PoolToken: "u128", + PoolCreateTokenDetails: { + token_id: "AssetId", + token_balance: "Balance", + token_weight: "PoolWeight", + }, + MaxLocksOf: "u32", + BifrostVestingInfo: { + locked: "Balance", + per_block: "Balance", + starting_block: "BlockNumber", + }, + OracleKey: "CurrencyId", + BlockNumberFor: "BlockNumber", + OrderId: "u64", + OrderInfo: { + owner: "AccountIdOf", + vsbond: "CurrencyId", + supply: "u128", + remain: "u128", + unit_price: "U64F64", + order_id: "OrderId", + order_state: "OrderState", + }, + OrderState: { + _enum: ["InTrade", "Revoked", "Clinchd"], + }, + U64F64: "u128", + ZenlinkAssetId: { + chain_id: "u32", + asset_type: "u8", + asset_index: "u64", + }, + ZenlinkAssetBalance: "u128", + PairInfo: { + asset0: "ZenlinkAssetId", + asset1: "ZenlinkAssetId", + account: "AccountId", + totalLiquidity: "ZenlinkAssetBalance", + holdingLiquidity: "ZenlinkAssetBalance", + reserve0: "ZenlinkAssetBalance", + reserve1: "ZenlinkAssetBalance", + lpAssetId: "ZenlinkAssetId", + }, + PairMetadata: { + pair_account: "AccountId", + target_supply: "ZenlinkAssetBalance", + }, + BootstrapParamter: { + min_contribution: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + target_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + accumulated_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + end_block_number: "BlockNumber", + pair_account: "AccountId", + }, + PairStatus: { + _enum: { + Trading: "PairMetadata", + Bootstrap: "BootstrapParamter", + Disable: null, + }, + }, + TokenSymbol: { + _enum: { + ASG: 0, + BNC: 1, + KUSD: 2, + DOT: 3, + KSM: 4, + ETH: 5, + KAR: 6, + ZLK: 7, + }, + }, + CurrencyId: { + _enum: { + Native: "TokenSymbol", + VToken: "TokenSymbol", + Token: "TokenSymbol", + Stable: "TokenSymbol", + VSToken: "TokenSymbol", + VSBond: "(TokenSymbol, ParaId, LeasePeriod, LeasePeriod)", + LPToken: "(TokenSymbol, u8, TokenSymbol, u8)", + }, + }, + CurrencyIdOf: "CurrencyId", + TAssetBalance: "Balance", + AmountOf: "Balance", + StorageVersion: "Releases", + ShareWeight: "Balance", + Currency: "CurrencyIdOf", + Amount: "AmountOf", + TransferOriginType: { + _enum: { + FromSelf: 0, + FromRelayChain: 1, + FromSiblingParaChain: 2, + }, + }, + PoolType: { + _enum: { + Mining: 0, + Farming: 1, + EBFarming: 2, + }, + }, + PoolState: { + _enum: { + UnCharged: 0, + Charged: 1, + Ongoing: 2, + Retired: 3, + Dead: 4, + }, + }, + DepositData: { + deposit: "Balance", + gain_avgs: "BTreeMap", + update_b: "BlockNumber", + }, + RewardData: { + total: "Balance", + per_block: "Balance", + claimed: "Balance", + gain_avg: "FixedU128", + }, + AssetInstance: "AssetInstanceV1", + MultiAsset: "MultiAssetV0", + Xcm: "XcmV0", + XcmOrder: "XcmOrderV0", + MultiLocation: "MultiLocationV0", + XcmError: "XcmErrorV0", + Response: "ResponseV0", + }, + }, + { + minmax: [902, null], + types: { + CallOf: "Call", + DispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + ScheduleTaskIndex: "u32", + DelayedOrigin: { + delay: "BlockNumber", + origin: "PalletsOrigin", + }, + AuthorityOrigin: "DelayedOrigin", + StorageValue: "Vec", + GraduallyUpdate: { + key: "StorageKey", + targetValue: "StorageValue", + perBlock: "StorageValue", + }, + StorageKeyBytes: "Vec", + StorageValueBytes: "Vec", + RpcDataProviderId: "Text", + DataProviderId: "u8", + TimestampedValue: { + value: "OracleValue", + timestamp: "Moment", + }, + TimestampedValueOf: "TimestampedValue", + OrderedSet: "Vec", + OrmlAccountData: { + free: "Balance", + reserved: "Balance", + frozen: "Balance", + }, + OrmlBalanceLock: { + amount: "Balance", + id: "LockIdentifier", + }, + AuctionInfo: { + bid: "Option<(AccountId, Balance)>", + start: "BlockNumber", + end: "Option", + }, + DelayedDispatchTime: { + _enum: { + At: "BlockNumber", + After: "BlockNumber", + }, + }, + DispatchId: "u32", + Price: "FixedU128", + OrmlVestingSchedule: { + start: "BlockNumber", + period: "BlockNumber", + periodCount: "u32", + perPeriod: "Compact", + }, + VestingScheduleOf: "OrmlVestingSchedule", + PoolInfo: { + pool_id: "PoolId", + keeper: "AccountId", + investor: "Option", + trading_pair: "(CurrencyId, CurrencyId)", + duration: "BlockNumber", + type: "PoolType", + min_deposit_to_start: "Balance", + after_block_to_start: "BlockNumber", + deposit: "Balance", + rewards: "BTreeMap", + update_b: "BlockNumber", + state: "PoolState", + block_startup: "Option", + block_retired: "Option", + }, + Share: "u128", + OracleValue: "Price", + BiddingOrderId: "u64", + EraId: "u32", + BiddingOrderUnit: { + bidder_id: "AccountId", + token_id: "AssetId", + block_num: "BlockNumber", + votes: "Balance", + annual_roi: "Permill", + validator: "AccountId", + }, + BiddingOrderUnitOf: "BiddingOrderUnit", + VersionId: "u32", + PermissionName: "u64", + PermissionLevel: { + actor: "AccountName", + permission: "PermissionName", + }, + Action: { + account: "AccountName", + name: "ActionName", + authorization: "Vec", + data: "Vec", + }, + AccountName: "u64", + Checksum256: "([u8;32])", + ActionName: "u64", + FlatMap: { + map: "Vec<(ActionName, u64)>", + }, + UnsignedInt: "u32", + ActionReceipt: { + receiver: "AccountName", + act_digest: "Checksum256", + global_sequence: "u64", + recv_sequence: "u64", + auth_sequence: "FlatMap", + code_sequence: "UnsignedInt", + abi_sequence: "UnsignedInt", + }, + BlockchainType: { + _enum: ["BIFROST", "EOS", "IOST"], + }, + Precision: "u32", + BridgeAssetSymbol: { + blockchain: "BlockchainType", + symbol: "Vec", + precision: "Precision", + }, + PublicKey: { + type_: "UnsignedInt", + data: "[u8;33]", + }, + ProducerKey: { + producer_name: "AccountName", + block_signing_key: "PublicKey", + }, + ProducerSchedule: { + version: "u32", + producers: "Vec", + }, + bridgeEosSignature: { + type_: "UnsignedInt", + data: "[u8;65]", + }, + BlockTimestamp: "(u32)", + Extension: "(u16, Vec)", + BlockHeader: { + timestamp: "BlockTimestamp", + producer: "AccountName", + confirmed: "u16", + previous: "Checksum256", + transaction_mroot: "Checksum256", + action_mroot: "Checksum256", + schedule_version: "u32", + new_producers: "Option", + header_extensions: "Vec", + }, + SignedBlockHeader: { + block_header: "BlockHeader", + producer_signature: "bridgeEosSignature", + }, + Checksum256Array: "Vec", + IncrementalMerkle: { + _node_count: "u64", + _active_nodes: "Checksum256Array", + }, + TxSig: { + signature: "Vec", + author: "AccountId", + }, + MultiSig: { + signatures: "Vec", + threshold: "u8", + }, + MultiSigTx: { + chain_id: "Vec", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "Action", + from: "AccountId", + asset_id: "AssetId", + }, + Sent: { + tx_id: "Vec", + from: "AccountId", + asset_id: "AssetId", + }, + Succeeded: { + tx_id: "Vec", + }, + Failed: { + tx_id: "Vec", + reason: "Vec", + }, + TxOut: { + _enum: { + Initialized: "MultiSigTx", + Created: "MultiSigTx", + SignComplete: "MultiSigTx", + Sent: "Sent", + Succeeded: "Succeeded", + Failed: "Failed", + }, + }, + TransactionStatus: { + _enum: ["Initialized", "Created", "SignComplete", "Sent", "Succeeded", "Failed"], + }, + ProducerAuthoritySchedule: { + version: "u32", + producers: "Vec", + }, + ProducerAuthority: { + producer_name: "ActionName", + authority: "BlockSigningAuthority", + }, + BlockSigningAuthority: "(UnsignedInt, BlockSigningAuthorityV0)", + BlockSigningAuthorityV0: { + threshold: "u32", + keyWeights: "Vec", + }, + KeyWeight: { + key: "PublicKey", + weight: "u16", + }, + BancorPool: { + currency_id: "CurrencyId", + token_pool: "Balance", + vstoken_pool: "Balance", + token_ceiling: "Balance", + token_base_supply: "Balance", + vstoken_base_supply: "Balance", + }, + IostAction: { + contract: "Vec", + action_name: "Vec", + data: "Vec", + }, + IostMultiSigTx: { + chain_id: "i32", + raw_tx: "Vec", + multi_sig: "MultiSig", + action: "IostAction", + from: "AccountId", + asset_id: "AssetId", + }, + Processing: { + tx_id: "Vec", + multi_sig_tx: "IostMultiSigTx", + }, + IostTxOut: { + _enum: { + Initial: "IostMultiSigTx", + Generated: "IostMultiSigTx", + Signed: "IostMultiSigTx", + Processing: "Processing", + Success: "Vec", + Fail: "Failed", + }, + }, + PalletBalanceOf: "Balance", + NumberOrHex: { + _enum: { + Number: "u64", + Hex: "U256", + }, + }, + ExtraFeeName: { + _enum: ["SalpContribute", "NoExtraFee"], + }, + IsExtended: "bool", + SystemPalletId: "PalletId", + TrieIndex: "u32", + FundInfo: { + raised: "Balance", + cap: "Balance", + first_slot: "LeasePeriod", + last_slot: "LeasePeriod", + trie_index: "TrieIndex", + status: "FundStatus", + }, + RedeemStatus: "BalanceOf", + FundStatus: { + _enum: { + Ongoing: 0, + Retired: 1, + Success: 2, + Failed: 3, + RefundWithdrew: 4, + RedeemWithdrew: 5, + End: 6, + }, + }, + ContributionStatus: { + _enum: ["Idle", "Refunded", "Unlocked", "Refunding", "Contributing"], + }, + CrowdloanContributeCall: { + _enum: { + CrowdloanContribute: "ContributeCall", + }, + }, + ContributeCall: { + _enum: { + Contribute: "Contribution", + }, + }, + Contribution: { + index: "ParaId", + value: "BalanceOf", + signature: "Option", + }, + Withdraw: { + who: "AccountIdOf", + index: "ParaId", + }, + WithdrawCall: { + _enum: { + Withdraw: "Withdraw", + }, + }, + ParachainTransactProxyType: { + _enum: { + Primary: 0, + Derived: 1, + }, + }, + ParachainDerivedProxyAccountType: { + _enum: { + Salp: 0, + Staking: 1, + }, + }, + Keys: "SessionKeys1", + ParachainTransactType: { + _enum: { + Xcm: 0, + Proxy: 1, + }, + }, + RpcContributionStatus: { + _enum: { + Idle: 0, + Contributing: 1, + Refunded: 2, + Unlocked: 3, + Redeemed: 4, + }, + }, + RewardRecord: { + account_id: "AccountId", + record_amount: "Balance", + }, + PoolId: "u32", + SwapFee: "u128", + PoolDetails: { + owner: "AccountId", + swap_fee_rate: "SwapFee", + active: "bool", + }, + PoolWeight: "Balance", + PoolToken: "u128", + PoolCreateTokenDetails: { + token_id: "AssetId", + token_balance: "Balance", + token_weight: "PoolWeight", + }, + MaxLocksOf: "u32", + BifrostVestingInfo: { + locked: "Balance", + per_block: "Balance", + starting_block: "BlockNumber", + }, + OracleKey: "CurrencyId", + BlockNumberFor: "BlockNumber", + OrderId: "u64", + OrderInfo: { + owner: "AccountIdOf", + vsbond: "CurrencyId", + supply: "u128", + remain: "u128", + unit_price: "U64F64", + order_id: "OrderId", + order_state: "OrderState", + }, + OrderState: { + _enum: ["InTrade", "Revoked", "Clinchd"], + }, + U64F64: "u128", + ZenlinkAssetId: { + chain_id: "u32", + asset_type: "u8", + asset_index: "u64", + }, + ZenlinkAssetBalance: "u128", + PairInfo: { + asset0: "ZenlinkAssetId", + asset1: "ZenlinkAssetId", + account: "AccountId", + totalLiquidity: "ZenlinkAssetBalance", + holdingLiquidity: "ZenlinkAssetBalance", + reserve0: "ZenlinkAssetBalance", + reserve1: "ZenlinkAssetBalance", + lpAssetId: "ZenlinkAssetId", + }, + PairMetadata: { + pair_account: "AccountId", + target_supply: "ZenlinkAssetBalance", + }, + BootstrapParamter: { + min_contribution: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + target_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + accumulated_supply: "(ZenlinkAssetBalance, ZenlinkAssetBalance)", + end_block_number: "BlockNumber", + pair_account: "AccountId", + }, + PairStatus: { + _enum: { + Trading: "PairMetadata", + Bootstrap: "BootstrapParamter", + Disable: null, + }, + }, + TokenSymbol: { + _enum: { + ASG: 0, + BNC: 1, + KUSD: 2, + DOT: 3, + KSM: 4, + ETH: 5, + KAR: 6, + ZLK: 7, + }, + }, + CurrencyId: { + _enum: { + Native: "TokenSymbol", + VToken: "TokenSymbol", + Token: "TokenSymbol", + Stable: "TokenSymbol", + VSToken: "TokenSymbol", + VSBond: "(TokenSymbol, ParaId, LeasePeriod, LeasePeriod)", + LPToken: "(TokenSymbol, u8, TokenSymbol, u8)", + }, + }, + CurrencyIdOf: "CurrencyId", + TAssetBalance: "Balance", + AmountOf: "Balance", + StorageVersion: "Releases", + ShareWeight: "Balance", + Currency: "CurrencyIdOf", + Amount: "AmountOf", + TransferOriginType: { + _enum: { + FromSelf: 0, + FromRelayChain: 1, + FromSiblingParaChain: 2, + }, + }, + PoolType: { + _enum: { + Mining: 0, + Farming: 1, + EBFarming: 2, + }, + }, + PoolState: { + _enum: { + UnCharged: 0, + Charged: 1, + Ongoing: 2, + Retired: 3, + Dead: 4, + }, + }, + DepositData: { + deposit: "Balance", + gain_avgs: "BTreeMap", + update_b: "BlockNumber", + }, + RewardData: { + total: "Balance", + per_block: "Balance", + claimed: "Balance", + gain_avg: "FixedU128", + }, + AssetInstance: "AssetInstanceV1", + MultiAsset: "MultiAssetV1", + Xcm: "XcmV1", + XcmOrder: "XcmOrderV1", + MultiLocation: "MultiLocationV1", + XcmError: "XcmErrorV1", + Response: "ResponseV1", + }, + }, + ], + alias: { + tokens: { + AccountData: "OrmlAccountData", + BalanceLock: "OrmlBalanceLock", + }, + }, + }, + }, + }, +}; +export const acala_type_definition = typesBundleForPolkadot; +export const karura_type_defition = typesBundleForPolkadot; diff --git a/yarn.lock b/yarn.lock index ecdb73c..9c88a3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,15 @@ __metadata: version: 6 cacheKey: 8 +"@acala-network/type-definitions@npm:^4.1.3": + version: 4.1.3 + resolution: "@acala-network/type-definitions@npm:4.1.3" + dependencies: + "@open-web3/orml-type-definitions": ^1.1.4 + checksum: 7312c276224c3ba6d57e44aacf3205b76815fc00c8a9d31ad293969b6a8c7376057ffb30c1540bf413c6e83717e4e21fb34cd3a50218d48761745884cd7a1648 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": version: 7.16.7 resolution: "@babel/code-frame@npm:7.16.7" @@ -1171,6 +1180,15 @@ __metadata: languageName: node linkType: hard +"@open-web3/orml-type-definitions@npm:^1.1.4": + version: 1.1.4 + resolution: "@open-web3/orml-type-definitions@npm:1.1.4" + dependencies: + lodash.merge: ^4.6.2 + checksum: 7a6aaef419db46346ec9449cab6b5b12f0a80779ba036561521e0f84bbed85e7a5e243409276d1dd5ace1d1446ca7a188e1133e9c031156b16faf282f3960344 + languageName: node + linkType: hard + "@polkadot/api-augment@npm:8.4.2": version: 8.4.2 resolution: "@polkadot/api-augment@npm:8.4.2" @@ -6503,6 +6521,7 @@ __metadata: version: 0.0.0-use.local resolution: "metadot-multisig@workspace:." dependencies: + "@acala-network/type-definitions": ^4.1.3 "@commitlint/cli": ^17.0.0 "@commitlint/config-conventional": ^17.0.0 "@polkadot/api": ^8.4.2 From 97bd8425fe03ac377b4aa0e341c8cdd11c79df18 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 28 May 2022 19:06:00 +0500 Subject: [PATCH 18/21] build: v0.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b227d80..da03eb5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "metadot-multisig", "description": "multisig subquery for metadot", - "version": "0.0.2", + "version": "0.0.3", "author": { "name": "Ahmed Ali", "url": "https://github.com/ahmedali8" From 5ce9eb548cddf30a0c0c0cea616a18f35478fee7 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 28 May 2022 19:15:52 +0500 Subject: [PATCH 19/21] ci: add build yml file --- .github/workflows/build_subql.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build_subql.yml diff --git a/.github/workflows/build_subql.yml b/.github/workflows/build_subql.yml new file mode 100644 index 0000000..64d95d3 --- /dev/null +++ b/.github/workflows/build_subql.yml @@ -0,0 +1,46 @@ +name: Build for all networks + +on: + push: + branches: + - dev + + # Allow workflow to be manually run from the GitHub UI + workflow_dispatch: + +jobs: + create-all-network-branches: + permissions: write-all + runs-on: ubuntu-latest + + strategy: + matrix: + network: [acala, astar, bifrost_mainnet, bifrost_testnet, contextfree, kusama, karura, polkadot, shiden, shibuya, westend] + fail-fast: false + + env: + NETWORK: ${{ matrix.network }} + + steps: + - uses: actions/checkout@v3 + + - run: echo "NETWORK -> ${{ env.NETWORK }}" + + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: "16.x" + cache: "yarn" + cache-dependency-path: "yarn.lock" + + - name: Install dependencies + run: yarn install --immutable --immutable-cache --check-cache + + - name: Patch chain + run: yarn patchchain ${{ env.NETWORK }} + + - name: Print project.yaml + run: cat ./project.yaml + + - name: Build project + run: yarn codegen && yarn build From 8a8875e837cfcbfff77b9bc9ce0fb2a6a2fe23db Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 28 May 2022 19:25:02 +0500 Subject: [PATCH 20/21] ci: remove cache --- .github/workflows/build_subql.yml | 2 +- .github/workflows/create_branches.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_subql.yml b/.github/workflows/build_subql.yml index 64d95d3..c0d62f0 100644 --- a/.github/workflows/build_subql.yml +++ b/.github/workflows/build_subql.yml @@ -34,7 +34,7 @@ jobs: cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install --immutable --immutable-cache --check-cache + run: yarn install - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 944c4a2..b6867c0 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -37,7 +37,7 @@ jobs: cache-dependency-path: "yarn.lock" - name: Install dependencies - run: yarn install --immutable --immutable-cache --check-cache + run: yarn install - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} From eead9cd3cc8e75e6c92f77d33c0eee794a2f8bd6 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Sat, 28 May 2022 19:38:58 +0500 Subject: [PATCH 21/21] feat: add local build testing --- scripts/build_all_subql.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/build_all_subql.sh diff --git a/scripts/build_all_subql.sh b/scripts/build_all_subql.sh new file mode 100755 index 0000000..b82e3ad --- /dev/null +++ b/scripts/build_all_subql.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# run loop for all networks +NETWORKS=("acala" "astar" "bifrost_mainnet" "bifrost_testnet" "contextfree" "kusama" "karura" "polkadot" "shiden" "shibuya" "westend") + +for NETWORK in ${NETWORKS[@]}; do + echo "NETWORK: $NETWORK" + yarn patchchain $NETWORK + # cat ./project.yaml + yarn codegen + yarn build +done + +echo "All builds complete" +git restore project.yaml src/constants/network.ts