diff --git a/.github/workflows/build_subql.yml b/.github/workflows/build_subql.yml new file mode 100644 index 0000000..c0d62f0 --- /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 + + - name: Patch chain + run: yarn patchchain ${{ env.NETWORK }} + + - name: Print project.yaml + run: cat ./project.yaml + + - name: Build project + run: yarn codegen && yarn build diff --git a/.github/workflows/create_branches.yml b/.github/workflows/create_branches.yml index 4cec34d..b6867c0 100644 --- a/.github/workflows/create_branches.yml +++ b/.github/workflows/create_branches.yml @@ -38,7 +38,6 @@ jobs: - name: Install dependencies run: yarn install - # --immutable --immutable-cache --check-cache - name: Patch chain run: yarn patchchain ${{ env.NETWORK }} 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..da03eb5 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "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" }, "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/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 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