diff --git a/db/migrations/12_add_new_8_chain_events.sql b/db/migrations/12_add_new_8_chain_events.sql new file mode 100644 index 00000000..9a410897 --- /dev/null +++ b/db/migrations/12_add_new_8_chain_events.sql @@ -0,0 +1,50 @@ +alter type "7a0b4cc03e" add value if not exists 'beefy' after 'validators'; +alter type "7a0b4cc03e" add value if not exists 'revive' after 'beefy'; + +alter type "0bf3c7d4ef" add value if not exists 'self_register_did' after 'unlink_child_identity'; +alter type "0bf3c7d4ef" add value if not exists 'remove_key' after 'sudo_as'; +alter type "0bf3c7d4ef" add value if not exists 'set_mandatory_receiver_affirmation' after 'lock_instruction'; +alter type "0bf3c7d4ef" add value if not exists 'transfer_funds' after 'set_mandatory_receiver_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'unlock_instruction' after 'transfer_funds'; +alter type "0bf3c7d4ef" add value if not exists 'approve_subsidy' after 'decrease_polyx_limit'; +alter type "0bf3c7d4ef" add value if not exists 'revoke_subsidy' after 'approve_subsidy'; +alter type "0bf3c7d4ef" add value if not exists 'accept_subsidy' after 'revoke_subsidy'; +alter type "0bf3c7d4ef" add value if not exists 'remove_subsidy' after 'accept_subsidy'; +alter type "0bf3c7d4ef" add value if not exists 'report_double_voting' after 'sumbit_unsigned'; +alter type "0bf3c7d4ef" add value if not exists 'report_double_voting_unsigned' after 'report_double_voting'; +alter type "0bf3c7d4ef" add value if not exists 'set_new_genesis' after 'report_double_voting_unsigned'; +alter type "0bf3c7d4ef" add value if not exists 'report_fork_voting' after 'set_new_genesis'; +alter type "0bf3c7d4ef" add value if not exists 'report_fork_voting_unsigned' after 'report_fork_voting'; +alter type "0bf3c7d4ef" add value if not exists 'report_future_block_voting' after 'report_fork_voting_unsigned'; +alter type "0bf3c7d4ef" add value if not exists 'report_future_block_voting_unsigned' after 'report_future_block_voting'; +alter type "0bf3c7d4ef" add value if not exists 'eth_transact' after 'report_future_block_voting_unsigned'; +alter type "0bf3c7d4ef" add value if not exists 'eth_instantiate_with_code' after 'eth_transact'; +alter type "0bf3c7d4ef" add value if not exists 'eth_call' after 'eth_instantiate_with_code'; +alter type "0bf3c7d4ef" add value if not exists 'eth_substrate_call' after 'eth_call'; +alter type "0bf3c7d4ef" add value if not exists 'map_account' after 'eth_substrate_call'; +alter type "0bf3c7d4ef" add value if not exists 'unmap_account' after 'map_account'; +alter type "0bf3c7d4ef" add value if not exists 'dispatch_as_fallback_account' after 'unmap_account'; + + +alter type "8f5a39c8ee" add value if not exists 'BurnedDebt' after 'Withdraw'; +alter type "8f5a39c8ee" add value if not exists 'BurnedHeld' after 'BurnedDebt'; +alter type "8f5a39c8ee" add value if not exists 'Held' after 'BurnedHeld'; +alter type "8f5a39c8ee" add value if not exists 'MintedCredit' after 'Held'; +alter type "8f5a39c8ee" add value if not exists 'Released' after 'MintedCredit'; +alter type "8f5a39c8ee" add value if not exists 'TransferAndHold' after 'Released'; +alter type "8f5a39c8ee" add value if not exists 'TransferOnHold' after 'TransferAndHold'; +alter type "8f5a39c8ee" add value if not exists 'Unexpected' after 'TransferOnHold'; +alter type "8f5a39c8ee" add value if not exists 'RootsPruned' after 'Slashed'; +alter type "8f5a39c8ee" add value if not exists 'RootStored' after 'RootsPruned'; +alter type "8f5a39c8ee" add value if not exists 'NFTHoldingsUpdated' after 'NFTPortfolioUpdated'; +alter type "8f5a39c8ee" add value if not exists 'NewQueued' after 'ValidatorReenabled'; +alter type "8f5a39c8ee" add value if not exists 'KeyRemoved' after 'KeyChanged'; +alter type "8f5a39c8ee" add value if not exists 'InstructionUnlocked' after 'VenueSignersUpdated'; +alter type "8f5a39c8ee" add value if not exists 'MandatoryReceiverAffirmationSet' after 'InstructionUnlocked'; +alter type "8f5a39c8ee" add value if not exists 'AcceptedSubsidy' after 'UpdatedPolyxLimit'; +alter type "8f5a39c8ee" add value if not exists 'ApprovedSubsidy' after 'AcceptedSubsidy'; +alter type "8f5a39c8ee" add value if not exists 'RemovedPendingSubsidy' after 'ApprovedSubsidy'; +alter type "8f5a39c8ee" add value if not exists 'RemovedSubsidy' after 'RemovedPendingSubsidy'; +alter type "8f5a39c8ee" add value if not exists 'SubsidyDebited' after 'RemovedSubsidy'; +alter type "8f5a39c8ee" add value if not exists 'EthExtrinsicRevert' after 'RootStored'; + diff --git a/db/migrations/13_add_identity_to_asset_transactions.sql b/db/migrations/13_add_identity_to_asset_transactions.sql new file mode 100644 index 00000000..f3f17704 --- /dev/null +++ b/db/migrations/13_add_identity_to_asset_transactions.sql @@ -0,0 +1,33 @@ +alter table "asset_transactions" add column if not exists "from_identity_id" text; +alter table "asset_transactions" add column if not exists "to_identity_id" text; + +-- Backfill from portfolio IDs (format: did/portfolioNumber) +update "asset_transactions" +set "from_identity_id" = split_part("from_portfolio_id", '/', 1) +where "from_portfolio_id" is not null + and "from_identity_id" is null; + +update "asset_transactions" +set "to_identity_id" = split_part("to_portfolio_id", '/', 1) +where "to_portfolio_id" is not null + and "to_identity_id" is null; + +-- Backfill account-based transactions from the accounts table. +-- Note: this reflects the current identity association for the account, +-- not necessarily the identity at the time of the transaction. +update "asset_transactions" at +set "from_identity_id" = a."identity_id" +from "accounts" a +where at."from_account" = a."id" + and at."from_identity_id" is null + and a."identity_id" is not null; + +update "asset_transactions" at +set "to_identity_id" = a."identity_id" +from "accounts" a +where at."to_account" = a."id" + and at."to_identity_id" is null + and a."identity_id" is not null; + +create index if not exists "asset_transactions_from_identity_id" on "asset_transactions" ("from_identity_id"); +create index if not exists "asset_transactions_to_identity_id" on "asset_transactions" ("to_identity_id"); diff --git a/db/migrations/14_confidential_assets_events_8_chain.sql b/db/migrations/14_confidential_assets_events_8_chain.sql new file mode 100644 index 00000000..c40aa5b2 --- /dev/null +++ b/db/migrations/14_confidential_assets_events_8_chain.sql @@ -0,0 +1,65 @@ +alter type "7a0b4cc03e" add value if not exists 'didregistrars' after 'revive'; +alter type "7a0b4cc03e" add value if not exists 'polymeshtransactionpayment' after 'didregistrars'; +alter type "7a0b4cc03e" add value if not exists 'multiblockmigrations' after 'polymeshtransactionpayment'; +alter type "7a0b4cc03e" add value if not exists 'confidentialassets' after 'multiblockmigrations'; + +alter type "0bf3c7d4ef" add value if not exists 'force_set_cursor' after 'dispatch_as_fallback_account'; +alter type "0bf3c7d4ef" add value if not exists 'force_set_active_cursor' after 'force_set_cursor'; +alter type "0bf3c7d4ef" add value if not exists 'force_onboard_mbms' after 'force_set_active_cursor'; +alter type "0bf3c7d4ef" add value if not exists 'clear_historic' after 'force_onboard_mbms'; +alter type "0bf3c7d4ef" add value if not exists 'register_accounts' after 'clear_historic'; +alter type "0bf3c7d4ef" add value if not exists 'register_encryption_keys' after 'register_accounts'; +alter type "0bf3c7d4ef" add value if not exists 'register_account_assets' after 'register_encryption_keys'; +alter type "0bf3c7d4ef" add value if not exists 'mint_asset' after 'register_account_assets'; +alter type "0bf3c7d4ef" add value if not exists 'create_settlement' after 'mint_asset'; +alter type "0bf3c7d4ef" add value if not exists 'sender_affirmation' after 'create_settlement'; +alter type "0bf3c7d4ef" add value if not exists 'receiver_affirmation' after 'sender_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'mediator_affirmation' after 'receiver_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'sender_update_counter' after 'mediator_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'sender_revert_affirmation' after 'sender_update_counter'; +alter type "0bf3c7d4ef" add value if not exists 'receiver_revert_affirmation' after 'sender_revert_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'receiver_claim' after 'receiver_revert_affirmation'; +alter type "0bf3c7d4ef" add value if not exists 'batched_settlement' after 'receiver_claim'; +alter type "0bf3c7d4ef" add value if not exists 'register_fee_accounts' after 'batched_settlement'; +alter type "0bf3c7d4ef" add value if not exists 'topup_fee_accounts' after 'register_fee_accounts'; +alter type "0bf3c7d4ef" add value if not exists 'submit_batched_proofs' after 'topup_fee_accounts'; +alter type "0bf3c7d4ef" add value if not exists 'relayer_submit_batched_proofs' after 'submit_batched_proofs'; +alter type "0bf3c7d4ef" add value if not exists 'execute_instant_settlement' after 'relayer_submit_batched_proofs'; +alter type "0bf3c7d4ef" add value if not exists 'instant_sender_affirmation' after 'execute_instant_settlement'; +alter type "0bf3c7d4ef" add value if not exists 'instant_receiver_affirmation' after 'instant_sender_affirmation'; + +alter type "8f5a39c8ee" add value if not exists 'AllowanceSpent' after 'CreatedAssetTransfer'; +alter type "8f5a39c8ee" add value if not exists 'FundsTransferred' after 'TickerLinkedToAsset'; +alter type "8f5a39c8ee" add value if not exists 'AccountAssetRegistered' after 'EthExtrinsicRevert'; +alter type "8f5a39c8ee" add value if not exists 'AccountCurveTreeRootUpdated' after 'AccountAssetRegistered'; +alter type "8f5a39c8ee" add value if not exists 'AccountRegistered' after 'AccountCurveTreeRootUpdated'; +alter type "8f5a39c8ee" add value if not exists 'AccountStateLeafInserted' after 'AccountRegistered'; +alter type "8f5a39c8ee" add value if not exists 'AssetCurveTreeRootUpdated' after 'AccountStateLeafInserted'; +alter type "8f5a39c8ee" add value if not exists 'AssetMinted' after 'AssetCurveTreeRootUpdated'; +alter type "8f5a39c8ee" add value if not exists 'AssetStateLeafUpdated' after 'AssetMinted'; +alter type "8f5a39c8ee" add value if not exists 'AssetUpdated' after 'AssetStateLeafUpdated'; +alter type "8f5a39c8ee" add value if not exists 'EncryptionKeyRegistered' after 'AssetUpdated'; +alter type "8f5a39c8ee" add value if not exists 'FeeAccountCurveTreeRootUpdated' after 'EncryptionKeyRegistered'; +alter type "8f5a39c8ee" add value if not exists 'FeeAccountDeposited' after 'FeeAccountCurveTreeRootUpdated'; +alter type "8f5a39c8ee" add value if not exists 'FeeAccountStateLeafInserted' after 'FeeAccountDeposited'; +alter type "8f5a39c8ee" add value if not exists 'FeeAccountUpdated' after 'FeeAccountStateLeafInserted'; +alter type "8f5a39c8ee" add value if not exists 'FeeAccountWithdrawn' after 'FeeAccountUpdated'; +alter type "8f5a39c8ee" add value if not exists 'MediatorAffirmed' after 'FeeAccountWithdrawn'; +alter type "8f5a39c8ee" add value if not exists 'MediatorRejected' after 'MediatorAffirmed'; +alter type "8f5a39c8ee" add value if not exists 'ReceiverAffirmationReverted' after 'MediatorRejected'; +alter type "8f5a39c8ee" add value if not exists 'ReceiverAffirmed' after 'ReceiverAffirmationReverted'; +alter type "8f5a39c8ee" add value if not exists 'ReceiverClaimed' after 'ReceiverAffirmed'; +alter type "8f5a39c8ee" add value if not exists 'RelayerBatchedProofs' after 'ReceiverClaimed'; +alter type "8f5a39c8ee" add value if not exists 'SenderAffirmationReverted' after 'RelayerBatchedProofs'; +alter type "8f5a39c8ee" add value if not exists 'SenderAffirmed' after 'SenderAffirmationReverted'; +alter type "8f5a39c8ee" add value if not exists 'SenderCounterUpdated' after 'SenderAffirmed'; +alter type "8f5a39c8ee" add value if not exists 'SettlementCreated' after 'SenderCounterUpdated'; +alter type "8f5a39c8ee" add value if not exists 'SettlementStatusUpdated' after 'SettlementCreated'; +alter type "8f5a39c8ee" add value if not exists 'HistoricCleared' after 'SettlementStatusUpdated'; +alter type "8f5a39c8ee" add value if not exists 'MigrationAdvanced' after 'HistoricCleared'; +alter type "8f5a39c8ee" add value if not exists 'MigrationCompleted' after 'MigrationAdvanced'; +alter type "8f5a39c8ee" add value if not exists 'MigrationFailed' after 'MigrationCompleted'; +alter type "8f5a39c8ee" add value if not exists 'MigrationSkipped' after 'MigrationFailed'; +alter type "8f5a39c8ee" add value if not exists 'UpgradeCompleted' after 'MigrationSkipped'; +alter type "8f5a39c8ee" add value if not exists 'UpgradeFailed' after 'UpgradeCompleted'; +alter type "8f5a39c8ee" add value if not exists 'UpgradeStarted' after 'UpgradeFailed'; diff --git a/db/migrations/15_add_missing_transfer_nft.sql b/db/migrations/15_add_missing_transfer_nft.sql new file mode 100644 index 00000000..386c8282 --- /dev/null +++ b/db/migrations/15_add_missing_transfer_nft.sql @@ -0,0 +1 @@ +alter type "0bf3c7d4ef" add value if not exists 'transfer_nft' after 'redeem_nft'; diff --git a/db/migrations/16_rename_submit_unsigned.sql b/db/migrations/16_rename_submit_unsigned.sql new file mode 100644 index 00000000..b501bb15 --- /dev/null +++ b/db/migrations/16_rename_submit_unsigned.sql @@ -0,0 +1 @@ +ALTER TYPE "0bf3c7d4ef" RENAME VALUE 'sumbit_unsigned' TO 'submit_unsigned'; diff --git a/db/schemaMigrations.ts b/db/schemaMigrations.ts index f7c081fb..93af5011 100644 --- a/db/schemaMigrations.ts +++ b/db/schemaMigrations.ts @@ -19,7 +19,7 @@ export const getMigrationVersion = (fileName: string): number | null => { const match = fileName.match(regex); if (match && match.length >= 2) { - return parseInt(match[1]); + return Number.parseInt(match[1]); } return null; // Return null if the version number is not found or invalid @@ -41,24 +41,22 @@ export const schemaMigrations = async (dataSource?: DataSource): Promise = const migrationDetails = await getLastMigrationFromDB(postgres); lastMigration = migrationDetails?.lastMigration || 0; } catch (e) { - console.log(`Error message: ${e.message}`); + console.log(`Error message: ${(e as Error).message}`); } const queries: string[] = []; - const migrations = readdirSync('../db/migrations'); - console.log(`Last executed migration sequence - ${lastMigration}`); - for (const file of migrations) { - const fileVersion = getMigrationVersion(file); + const migrations = readdirSync('../db/migrations') + .map(file => ({ file, version: getMigrationVersion(file) || 0 })) + .filter(m => m.version > lastMigration) + .sort((a, b) => a.version - b.version); - if (fileVersion && fileVersion > lastMigration) { - console.log(`Collecting migration file - ${file}`); + for (const { file, version } of migrations) { + console.log(`Collecting migration file - ${file}`); - queries.push(readFileSync(`../db/migrations/${file}`, 'utf-8')); - queries.push(migrationInsert(fileVersion)); - } + queries.push(readFileSync(`../db/migrations/${file}`, 'utf-8'), migrationInsert(version)); } if (queries.length > 0) { diff --git a/docker-compose.yml b/docker-compose.yml index 10f94a73..57bc8fbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,8 +35,7 @@ services: # Polymesh-local NETWORK_ENDPOINT: ws://host.docker.internal:9944 # Setting NETWORK_HTTP_ENDPOINT will allow dynamic lookup of NETWORK_CHAIN_ID - NETWORK_HTTP_ENDPOINT: 'http://host.docker.internal:9933' - # Staging + NETWORK_HTTP_ENDPOINT: 'http://host.docker.internal:9944' # Staging # NETWORK_ENDPOINT: wss://staging-rpc.polymesh.dev/ # NETWORK_CHAIN_ID: '0x3c3183f6d701500766ff7d147b79c4f10014a095eaaa98e960dcef6b3ead50ee' # NETWORK_DICTIONARY: https://subql-dictionary.polymesh.dev diff --git a/docker/sq-Dockerfile b/docker/sq-Dockerfile index a1d8081d..8c2dafc3 100644 --- a/docker/sq-Dockerfile +++ b/docker/sq-Dockerfile @@ -26,7 +26,7 @@ RUN corepack enable \ && rm -rf /root/.npm /root/.cache # Stage 2: Production Stage -FROM onfinality/subql-node:v6.4.3 AS production +FROM onfinality/subql-node:v6.4.6 AS production USER root diff --git a/package.json b/package.json index aa08b4b9..33103bc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polymesh-subquery", - "version": "19.3.1", + "version": "19.6.0", "author": "Polymesh Association", "license": "Apache-2.0", "description": "A Polymesh Chain Indexer, providing a GraphQL interface", @@ -8,6 +8,7 @@ "scripts": { "build": "subql build", "sql": "ts-node scripts/run-sql.ts", + "run:dev": "subql-node -f=./ --batch-size=50", "migrations": "ts-node scripts/run-migrations.ts", "prepack": "rm -rf dist && yarn build", "prepare": "husky install", @@ -35,8 +36,8 @@ "dependencies": { "@polkadot/api": "^16.5.2", "@polkadot/types-support": "^16.5.2", - "@polymeshassociation/polymesh-types": "^7.2.0", - "@subql/cli": "^6.6.0", + "@polymeshassociation/polymesh-types": "^7.4.0", + "@subql/cli": "^6.6.3", "@subql/types": "^3.15.0", "@subql/types-core": "^2.2.0", "bignumber.js": "^9.0.2", @@ -54,7 +55,7 @@ "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/npm": "^11.0.0", - "@subql/node": "^5.11.2", + "@subql/node": "^6.4.6", "@types/bn.js": "^4.11.6", "@types/jest": "^29.5.4", "@types/js-yaml": "^4.0.3", diff --git a/project.ts b/project.ts index 2e40790d..536cba87 100644 --- a/project.ts +++ b/project.ts @@ -10,7 +10,7 @@ const chainId = process.env.NETWORK_CHAIN_ID || ''; const endpoint = process.env.NETWORK_ENDPOINT || ''; const dictionary = process.env.NETWORK_DICTIONARY || ''; -const filters = { +const filters: Record> = { asset: { AssetAffirmationExemption: [], AssetBalanceUpdated: ['handleAssetBalanceUpdated'], @@ -216,7 +216,8 @@ const filters = { ProposalFailedToExecute: [], }, nft: { - NFTPortfolioUpdated: ['handleNftPortfolioUpdates'], + NFTPortfolioUpdated: ['handleNftHoldingsUpdates'], + NFTHoldingsUpdated: ['handleNftHoldingsUpdates'], NftCollectionCreated: ['handleNftCollectionCreated'], }, pips: { @@ -260,6 +261,7 @@ const filters = { settlement: { AffirmationWithdrawn: ['handleAffirmationWithdrawn'], FailedToExecuteInstruction: ['handleFailedToExecuteInstruction'], + FundsTransferred: ['handleFundsTransferred'], InstructionAffirmed: ['handleInstructionUpdate'], InstructionAutomaticallyAffirmed: ['handleAutomaticAffirmation'], InstructionAuthorized: ['handleInstructionUpdate'], @@ -362,6 +364,14 @@ const filters = { RewardPaymentSchedulingInterrupted: [], SlashingAllowedForChanged: [], }, + confidentialAssets: {}, + didRegistrars: {}, + polymeshTransactionPayment: {}, + multiBlockMigrations: {}, + beefy: {}, + revive: {}, + stateTrieMigration: {}, + electionProviderMultiPhase: {}, }; const handlers: SubstrateEventHandler[] = []; @@ -375,7 +385,7 @@ Object.keys(filters).forEach(module => { filter: { module, }, - } as SubstrateEventHandler); + }); } Object.keys(filters[module]).forEach(method => { @@ -387,7 +397,7 @@ Object.keys(filters).forEach(module => { module, method, }, - } as SubstrateEventHandler); + }); } if (filters[module][method].length > 0) { @@ -401,7 +411,7 @@ Object.keys(filters).forEach(module => { module, method, }, - } as SubstrateEventHandler); + }); }); } }); diff --git a/schema.graphql b/schema.graphql index f2b57051..203b2ebc 100644 --- a/schema.graphql +++ b/schema.graphql @@ -58,6 +58,12 @@ enum ModuleIdEnum { statetriemigration electionprovidermultiphase validators + beefy + revive + didregistrars + polymeshtransactionpayment + multiblockmigrations + confidentialassets ## deprecated ## confidential @deprecated @@ -111,7 +117,7 @@ enum EventIdEnum { # Burned Deposit DustLost - # Frozen + # Frozen (already defined in asset) # Issued (already defined in asset) Locked Minted @@ -125,6 +131,14 @@ enum EventIdEnum { Unlocked Upgraded Withdraw + BurnedDebt + BurnedHeld + Held + MintedCredit + Released + TransferAndHold + TransferOnHold + Unexpected ## transactionpayment ## @@ -138,17 +152,22 @@ enum EventIdEnum { ClaimAdded CustomClaimTypeAdded ClaimRevoked + "`AssetDidRegistered` has been deprecated from 8.0.0 chain version" AssetDidRegistered AuthorizationAdded AuthorizationRevoked AuthorizationRejected AuthorizationConsumed AuthorizationRetryLimitReached + "`CddRequirementForPrimaryKeyUpdated` has been deprecated from 8.0.0 chain version" CddRequirementForPrimaryKeyUpdated + "`CddClaimsInvalidated` has been deprecated from 8.0.0 chain version" CddClaimsInvalidated SecondaryKeysFrozen SecondaryKeysUnfrozen + "`ChildDidCreated` has been deprecated from 8.0.0 chain version" ChildDidCreated + "`ChildDidUnlinked` has been deprecated from 8.0.0 chain version" ChildDidUnlinked ## cddserviceproviders ## @@ -172,13 +191,22 @@ enum EventIdEnum { ExpiresAfterUpdated VoteThresholdUpdated - ## committeemembership ## + ## didregistrars ## MemberAdded MemberRemoved MemberRevoked MembersSwapped MembersReset ActiveLimitChanged + + ## committeemembership ## + # MemberAdded (already defined in didRegistrars) + # MemberRemoved (already defined in didRegistrars) + # MemberRevoked (already defined in didRegistrars) + # MembersSwapped (already defined in didRegistrars) + # MembersReset (already defined in didRegistrars) + # ActiveLimitChanged (already defined in didRegistrars) + "`Dummy` has been deprecated from 8.0.0 chain version" Dummy ## technicalcommittee ## @@ -195,13 +223,13 @@ enum EventIdEnum { # VoteThresholdUpdated (already defined in PolymeshCommittee) ## technicalcommitteemembership ## - # MemberAdded (already defined in CommitteeMembership) - # MemberRemoved (already defined in CommitteeMembership) - # MemberRevoked (already defined in CommitteeMembership) - # MembersSwapped (already defined in CommitteeMembership) - # MembersReset (already defined in CommitteeMembership) - # ActiveLimitChanged (already defined in CommitteeMembership) - # Dummy (already defined in CommitteeMembership) + # MemberAdded (already defined in didRegistrars) + # MemberRemoved (already defined in didRegistrars) + # MemberRevoked (already defined in didRegistrars) + # MembersSwapped (already defined in didRegistrars) + # MembersReset (already defined in didRegistrars) + # ActiveLimitChanged (already defined in didRegistrars) + # Dummy (deprecated from 8.0.0 chain version) ## upgradecommittee ## # Proposed (already defined in TechnicalCommittee) @@ -217,13 +245,13 @@ enum EventIdEnum { # VoteThresholdUpdated (already defined in TechnicalCommittee) ## upgradecommitteemembership ## - # MemberAdded (already defined in TechnicalCommitteeMembership) - # MemberRemoved (already defined in TechnicalCommitteeMembership) - # MemberRevoked (already defined in TechnicalCommitteeMembership) - # MembersSwapped (already defined in TechnicalCommitteeMembership) - # MembersReset (already defined in TechnicalCommitteeMembership) - # ActiveLimitChanged (already defined in TechnicalCommitteeMembership) - # Dummy (already defined in TechnicalCommitteeMembership) + # MemberAdded (already defined in didRegistrars) + # MemberRemoved (already defined in didRegistrars) + # MemberRevoked (already defined in didRegistrars) + # MembersSwapped (already defined in didRegistrars) + # MembersReset (already defined in didRegistrars) + # ActiveLimitChanged (already defined in didRegistrars) + # Dummy (deprecated from 8.0.0 chain version) ## multisig ## MultiSigCreated @@ -261,7 +289,7 @@ enum EventIdEnum { TimelockChanged "`Bridged` has been deprecated from 6.0.0 chain version" Bridged - "`Frozen` has been deprecated from 6.0.0 chain version" + "`Frozen` has been deprecated as bridge event from 6.0.0, still active in balances" Frozen "`Unfrozen` has been deprecated from 6.0.0 chain version" Unfrozen @@ -332,6 +360,7 @@ enum EventIdEnum { NewSession ValidatorDisabled ValidatorReenabled + NewQueued ## authoritydiscovery ## @@ -352,12 +381,13 @@ enum EventIdEnum { ## sudo ## Sudid KeyChanged + KeyRemoved SudoAsDone ## asset ## - "`Transfer` has been deprecated from 6.0.0 chain version" + "`Transfer` has been deprecated as an asset event from 6.0.0 chain version, still active in balances" Transfer - "`Issued` has been deprecated from 6.0.0 chain version" + "`Issued` has been deprecated as an asset event from 6.0.0 chain version, still active in balances" Issued "`Redeemed` has been deprecated from 6.0.0 chain version" Redeemed @@ -399,6 +429,8 @@ enum EventIdEnum { TickerUnlinkedFromAsset GlobalMetadataSpecUpdated CreatedAssetTransfer + AllowanceSpent + # Approval (already defined in deprecated events) ## capitaldistribution ## Created @@ -492,6 +524,7 @@ enum EventIdEnum { Scheduled Canceled Dispatched + "`CallLookupFailed` has been deprecated from 8.0.0 chain version" CallLookupFailed CallUnavailable PeriodicFailed @@ -523,13 +556,18 @@ enum EventIdEnum { VenuesAllowed VenuesBlocked LegFailedExecution + "`InstructionFailed` has been deprecated from 7.0.4 chain version" InstructionFailed InstructionExecuted VenueUnauthorized + "`SchedulingFailed` has been deprecated from 8.0.0 chain version" SchedulingFailed SettlementManuallyExecuted + "`InstructionRescheduled` has been deprecated from 8.0.0 chain version" InstructionRescheduled VenueSignersUpdated + InstructionUnlocked + MandatoryReceiverAffirmationSet RemoveAssetAffirmationExemption AssetAffirmationExemption @@ -544,6 +582,7 @@ enum EventIdEnum { InstructionLocked TickerLinkedToAsset + FundsTransferred ## statistics ## TransferManagerAdded @deprecated @@ -587,6 +626,7 @@ enum EventIdEnum { RelayedTx ## base ## + "`UnexpectedError` has been deprecated from 8.0.0 chain version" UnexpectedError ## externalagents ## @@ -597,12 +637,22 @@ enum EventIdEnum { GroupChanged ## relayer ## + "`AuthorizedPayingKey` has been deprecated from 8.0.0 chain version" AuthorizedPayingKey + "`AcceptedPayingKey` has been deprecated from 8.0.0 chain version" AcceptedPayingKey + "`RemovedPayingKey` has been deprecated from 8.0.0 chain version" RemovedPayingKey UpdatedPolyxLimit + AcceptedSubsidy + ApprovedSubsidy + # RelayedTx (already defined in utility) + RemovedPendingSubsidy + RemovedSubsidy + SubsidyDebited ## rewards ## + "`ItnRewardClaimed` has been deprecated from 6.0.0 chain version" ItnRewardClaimed ## contracts ## @@ -627,8 +677,11 @@ enum EventIdEnum { Cleared ## testutils ## + "`MockInvestorUIDCreated` has been deprecated from 6.0.0 chain version" MockInvestorUIDCreated + "`DidStatus` has been deprecated from 7.1.0 chain version" DidStatus + "`CddStatus` has been deprecated from 7.1.0 chain version" CddStatus ## nft ## @@ -637,23 +690,37 @@ enum EventIdEnum { NftCollectionCreated "`RedeemedNFT` has been deprecated from 6.0.0 chain version" RedeemedNFT + "`NFTPortfolioUpdated` has been renamed as `NFTHoldingsUpdated` from 8.0.0 chain version" NFTPortfolioUpdated + NFTHoldingsUpdated - ## confidential assets ## + ## confidential assets (events replaced by `confidentialAssets` pallet in 8.0.0) ## + "`AccountCreated` has been deprecated from 8.0.0 chain version" AccountCreated # ConfidentialAssetCreated -> uses existing AssetCreated + "`AccountDeposit` has been deprecated from 8.0.0 chain version" AccountDeposit + "`TransactionCreated` has been deprecated from 8.0.0 chain version" TransactionCreated + "`TransactionAffirmed` has been deprecated from 8.0.0 chain version" TransactionAffirmed + "`AccountWithdraw` has been deprecated from 8.0.0 chain version" AccountWithdraw + "`TransactionRejected` has been deprecated from 8.0.0 chain version" TransactionRejected + "`TransactionExecuted` has been deprecated from 8.0.0 chain version" TransactionExecuted + "`AccountDepositIncoming` has been deprecated from 8.0.0 chain version" AccountDepositIncoming + "`AccountAssetFrozen` has been deprecated from 8.0.0 chain version" AccountAssetFrozen + "`AccountAssetUnfrozen` has been deprecated from 8.0.0 chain version" AccountAssetUnfrozen # AssetFrozen -> defined before # AssetUnfrozen -> defined before + "`Burned` is still active in balances pallet" Burned + "`FundsMoved` has been deprecated from 8.0.0 chain version" FundsMoved ## electionprovidermultiphase ## @@ -664,8 +731,57 @@ enum EventIdEnum { Slashed # SolutionStored -> defined before in staking + ## historical ## + RootsPruned + RootStored + + ## revive ## + # ContractEmitted (already defined in contracts) + EthExtrinsicRevert + # Instantiated (already defined in contracts) + + ## confidentialassets ## + AccountAssetRegistered + AccountCurveTreeRootUpdated + AccountRegistered + AccountStateLeafInserted + # AssetCreated + AssetCurveTreeRootUpdated + AssetMinted + AssetStateLeafUpdated + AssetUpdated + EncryptionKeyRegistered + FeeAccountCurveTreeRootUpdated + FeeAccountDeposited + FeeAccountStateLeafInserted + FeeAccountUpdated + FeeAccountWithdrawn + MediatorAffirmed + MediatorRejected + ReceiverAffirmationReverted + ReceiverAffirmed + ReceiverClaimed + RelayerBatchedProofs + SenderAffirmationReverted + SenderAffirmed + SenderCounterUpdated + SettlementCreated + SettlementStatusUpdated + + ## multiBlockMigrations ## + HistoricCleared + MigrationAdvanced + MigrationCompleted + MigrationFailed + MigrationSkipped + UpgradeCompleted + UpgradeFailed + UpgradeStarted + + "`Approval` is now active for assets pallet" + Approval + ## deprecated ## - Approval @deprecated AssetPurchased @deprecated AssetRuleChanged @deprecated AssetRuleRemoved @deprecated @@ -806,10 +922,12 @@ enum CallIdEnum { ## identity ## cdd_register_did cdd_register_did_with_cdd + "`invalidate_cdd_claims` has been removed from 8.0.0 chain version" invalidate_cdd_claims "`remove_secondary_keys_old` has been deprecated from 6.0.0 chain version" remove_secondary_keys_old accept_primary_key + "`change_cdd_requirement_for_mk_rotation` has been removed from 8.0.0 chain version" change_cdd_requirement_for_mk_rotation join_identity_as_key leave_identity_as_key @@ -837,11 +955,16 @@ enum CallIdEnum { set_secondary_key_permissions remove_secondary_keys register_custom_claim_type + # register_did (already defined in testutils) + "`create_child_identities` has been removed from 8.0.0 chain version" create_child_identities + "`create_child_identity` has been removed from 8.0.0 chain version" create_child_identity + "`unlink_child_identity` has been removed from 8.0.0 chain version" unlink_child_identity + self_register_did - ## cddserviceproviders ## + ## cddserviceproviders/didregistrars ## set_active_members_limit disable_member add_member @@ -1066,6 +1189,7 @@ enum CallIdEnum { sudo_unchecked_weight set_key sudo_as + remove_key ## asset ## "`register_ticker` has been renamed to `register_unique_ticker` from 7.0.0 chain version" @@ -1232,6 +1356,7 @@ enum CallIdEnum { affirm_instruction "`affirm_instruction_v2` has been removed from 8.0.0 chain version" affirm_instruction_v2 + "`withdraw_affirmation` has been removed from 8.0.0 chain version" withdraw_affirmation "`withdraw_affirmation_v2` has been deprecated from 6.0.0 chain version" withdraw_affirmation_v2 @@ -1278,13 +1403,18 @@ enum CallIdEnum { affirm_with_receipts_with_count affirm_instruction_with_count reject_instruction_with_count + "`withdraw_affirmation_with_count` has been removed from 8.0.0 chain version" withdraw_affirmation_with_count add_instruction_with_mediators affirm_instruction_as_mediator + "`withdraw_affirmation_as_mediator` has been removed from 8.0.0 chain version" withdraw_affirmation_as_mediator reject_instruction_as_mediator add_and_affirm_with_mediators lock_instruction + set_mandatory_receiver_affirmation + transfer_funds + unlock_instruction ## statistics ## set_active_asset_stats @@ -1333,15 +1463,24 @@ enum CallIdEnum { create_and_change_custom_group ## relayer ## + "`set_paying_key` has been removed from 8.0.0 chain version" set_paying_key + "`accept_paying_key` has been removed from 8.0.0 chain version" accept_paying_key + "`remove_paying_key` has been removed from 8.0.0 chain version" remove_paying_key update_polyx_limit increase_polyx_limit decrease_polyx_limit + approve_subsidy + revoke_subsidy + accept_subsidy + remove_subsidy ## rewards ## + "`claim_itn_reward` has been removed from 8.0.0 chain version" claim_itn_reward + "`set_itn_reward_status` has been removed from 8.0.0 chain version" set_itn_reward_status ## contracts ## @@ -1363,7 +1502,9 @@ enum CallIdEnum { allow_identity_to_create_portfolios revoke_create_portfolios_permission create_custody_portfolio + "`instantiate_with_code_as_primary_key` has been removed from 8.0.0 chain version" instantiate_with_code_as_primary_key + "`instantiate_with_hash_as_primary_key` has been removed from 8.0.0 chain version" instantiate_with_hash_as_primary_key upgrade_api @@ -1375,46 +1516,76 @@ enum CallIdEnum { ensure_updated ## testutils ## + "`register_did` is now active in identity pallet" register_did + "`mock_cdd_register_did` has been removed from 8.0.0 chain version" mock_cdd_register_did + "`get_my_did` has been removed from 8.0.0 chain version" get_my_did + "`get_cdd_of` has been removed from 8.0.0 chain version" get_cdd_of ## nft ## create_nft_collection issue_nft redeem_nft + transfer_nft - ## confidential assets ## + ## confidential assets (calls replaced by `confidentialAssets` pallet in 8.0.0) ## + "`add_mediator_account` has been removed from 8.0.0 chain version" add_mediator_account # create_confidential_asset # create_asset -> removing as defined before # mint_confidential_asset -> mint + "`mint` has been removed from 8.0.0 chain version" mint + "`add_transaction` has been removed from 8.0.0 chain version" add_transaction + "`sender_affirm_transaction` has been removed from 8.0.0 chain version" sender_affirm_transaction + "`receiver_affirm_transaction` has been removed from 8.0.0 chain version" receiver_affirm_transaction + "`mediator_affirm_transaction` has been removed from 8.0.0 chain version" mediator_affirm_transaction + "`sender_unaffirm_transaction` has been removed from 8.0.0 chain version" sender_unaffirm_transaction + "`receiver_unaffirm_transaction` has been removed from 8.0.0 chain version" receiver_unaffirm_transaction + "`mediator_unaffirm_transaction` has been removed from 8.0.0 chain version" mediator_unaffirm_transaction + "`create_account` has been removed from 8.0.0 chain version" create_account + "`affirm_transactions` has been removed from 8.0.0 chain version" affirm_transactions + "`execute_transaction` has been removed from 8.0.0 chain version" execute_transaction + "`apply_incoming_balance` has been removed from 8.0.0 chain version" apply_incoming_balance + "`apply_incoming_balances` has been removed from 8.0.0 chain version" apply_incoming_balances + "`burn` is still active in balances pallet" burn + "`reject_transaction` has been removed from 8.0.0 chain version" reject_transaction + "`set_account_asset_frozen` has been removed from 8.0.0 chain version" set_account_asset_frozen + "`set_asset_frozen` has been removed from 8.0.0 chain version" set_asset_frozen + "`move_assets` has been removed from 8.0.0 chain version" move_assets - ## state trie migration ## + ## state trie migration (pallet removed in 8.0.0) ## + "`continue_migrate` has been removed from 8.0.0 chain version" continue_migrate + "`control_auto_migration` has been removed from 8.0.0 chain version" control_auto_migration + "`force_set_progress` has been removed from 8.0.0 chain version" force_set_progress + "`migrate_custom_child` has been removed from 8.0.0 chain version" migrate_custom_child + "`migrate_custom_top` has been removed from 8.0.0 chain version" migrate_custom_top + "`set_signed_max_limits` has been removed from 8.0.0 chain version" set_signed_max_limits ## electionprovidermultiphase ## @@ -1422,7 +1593,7 @@ enum CallIdEnum { set_emergency_election_result set_minimum_untrusted_score submit - sumbit_unsigned + submit_unsigned ## validators ## added from 8.0.0 chain version # add_permissioned_validator (already was defined in staking) @@ -1433,6 +1604,59 @@ enum CallIdEnum { # set_commission_cap (already was defined in staking) # update_permissioned_validator_intended_count (already was defined in staking) + ### beefy ### + report_double_voting + report_double_voting_unsigned + set_new_genesis + report_fork_voting + report_fork_voting_unsigned + report_future_block_voting + report_future_block_voting_unsigned + + ### revive ### + eth_transact + # call (already defined in contracts) + # instantiate (already defined in contracts) + # instantiate_with_code (already defined in contracts) + eth_instantiate_with_code + eth_call + eth_substrate_call + # upload_code (already defined in contracts) + # remove_code (already defined in contracts) + # set_code (already defined in contracts) + map_account + unmap_account + dispatch_as_fallback_account + + ## multiblockmigrations ## + force_set_cursor + force_set_active_cursor + force_onboard_mbms + clear_historic + + ## confidentialassets ## + register_accounts + register_encryption_keys + # create_asset + register_account_assets + mint_asset + create_settlement + sender_affirmation + receiver_affirmation + mediator_affirmation + sender_update_counter + sender_revert_affirmation + receiver_revert_affirmation + receiver_claim + batched_settlement + register_fee_accounts + topup_fee_accounts + submit_batched_proofs + relayer_submit_batched_proofs + execute_instant_settlement + instant_sender_affirmation + instant_receiver_affirmation + ## deprecated ## accept_authorization @deprecated accept_master_key @deprecated @@ -2590,10 +2814,14 @@ type AssetTransaction @entity { fromPortfolio: Portfolio "`fromAccount` will be populated when asset transaction has initiated directly from an account" fromAccount: String + "`fromIdentityId` is the DID of the sender, present for transfers and redemptions. Stored separately from portfolio/account to preserve historical queryability when accounts change identity" + fromIdentity: Identity @index(unique: false) "`toPortfolioId` will be null in transactions where either the Asset was redeemed or the receiver is an account" toPortfolio: Portfolio "`toAccount` will be populated when asset transaction has settled directly into an account" toAccount: String + "`toIdentityId` is the DID of the receiver, present for issuances and transfers. Stored separately from portfolio/account to preserve historical queryability when accounts change identity" + toIdentity: Identity @index(unique: false) "`amount` is the number of fungible tokens involved in this transaction" amount: BigInt "`nftIds` are the IDs of the non-fungible tokens involved in this transaction" diff --git a/src/mappings/entities/assets/mapAsset.ts b/src/mappings/entities/assets/mapAsset.ts index d907e9e4..98efac55 100644 --- a/src/mappings/entities/assets/mapAsset.ts +++ b/src/mappings/entities/assets/mapAsset.ts @@ -13,10 +13,10 @@ import { SecurityIdentifier, } from '../../../types'; import { + AssetHolderDetails, bytesToString, camelToSnakeCase, coerceHexToString, - emptyDid, getAssetId, getAssetType, getBigIntValue, @@ -25,11 +25,12 @@ import { getFirstKeyFromJson, getFirstValueFromJson, getNumberValue, - getPortfolioIdOrAccount, + getPortfolioId, getSecurityIdentifiers, getStringArrayValue, getTextValue, is7xChain, + rawAssetHolderToAssetHolder, serializeTicker, } from '../../../utils'; import { processInstructionId } from '../settlements/mapSettlement'; @@ -63,17 +64,8 @@ export const createAssetTransaction = ( datetime: Date, details: Pick< AssetTransaction, - | 'assetId' - | 'fromPortfolioId' - | 'fromAccount' - | 'toPortfolioId' - | 'toAccount' - | 'amount' - | 'fundingRound' - | 'nftIds' - | 'instructionId' - | 'instructionMemo' - >, + 'assetId' | 'amount' | 'fundingRound' | 'nftIds' | 'instructionId' | 'instructionMemo' + > & { fromHolder?: AssetHolderDetails; toHolder?: AssetHolderDetails }, blockEventId: string, eventId?: EventIdEnum, extrinsic?: SubstrateExtrinsic @@ -93,11 +85,42 @@ export const createAssetTransaction = ( default: EventIdEnum.Transfer, }; + let fromIdentityId: string; + let fromAccount: string; + let fromPortfolioId: string; + let toIdentityId: string; + let toAccount: string; + let toPortfolioId: string; + + if (details.fromHolder) { + fromIdentityId = details.fromHolder.identityId; + if ('account' in details.fromHolder) { + fromAccount = details.fromHolder.account; + } else { + fromPortfolioId = getPortfolioId(details.fromHolder); + } + } + + if (details.toHolder) { + toIdentityId = details.toHolder.identityId; + if ('account' in details.toHolder) { + toAccount = details.toHolder.account; + } else { + toPortfolioId = getPortfolioId(details.toHolder); + } + } + return AssetTransaction.create({ id: blockEventId, ...details, // adding in fall back for `eventId` helps in identifying cases where utility.batchAtomic is used as extrinsic eventId: callToEventMappings[callId] || eventId || callToEventMappings['default'], + fromPortfolioId, + fromAccount, + fromIdentityId, + toPortfolioId, + toAccount, + toIdentityId, eventIdx, extrinsicIdx: extrinsic?.idx, datetime, @@ -154,7 +177,7 @@ export const handleAssetCreated = async (event: SubstrateEvent): Promise = const ownerId = getTextValue(rawOwnerDid); - const ticker = !is7xChain(block) ? serializeTicker(rawAssetId) : undefined; + const ticker = is7xChain(block) ? undefined : serializeTicker(rawAssetId); /** * Name isn't present on the old events so we need to query storage. @@ -321,6 +344,7 @@ export const handleIssued = async (event: SubstrateEvent): Promise => { id: blockEventId, assetId, toPortfolioId: `${asset.ownerId}/0`, // Issued Assets are added to default Portfolio for the issuer + toIdentityId: issuerDid, eventId: EventIdEnum.Issued, eventIdx, amount: issuedAmount, @@ -413,35 +437,29 @@ export const handleAssetOwnershipTransferred = async (event: SubstrateEvent): Pr export const handleAssetTransfer = async (event: SubstrateEvent): Promise => { const { params, blockId, block, eventIdx, extrinsic, blockEventId } = extractArgs(event); - const [, rawAssetId, rawFromPortfolio, rawToPortfolio, rawAmount] = params; + const [, rawAssetId, rawFromHolder, rawToHolder, rawAmount] = params; const assetId = await getAssetId(rawAssetId, block); const transferAmount = getBigIntValue(rawAmount); - const { - account: fromAccount, - portfolioId: fromPortfolioId, - identityId: fromDid, - } = getPortfolioIdOrAccount(rawFromPortfolio); - const { - account: toAccount, - portfolioId: toPortfolioIdValue, - identityId: toDid, - } = getPortfolioIdOrAccount(rawToPortfolio); - - let toPortfolioId = toPortfolioIdValue; - const promises = []; + let fromHolder: AssetHolderDetails | undefined; + let fromDid: string; + let toDid: string; - if (fromDid && fromDid === emptyDid) { - return; // We ignore the transfer case when Asset tokens are issued + if (!rawFromHolder.isEmpty) { + fromHolder = await rawAssetHolderToAssetHolder(rawFromHolder, block, blockId); + fromDid = fromHolder.identityId; } - if (toDid && toDid === emptyDid) { - // case for Assets being redeemed - toPortfolioId = null; + let toHolder: AssetHolderDetails | undefined; + + if (!rawToHolder.isEmpty) { + toHolder = await rawAssetHolderToAssetHolder(rawToHolder, block, blockId); } let instructionId: string; - if (fromPortfolioId && toPortfolioId) { + const promises = []; + + if (fromHolder && toHolder) { const asset = await getAsset(assetId); asset.totalTransfers += BigInt(1); asset.updatedBlockId = blockId; @@ -478,10 +496,8 @@ export const handleAssetTransfer = async (event: SubstrateEvent): Promise block.timestamp, { assetId, - fromPortfolioId, - fromAccount, - toPortfolioId, - toAccount, + fromHolder, + toHolder, amount: transferAmount, instructionId, }, @@ -494,100 +510,132 @@ export const handleAssetTransfer = async (event: SubstrateEvent): Promise await Promise.all(promises); }; -export const handleAssetBalanceUpdated = async (event: SubstrateEvent): Promise => { - const { params, blockId, eventIdx, block, extrinsic, blockEventId } = extractArgs(event); - const [, rawAssetId, rawAmount, rawFromPortfolio, rawToPortfolio, rawUpdateReason] = params; +const updateAssetHolderAmount = async ( + assetId: string, + identityId: string, + blockId: string, + delta: bigint, + promises: Promise[] +): Promise => { + const holder = await getAssetHolder(assetId, identityId, blockId); + holder.amount += delta; + holder.updatedBlockId = blockId; + promises.push(holder.save()); +}; - let fromDid: string, toDid: string, fromAccount: string, toAccount: string; +type UpdateReasonResult = { + eventId: EventIdEnum; + fundingRoundName?: string; + instructionId?: string; + instructionMemo?: string; + assetDelta: { totalSupply?: bigint; totalTransfers?: bigint }; +}; - const assetId = await getAssetId(rawAssetId, block); - const asset = await getAsset(assetId); +const processUpdateReason = ( + updateReason: string, + value: unknown, + transferAmount: bigint, + eventIdx: number, + blockEvents: SubstrateEvent['event'][] +): UpdateReasonResult => { + if (updateReason === 'issued') { + const { fundingRoundName: rawName } = value as { fundingRoundName: string }; + return { + eventId: EventIdEnum.Issued, + fundingRoundName: coerceHexToString(rawName), + assetDelta: { totalSupply: transferAmount }, + }; + } - let fromPortfolioId: string; - let toPortfolioId: string; - let fundingRoundName: string; - let instructionId: string; - let instructionMemo: string; + if (updateReason === 'redeemed') { + return { + eventId: EventIdEnum.Redeemed, + assetDelta: { totalSupply: -transferAmount }, + }; + } - const promises = []; + if (updateReason === 'transferred') { + const details = value as { + instructionId: number | null; + instructionMemo: `0x${string}` | null; + }; + const instructionId = details.instructionId ? details.instructionId.toString() : null; + const instructionMemo = details.instructionMemo + ? coerceHexToString(details.instructionMemo) + : null; + const eventId = instructionId + ? EventIdEnum.Transfer + : ((blockEvents[eventIdx + 1] as unknown as { method: string })?.method as EventIdEnum) ?? + EventIdEnum.Unknown; + return { eventId, instructionId, instructionMemo, assetDelta: { totalTransfers: BigInt(1) } }; + } + + return { eventId: undefined, assetDelta: {} }; +}; + +export const handleAssetBalanceUpdated = async (event: SubstrateEvent): Promise => { + const { params, blockId, eventIdx, block, extrinsic, blockEventId } = extractArgs(event); + const [, rawAssetId, rawAmount, rawFromHolder, rawToHolder, rawUpdateReason] = params; + const assetId = await getAssetId(rawAssetId, block); + const asset = await getAsset(assetId); const transferAmount = getBigIntValue(rawAmount); + const promises: Promise[] = []; - if (!rawFromPortfolio.isEmpty) { - ({ - account: fromAccount, - portfolioId: fromPortfolioId, - identityId: fromDid, - } = getPortfolioIdOrAccount(rawFromPortfolio)); + let fromHolder: AssetHolderDetails | undefined; - const fromHolder = await getAssetHolder(assetId, fromDid, blockId); - fromHolder.amount = fromHolder.amount - transferAmount; - fromHolder.updatedBlockId = blockId; - promises.push(fromHolder.save()); + if (!rawFromHolder.isEmpty) { + fromHolder = await rawAssetHolderToAssetHolder(rawFromHolder, block, blockId); + await updateAssetHolderAmount( + assetId, + fromHolder.identityId, + blockId, + -transferAmount, + promises + ); } + let toHolder: AssetHolderDetails | undefined; - if (!rawToPortfolio.isEmpty) { - ({ - account: toAccount, - portfolioId: toPortfolioId, - identityId: toDid, - } = getPortfolioIdOrAccount(rawToPortfolio)); - - const toHolder = await getAssetHolder(assetId, toDid, blockId); - toHolder.amount = toHolder.amount + transferAmount; - toHolder.updatedBlockId = blockId; - promises.push(toHolder.save()); + if (!rawToHolder.isEmpty) { + toHolder = await rawAssetHolderToAssetHolder(rawToHolder, block, blockId); + await updateAssetHolderAmount(assetId, toHolder.identityId, blockId, transferAmount, promises); } const updateReason = getFirstKeyFromJson(rawUpdateReason); - const value = getFirstValueFromJson(rawUpdateReason); - let eventId: EventIdEnum; - if (updateReason === 'issued') { - eventId = EventIdEnum.Issued; - const issuedReason = value as unknown as { fundingRoundName: string }; - fundingRoundName = coerceHexToString(issuedReason.fundingRoundName); - - if (fundingRoundName) { - promises.push( - createFunding( - blockId, - assetId, - blockEventId, - block.timestamp, - fundingRoundName, - transferAmount, - transferAmount - ) - ); - } + const { eventId, fundingRoundName, instructionId, instructionMemo, assetDelta } = + processUpdateReason( + updateReason, + value, + transferAmount, + eventIdx, + block.events as unknown as SubstrateEvent['event'][] + ); - asset.totalSupply += transferAmount; - asset.updatedBlockId = blockId; - promises.push(asset.save()); - } else if (updateReason === 'redeemed') { - eventId = EventIdEnum.Redeemed; - asset.totalSupply -= transferAmount; + if (assetDelta.totalSupply !== undefined) { + asset.totalSupply += assetDelta.totalSupply; + } + if (assetDelta.totalTransfers !== undefined) { + asset.totalTransfers += assetDelta.totalTransfers; + } + if (assetDelta.totalSupply !== undefined || assetDelta.totalTransfers !== undefined) { asset.updatedBlockId = blockId; promises.push(asset.save()); - } else if (updateReason === 'transferred') { - const details = value as unknown as { - instructionId: number | null; - instructionMemo: `0x${string}` | null; - }; - - instructionId = details.instructionId ? details.instructionId.toString() : null; - instructionMemo = details.instructionMemo ? coerceHexToString(details.instructionMemo) : null; - - eventId = EventIdEnum.Transfer; - if (!instructionId) { - eventId = block.events[eventIdx + 1]?.event?.method as EventIdEnum; - } + } - asset.totalTransfers += BigInt(1); - asset.updatedBlockId = blockId; - promises.push(asset.save()); + if (fundingRoundName) { + promises.push( + createFunding( + blockId, + assetId, + blockEventId, + block.timestamp, + fundingRoundName, + transferAmount, + transferAmount + ) + ); } promises.push( @@ -597,10 +645,8 @@ export const handleAssetBalanceUpdated = async (event: SubstrateEvent): Promise< block.timestamp, { assetId, - fromPortfolioId, - fromAccount, - toPortfolioId, - toAccount, + fromHolder, + toHolder, amount: transferAmount, fundingRound: fundingRoundName, instructionId, diff --git a/src/mappings/entities/assets/mapNfts.ts b/src/mappings/entities/assets/mapNfts.ts index 99e959d5..44d25627 100644 --- a/src/mappings/entities/assets/mapNfts.ts +++ b/src/mappings/entities/assets/mapNfts.ts @@ -2,13 +2,14 @@ import { Codec } from '@polkadot/types/types'; import { SubstrateEvent } from '@subql/types'; import { EventIdEnum, NftHolder } from '../../../types'; import { + AssetHolderDetails, bytesToString, getAssetId, getFirstKeyFromJson, getFirstValueFromJson, getNftId, - getPortfolioIdOrAccount, getTextValue, + rawAssetHolderToAssetHolder, } from '../../../utils'; import { extractArgs, getAsset } from './../common'; import { createAssetTransaction } from './mapAsset'; @@ -48,27 +49,23 @@ export const handleNftCollectionCreated = async (event: SubstrateEvent): Promise return asset.save(); }; -export const handleNftPortfolioUpdates = async (event: SubstrateEvent): Promise => { +export const handleNftHoldingsUpdates = async (event: SubstrateEvent): Promise => { const { params, blockId, eventIdx, block, extrinsic, blockEventId } = extractArgs(event); - const [rawId, rawNftId, rawFromPortfolio, rawToPortfolio, rawUpdateReason] = params; - - let fromDid, fromPortfolioId; - let fromAccount: string; - if (!rawFromPortfolio.isEmpty) { - ({ - account: fromAccount, - portfolioId: fromPortfolioId, - identityId: fromDid, - } = getPortfolioIdOrAccount(rawFromPortfolio)); + const [rawId, rawNftId, rawFromHolder, rawToHolder, rawUpdateReason] = params; + + let fromHolder: AssetHolderDetails | undefined; + let fromDid: string; + let toDid: string; + + if (!rawFromHolder.isEmpty) { + fromHolder = await rawAssetHolderToAssetHolder(rawFromHolder, block, blockId); + fromDid = fromHolder.identityId; } - let toDid, toPortfolioId; - let toAccount: string; - if (!rawToPortfolio.isEmpty) { - ({ - account: toAccount, - portfolioId: toPortfolioId, - identityId: toDid, - } = getPortfolioIdOrAccount(rawToPortfolio)); + let toHolder: AssetHolderDetails | undefined; + + if (!rawToHolder.isEmpty) { + toHolder = await rawAssetHolderToAssetHolder(rawToHolder, block, blockId); + toDid = toHolder.identityId; } const promises = []; @@ -84,7 +81,6 @@ export const handleNftPortfolioUpdates = async (event: SubstrateEvent): Promise< let instructionId: string; let instructionMemo: string; - let eventId: EventIdEnum; if (reason === 'issued') { eventId = EventIdEnum.IssuedNFT; @@ -134,11 +130,9 @@ export const handleNftPortfolioUpdates = async (event: SubstrateEvent): Promise< block.timestamp, { assetId, - fromPortfolioId, - fromAccount, - toPortfolioId, - toAccount, - nftIds: ids.map(id => BigInt(id)), + fromHolder, + toHolder, + nftIds: ids.map(BigInt), instructionId, instructionMemo, }, diff --git a/src/mappings/entities/assets/mapStatistics.ts b/src/mappings/entities/assets/mapStatistics.ts index 472c2133..6434e943 100644 --- a/src/mappings/entities/assets/mapStatistics.ts +++ b/src/mappings/entities/assets/mapStatistics.ts @@ -123,7 +123,7 @@ const getTransferConditions = (item: Codec, assetId: string): Attributes { - return x !== null ? BigInt(x) : null; + return x == null ? null : BigInt(x); }; return transferConditions.map( diff --git a/src/mappings/entities/block/mapChainUpgrade.ts b/src/mappings/entities/block/mapChainUpgrade.ts index 6fee7d77..84b1080a 100644 --- a/src/mappings/entities/block/mapChainUpgrade.ts +++ b/src/mappings/entities/block/mapChainUpgrade.ts @@ -48,12 +48,12 @@ export default async (substrateEvent: SubstrateEvent): Promise => { `Current runtime transaction version - ${oldTxVersion}. New runtime tx version - ${txVersion}` ); - if (txVersion !== oldTxVersion) { + if (txVersion === oldTxVersion) { + logger.info(`Transaction version was not changed for the chain upgrade`); + } else { logger.info(`Major chain upgrade found with transaction version upgraded `); await handleMultiSigProposalDeleted(substrateEvent.block); oldTxVersion = txVersion; - } else { - logger.info(`Transaction version was not changed for the chain upgrade`); } oldSpecVersion = specVersion; diff --git a/src/mappings/entities/identities/mapIdentities.ts b/src/mappings/entities/identities/mapIdentities.ts index f34ca059..92a9857e 100644 --- a/src/mappings/entities/identities/mapIdentities.ts +++ b/src/mappings/entities/identities/mapIdentities.ts @@ -19,7 +19,7 @@ import { getEventParams, getNumberValue, getTextValue, - meshPortfolioToPortfolioOrAccount, + meshPortfolioToAssetHolder, } from '../../../utils'; import { Attributes, extractArgs } from './../common'; import { createPortfolio, getPortfolio } from './mapPortfolio'; @@ -274,9 +274,9 @@ const getPermissions = (accountPermissions: Record): Permission portfolios = { type, values: portfolioPermissions[type]?.map(meshPortfolio => { - const data = meshPortfolioToPortfolioOrAccount(meshPortfolio); - if ('accountId' in data) { - return { did: data.identityId, accountId: data.accountId }; + const data = meshPortfolioToAssetHolder(meshPortfolio); + if ('account' in data) { + return { did: data.identityId, account: data.account }; } return { did: data.identityId, number: data.number }; }), @@ -447,10 +447,7 @@ export const handleSecondaryKeysAdded = async (event: SubstrateEvent): Promise => { - const { params, extrinsic, blockId, block, blockEventId } = extractArgs(event); - const [, rawFromPortfolio, rawToPortfolio, rawFundDescription, rawMemo] = params; - const address = getSignerAddress(extrinsic); - const fromData = getPortfolioOrAccountValue(rawFromPortfolio); - const toData = getPortfolioOrAccountValue(rawToPortfolio); +type AssetMovementArgs = { + blockEventId: string; + blockId: string; + address: string; + fromHolder: AssetHolderDetails; + toHolder: AssetHolderDetails; + assetType: string; + fundDescription: unknown; + memo: string | undefined; + block: SubstrateBlock; +}; +export const mapAssetMovement = async ({ + blockEventId, + blockId, + address, + fromHolder, + toHolder, + assetType, + fundDescription, + memo, + block, +}: AssetMovementArgs): Promise => { let fromPortfolioId: string, toPortfolioId: string, fromAccount: string, toAccount: string; - if ('accountId' in fromData) { - ({ accountId: fromAccount } = fromData); + if ('account' in fromHolder) { + ({ account: fromAccount } = fromHolder); } else { - fromPortfolioId = `${fromData.identityId}/${fromData.number}`; + fromPortfolioId = `${fromHolder.identityId}/${fromHolder.number}`; } - if ('accountId' in toData) { - ({ accountId: toAccount } = toData); + if ('account' in toHolder) { + ({ account: toAccount } = toHolder); } else { - toPortfolioId = `${toData.identityId}/${toData.number}`; + toPortfolioId = `${toHolder.identityId}/${toHolder.number}`; } let assetId: string, amount: bigint, nftIds: bigint[]; let type: PortfolioMovementTypeEnum; - const assetType = getFirstKeyFromJson(rawFundDescription); - const fundDescription = getFirstValueFromJson(rawFundDescription); if (assetType === 'fungible') { - const description = fundDescription as unknown as { + const description = fundDescription as { ticker?: string; assetId?: string; amount: number; @@ -228,18 +243,16 @@ export const handleFundsMovedBetweenPortfolios = async (event: SubstrateEvent): amount = BigInt(description.amount); type = PortfolioMovementTypeEnum.Fungible; } else if (assetType === 'nonFungible') { - const description = fundDescription as unknown as { + const description = fundDescription as { ticker?: string; assetId?: string; ids: number[]; }; - nftIds = description.ids.map(id => BigInt(id)); + nftIds = description.ids.map(BigInt); assetId = await getAssetId(description.ticker ?? description.assetId, block); type = PortfolioMovementTypeEnum.NonFungible; } - const memo = bytesToString(rawMemo); - await PortfolioMovement.create({ id: blockEventId, fromId: fromPortfolioId, @@ -256,3 +269,27 @@ export const handleFundsMovedBetweenPortfolios = async (event: SubstrateEvent): updatedBlockId: blockId, }).save(); }; + +export const handleFundsMovedBetweenPortfolios = async (event: SubstrateEvent): Promise => { + const { params, extrinsic, blockId, block, blockEventId } = extractArgs(event); + const [, rawFromPortfolio, rawToPortfolio, rawFundDescription, rawMemo] = params; + const address = getSignerAddress(extrinsic); + const fromHolder = rawPortfolioToAssetHolder(rawFromPortfolio); + const toHolder = rawPortfolioToAssetHolder(rawToPortfolio); + + const assetType = getFirstKeyFromJson(rawFundDescription); + const fundDescription = getFirstValueFromJson(rawFundDescription); + const memo = bytesToString(rawMemo); + + await mapAssetMovement({ + blockEventId, + blockId, + address, + fromHolder, + toHolder, + assetType, + fundDescription, + memo, + block, + }); +}; diff --git a/src/mappings/entities/settlements/mapSettlement.ts b/src/mappings/entities/settlements/mapSettlement.ts index e3acf211..b17ba19a 100644 --- a/src/mappings/entities/settlements/mapSettlement.ts +++ b/src/mappings/entities/settlements/mapSettlement.ts @@ -1,9 +1,10 @@ import { AnyTuple, Codec } from '@polkadot/types/types'; -import { SubstrateEvent } from '@subql/types'; +import { SubstrateBlock, SubstrateEvent } from '@subql/types'; import { Instruction, InstructionEvent, Leg } from '../../../types'; import { addIfNotIncludes, bytesToString, + coerceHexToString, getDateValue, getErrorDetails, getLegsValue, @@ -16,10 +17,11 @@ import { getTextValue, is7xChain, padId, + rawAssetHolderToAssetHolder, removeIfIncludes, } from '../../../utils'; import { extractArgs, HandlerArgs } from '../common'; -import { createPortfolioIfNotExists } from '../identities/mapPortfolio'; +import { createPortfolioIfNotExists, mapAssetMovement } from '../identities/mapPortfolio'; import { AffirmStatusEnum, EventIdEnum, @@ -128,8 +130,8 @@ const getInstruction = async (instructionId: string): Promise => { return instruction; }; -const getPartyId = (instructionId: string, did: string, isMediator: boolean) => - `${instructionId}/${did}/${isMediator}`; +const getPartyId = (instructionId: string, did: string, account: string, isMediator: boolean) => + `${instructionId}/${account ?? did}/${isMediator}`; const createInstructionParty = async ( instructionId: string, @@ -139,7 +141,7 @@ const createInstructionParty = async ( ): Promise => { const promises = Object.keys(parties).map(did => InstructionParty.create({ - id: getPartyId(instructionId, did, isMediator), + id: getPartyId(instructionId, did, undefined, isMediator), instructionId, isMediator, identity: did, @@ -154,13 +156,14 @@ const createInstructionParty = async ( const mapAutomaticAffirmation = async ( params: Codec[], + block: SubstrateBlock, blockId: string, eventIndex: number, blockEventId: string ): Promise<[InstructionEvent, InstructionAffirmation]> => { - const [, rawPortfolio, rawInstructionId] = params; + const [, rawHolder, rawInstructionId] = params; const instructionId = processInstructionId(rawInstructionId); - const { identity, account, portfolio } = getPortfolioOrAccount(rawPortfolio); + const { identity, account, portfolio } = await getPortfolioOrAccount(rawHolder, block, blockId); const automaticAffirmationEvent = InstructionEvent.create({ id: blockEventId, @@ -175,7 +178,7 @@ const mapAutomaticAffirmation = async ( createdEventId: blockEventId, }); - const partyId = getPartyId(instructionId, identity, false); + const partyId = getPartyId(instructionId, identity, account, false); const affirmation = await InstructionAffirmation.get(partyId); @@ -235,7 +238,7 @@ export const handleInstructionCreated = async (event: SubstrateEvent): Promise= 6000000 || specName === 'polymesh_private_dev') { - legs = await getSettlementLeg(rawLegs, block); + legs = await getSettlementLeg(rawLegs, block, blockId); } else { legs = await getLegsValue(rawLegs, block); } @@ -266,16 +269,24 @@ export const handleInstructionCreated = async (event: SubstrateEvent): Promise { - const addParty = (did: string, portfolio: number): void => { - if (portfolio !== undefined) { - parties[did] = [...(parties[did] || []), portfolio]; - } else { + const addParty = (did: string, portfolio?: number): void => { + if (portfolio === undefined) { parties[did] = undefined; + } else { + parties[did] = [...(parties[did] || []), portfolio]; } }; - addParty(leg.from, leg.fromPortfolio); - addParty(leg.to, leg.toPortfolio); + if (leg.fromAccount) { + addParty(leg.fromAccount); + } else { + addParty(leg.from, leg.fromPortfolio); + } + if (leg.toAccount) { + addParty(leg.toAccount); + } else { + addParty(leg.to, leg.toPortfolio); + } }); const instructionCreatedEvent = InstructionEvent.create({ @@ -310,12 +321,12 @@ export const handleInstructionCreated = async (event: SubstrateEvent): Promise => { - const { params, extrinsic, eventIdx, blockId, blockEventId } = extractArgs(event); + const { params, extrinsic, eventIdx, blockId, block, blockEventId } = extractArgs(event); const address = getSignerAddress(extrinsic); const [, rawPortfolio, rawInstructionId] = params; const instructionId = processInstructionId(rawInstructionId); - const { identity, account, portfolio } = getPortfolioOrAccount(rawPortfolio); + const { identity, account, portfolio } = await getPortfolioOrAccount( + rawPortfolio, + block, + blockId + ); - const partyId = getPartyId(instructionId, identity, false); + const partyId = getPartyId(instructionId, identity, account, false); let affirmation = await InstructionAffirmation.get(partyId); @@ -387,14 +402,18 @@ export const handleInstructionUpdate = async (event: SubstrateEvent): Promise => { - const { params, eventIdx, blockId, blockEventId } = extractArgs(event); + const { params, eventIdx, blockId, block, blockEventId } = extractArgs(event); const [, rawPortfolio, rawInstructionId] = params; const instructionId = processInstructionId(rawInstructionId); - const { identity, account, portfolio } = getPortfolioOrAccount(rawPortfolio); + const { identity, account, portfolio } = await getPortfolioOrAccount( + rawPortfolio, + block, + blockId + ); - const partyId = getPartyId(instructionId, identity, false); + const partyId = getPartyId(instructionId, identity, account, false); const affirmation = await InstructionAffirmation.get(partyId); const promises = [ @@ -434,6 +453,7 @@ export const handleAffirmationWithdrawn = async (event: SubstrateEvent): Promise export const handleAutomaticAffirmation = async (event: SubstrateEvent): Promise => { const { params, + block, blockId, block: { specVersion }, eventIdx, @@ -449,6 +469,7 @@ export const handleAutomaticAffirmation = async (event: SubstrateEvent): Promise if (specVersion >= 6003001 || specName === 'polymesh_private_dev') { const [instructionEvent, instructionAffirmation] = await mapAutomaticAffirmation( params, + block, blockId, eventIdx, blockEventId @@ -474,7 +495,7 @@ export const handleInstructionRejected = async (event: SubstrateEvent): Promise< const isMediator = instruction.mediators.includes(identityId); - const partyId = getPartyId(instructionId, identityId, isMediator); + const partyId = getPartyId(instructionId, identityId, undefined, isMediator); const rejection = InstructionAffirmation.create({ id: partyId, @@ -595,7 +616,7 @@ export const handleMediatorAffirmationReceived = async (event: SubstrateEvent): const instructionId = processInstructionId(rawInstructionId); const expiry = getDateValue(expiryOpt); - const partyId = getPartyId(instructionId, identityId, true); + const partyId = getPartyId(instructionId, identityId, undefined, true); const mediatorAffirmation = InstructionAffirmation.create({ id: partyId, instructionId, @@ -641,7 +662,7 @@ export const handleMediatorAffirmationWithdrawn = async (event: SubstrateEvent): }); await Promise.all([ - InstructionAffirmation.remove(getPartyId(instructionId, identityId, true)), + InstructionAffirmation.remove(getPartyId(instructionId, identityId, undefined, true)), affirmationWithdrawnEvent.save(), ]); }; @@ -707,7 +728,7 @@ export const handleReceiptClaimed = async (event: SubstrateEvent): Promise updatedBlockId: blockId, }); - const partyId = getPartyId(instructionId, identityId, false); + const partyId = getPartyId(instructionId, identityId, undefined, false); const affirmation = InstructionAffirmation.create({ id: `${partyId}/${signer}/${uid}`, @@ -738,7 +759,9 @@ export const handleReceiptClaimed = async (event: SubstrateEvent): Promise const party = await InstructionParty.get(partyId); - if (!party) { + if (party) { + await Promise.all(promises); + } else { await Promise.all([ InstructionParty.create({ id: partyId, @@ -750,7 +773,33 @@ export const handleReceiptClaimed = async (event: SubstrateEvent): Promise }).save(), ...promises, ]); - } else { - await Promise.all(promises); } }; + +export const handleFundsTransferred = async (event: SubstrateEvent): Promise => { + const { params, extrinsic, blockId, block, blockEventId } = extractArgs(event); + const [, rawFromHolder, rawToHolder, rawFund] = params; + + const address = getSignerAddress(extrinsic); + + const [fromHolder, toHolder] = await Promise.all([ + rawAssetHolderToAssetHolder(rawFromHolder, block, blockId), + rawAssetHolderToAssetHolder(rawToHolder, block, blockId), + ]); + + const { description, memo } = JSON.parse(rawFund.toString()); + const assetType = Object.keys(description)[0]; + const fundDescription = description[assetType]; + + await mapAssetMovement({ + blockEventId, + blockId, + address, + fromHolder, + toHolder, + assetType, + fundDescription, + memo: memo ? coerceHexToString(memo) : undefined, + block, + }); +}; diff --git a/src/mappings/serializeLikeHarvester.ts b/src/mappings/serializeLikeHarvester.ts index 3dca13e7..c30202ae 100644 --- a/src/mappings/serializeLikeHarvester.ts +++ b/src/mappings/serializeLikeHarvester.ts @@ -101,6 +101,14 @@ export const serializeLikeHarvester = ( } else if (type === 'Balance') { return parseInt(item.toString()); // This might not work for big numbers but it's the way the harvester does it. } else if (type === 'ElectionScore') { + // In newer Substrate versions ElectionScore became a named struct (SpNposElectionsElectionScore) + // rather than a plain tuple/array of BN values. Fall back to the struct serializer in that case. + if (isStruct(item)) { + const types = extractStructTypes(item as unknown as Struct, rawType); + return fromEntries((item as unknown as Struct).entries(), (v, _, k) => + serializeLikeHarvester(v, types[k], logFoundType) + ); + } return (item as unknown as BN[]).map(n => parseInt(n.toString())); // This might not work for big numbers but that's the way the harvester does it. } else if (isTuple(item)) { const types = extractTupleTypes(item, type); diff --git a/src/utils/accounts.ts b/src/utils/accounts.ts index 383f501c..1b2deb4b 100644 --- a/src/utils/accounts.ts +++ b/src/utils/accounts.ts @@ -1,6 +1,9 @@ import { decodeAddress, encodeAddress } from '@polkadot/keyring'; import { Codec } from '@polkadot/types/types'; import { u8aToHex } from '@polkadot/util'; +import { createIdentity, createPermissions } from '../mappings/entities/identities/mapIdentities'; +import { Account, EventIdEnum, Identity } from '../types'; +import { getFirstKeyFromJson, getFirstValueFromJson } from './common'; export const serializeAccount = (item: Codec): string | undefined => { const s = item.toString(); @@ -14,3 +17,59 @@ export const serializeAccount = (item: Codec): string | undefined => { export const getAccountKey = (item: string, ss58Format?: number): string => { return encodeAddress(item.toString(), ss58Format); }; + +export const getOrCreateAccount = async ( + address: string, + blockId: string, + datetime: Date +): Promise => { + let account = await Account.get(address); + + if (account) { + return account; + } + + const rawKeyRecord = (await api.query.identity.keyRecords(address)) as unknown as Codec; + + if (rawKeyRecord.isEmpty) { + return; + } + + const did = getFirstValueFromJson(rawKeyRecord); + const type = getFirstKeyFromJson(rawKeyRecord); + + const eventId = EventIdEnum.AccountCreated; + + const identity = await Identity.get(did); + + if (!identity || (type === 'primaryKey' && identity.primaryAccount !== address)) { + await createIdentity( + { did, eventId, datetime, primaryAccount: address, secondaryKeysFrozen: false }, + blockId + ); + } + + await createPermissions( + { + datetime, + transactionGroups: [], + }, + address, + blockId + ); + + account = Account.create({ + id: address, + eventId: EventIdEnum.AccountCreated, + datetime, + identityId: did, + permissionsId: address, + address, + createdBlockId: blockId, + updatedBlockId: blockId, + }); + + await account.save(); + + return account; +}; diff --git a/src/utils/assets.ts b/src/utils/assets.ts index 3029bc83..0c8cfe9c 100644 --- a/src/utils/assets.ts +++ b/src/utils/assets.ts @@ -12,7 +12,6 @@ import { is7xChain, serializeTicker, } from './common'; -import { getPortfolioOrAccountValue } from './portfolios'; export interface AssetIdWithTicker { assetId: string; @@ -155,20 +154,3 @@ export const getAssetIdWithTicker = async ( ticker, }; }; - -export const getPortfolioIdOrAccount = ( - item: Codec -): { identityId: string; account?: string; portfolioId?: string } => { - const data = getPortfolioOrAccountValue(item); - - let portfolioId: string | undefined; - let account: string | undefined; - let identityId: string; - if ('accountId' in data) { - ({ accountId: account, identityId } = data); - } else { - ({ identityId } = data); - portfolioId = `${data.identityId}/${data.number}`; - } - return { account, portfolioId, identityId }; -}; diff --git a/src/utils/distributions.ts b/src/utils/distributions.ts index 16e51150..47058daf 100644 --- a/src/utils/distributions.ts +++ b/src/utils/distributions.ts @@ -3,7 +3,7 @@ import { SubstrateBlock } from '@subql/types'; import { Distribution } from '../types'; import { getAssetId } from './assets'; import { END_OF_TIME, extractBigInt, getBigIntValue } from './common'; -import { meshPortfolioToPortfolioOrAccount } from './portfolios'; +import { meshPortfolioToAssetHolder } from './portfolios'; export const getDistributionValue = async ( item: Codec, @@ -14,8 +14,8 @@ export const getDistributionValue = async ( > | null> => { const { from, currency, amount, remaining, ...rest } = JSON.parse(item.toString()); - const fromData = meshPortfolioToPortfolioOrAccount(from); - if ('accountId' in fromData) { + const fromData = meshPortfolioToAssetHolder(from); + if ('account' in fromData) { return null; } diff --git a/src/utils/portfolios.ts b/src/utils/portfolios.ts index 3c92b3ab..114436f6 100644 --- a/src/utils/portfolios.ts +++ b/src/utils/portfolios.ts @@ -1,11 +1,15 @@ import { Codec } from '@polkadot/types/types'; import { SubstrateBlock } from '@subql/types'; import { Distribution, Portfolio } from '../types'; +import { getOrCreateAccount } from './accounts'; import { getAssetId } from './assets'; -import { extractNumber } from './common'; +import { extractNumber, is8xChain } from './common'; + +export type AccountDetails = { identityId: string; account: string }; +export type PortfolioDetails = Pick; + +export type AssetHolderDetails = AccountDetails | PortfolioDetails; -export type PortfolioOrAccount = Pick & - (Pick | { accountId: string }); export interface MeshPortfolio { did: string; kind: @@ -16,28 +20,92 @@ export interface MeshPortfolio { | { accountId: string }; } -export const meshPortfolioToPortfolioOrAccount = ( - meshPortfolio: MeshPortfolio -): PortfolioOrAccount => { +export type MeshAssetHolder = { account: string } | { portfolio: MeshPortfolio }; + +/** + * Till 7.4 chain, portfolio support all Default Portfolio, Numbered Portfolio and even account type portfolio + */ +export const meshPortfolioToAssetHolder = (meshPortfolio: MeshPortfolio): AssetHolderDetails => { let number = 0; + + // extract account address if ('accountId' in meshPortfolio.kind) { return { identityId: meshPortfolio.did, - accountId: meshPortfolio.kind.accountId, + account: meshPortfolio.kind.accountId, }; } + // extract portfolio number if ('user' in meshPortfolio.kind) { number = meshPortfolio.kind.user; } return { identityId: meshPortfolio.did, - number: number || 0, + number: number || 0, // 0 maps to default portfolio }; }; -export const getPortfolioOrAccountValue = (item: Codec): PortfolioOrAccount => { +/** + * Directly converts raw codec to AssetHolder type + */ +export const rawPortfolioToAssetHolder = (item: Codec): AssetHolderDetails => { const meshPortfolio = JSON.parse(item.toString()); - return meshPortfolioToPortfolioOrAccount(meshPortfolio); + return meshPortfolioToAssetHolder(meshPortfolio); +}; + +/** + * Convert parsed asset holder into AssetHolder + * For account type asset holder, it fetches the did info from DB. If not present uses chain storage to figure out DID + */ + +export const meshAssetHolderToAssetHolder = async ( + meshAssetHolder: MeshAssetHolder, + blockId: string, + datetime: Date +): Promise => { + if ('account' in meshAssetHolder) { + const account = await getOrCreateAccount(meshAssetHolder.account, blockId, datetime); + // @prashantasdeveloper need to confirm if we can safely assume that account will be present + return { account: meshAssetHolder.account, identityId: account?.identityId }; + } + + const { did, kind } = meshAssetHolder.portfolio; + + let number = 0; + if ('user' in kind) { + number = kind.user; + } + return { identityId: did, number }; +}; + +/** + * Dual compatible method to deduce AssetHolder details + * For 8.x chain, parses asset holder directly + * For older chain, presumes that value is MeshPortfolio and parses as Portfolio + */ +export const extractAssetHolder = async ( + value: MeshAssetHolder | MeshPortfolio, + block: SubstrateBlock, + blockId: string +): Promise => { + if (is8xChain(block)) { + return await meshAssetHolderToAssetHolder(value as MeshAssetHolder, blockId, block.timestamp); + } + return meshPortfolioToAssetHolder(value as MeshPortfolio); +}; + +/** + * Dual compatible method to deduce AssetHolder details + * For 8.x chain, parses asset holder directly + * For older chain, presumes that value is MeshPortfolio and parses as Portfolio + */ +export const rawAssetHolderToAssetHolder = async ( + rawItem: Codec, + block: SubstrateBlock, + blockId: string +): Promise => { + const item = JSON.parse(rawItem.toString()); + return extractAssetHolder(item, block, blockId); }; export const getPortfolioId = ({ diff --git a/src/utils/settlements.ts b/src/utils/settlements.ts index 7e638a64..5baba6b4 100644 --- a/src/utils/settlements.ts +++ b/src/utils/settlements.ts @@ -14,7 +14,7 @@ import { } from '../utils'; import { Leg } from './../types'; import { InstructionTypeEnum } from './../types/enums'; -import { getPortfolioOrAccountValue, meshPortfolioToPortfolioOrAccount } from './portfolios'; +import { extractAssetHolder, meshPortfolioToAssetHolder } from './portfolios'; export type LegDetails = Omit, 'instructionId' | 'addresses'>; @@ -30,20 +30,20 @@ export const getLegsValue = async (item: Codec, block: SubstrateBlock): Promise< const { from: rawFromPortfolio, to: rawToPortfolio, amount } = leg; const { assetId, ticker } = await getAssetIdWithTicker(leg.asset, block); - const fromData = meshPortfolioToPortfolioOrAccount(rawFromPortfolio); - const toData = meshPortfolioToPortfolioOrAccount(rawToPortfolio); + const fromData = meshPortfolioToAssetHolder(rawFromPortfolio); + const toData = meshPortfolioToAssetHolder(rawToPortfolio); let fromAccount: string | undefined, toAccount: string | undefined; // for accounts let from: string, to: string; // for dids let fromPortfolio: number | undefined, toPortfolio: number | undefined; - if ('accountId' in fromData) { - ({ accountId: fromAccount, identityId: from } = fromData); + if ('account' in fromData) { + ({ account: fromAccount, identityId: from } = fromData); } else { ({ identityId: from, number: fromPortfolio } = fromData); } - if ('accountId' in toData) { - ({ accountId: toAccount, identityId: to } = toData); + if ('account' in toData) { + ({ account: toAccount, identityId: to } = toData); } else { ({ identityId: to, number: toPortfolio } = toData); } @@ -89,22 +89,23 @@ const processOnChainLeg = async ( legValue: any, legType: LegTypeEnum, legIndex: number, - block: SubstrateBlock + block: SubstrateBlock, + blockId: string ): Promise => { - const fromData = meshPortfolioToPortfolioOrAccount(legValue.sender); - const toData = meshPortfolioToPortfolioOrAccount(legValue.receiver); + const fromData = await extractAssetHolder(legValue.sender, block, blockId); + const toData = await extractAssetHolder(legValue.receiver, block, blockId); let from: string, to: string; let fromAccount: string | undefined, toAccount: string | undefined; let fromPortfolio: number | undefined, toPortfolio: number | undefined; - if ('accountId' in fromData) { - ({ accountId: fromAccount, identityId: from } = fromData); + if ('account' in fromData) { + ({ account: fromAccount, identityId: from } = fromData); } else { ({ identityId: from, number: fromPortfolio } = fromData); } - if ('accountId' in toData) { - ({ accountId: toAccount, identityId: to } = toData); + if ('account' in toData) { + ({ account: toAccount, identityId: to } = toData); } else { ({ identityId: to, number: toPortfolio } = toData); } @@ -141,7 +142,8 @@ const processOnChainLeg = async ( export const getSettlementLeg = async ( item: Codec, - block: SubstrateBlock + block: SubstrateBlock, + blockId: string ): Promise => { const legs: any[] = JSON.parse(item.toString()); @@ -157,7 +159,9 @@ export const getSettlementLeg = async ( if (legType === LegTypeEnum.OffChain) { legDetails.push(processOffChainLeg(legValue, legIndex)); } else { - legDetails.push(await processOnChainLeg(legValue, legType as LegTypeEnum, legIndex, block)); + legDetails.push( + await processOnChainLeg(legValue, legType as LegTypeEnum, legIndex, block, blockId) + ); } legIndex++; @@ -197,15 +201,18 @@ export const getSettlementTypeDetails = ( }; }; -export const getPortfolioOrAccount = ( - rawPortfolio: Codec -): { identity: string; account?: string; portfolio?: number } => { - const data = getPortfolioOrAccountValue(rawPortfolio); +export const getPortfolioOrAccount = async ( + rawItem: Codec, + block: SubstrateBlock, + blockId: string +): Promise<{ identity: string; account?: string; portfolio?: number }> => { + const item = JSON.parse(rawItem.toString()); + const data = await extractAssetHolder(item, block, blockId); let account: string | undefined; let portfolio: number | undefined; let identityId: string; - if ('accountId' in data) { - ({ accountId: account, identityId } = data); + if ('account' in data) { + ({ account, identityId } = data); } else { ({ identityId, number: portfolio } = data); } diff --git a/src/utils/stos.ts b/src/utils/stos.ts index 65cd523c..b25c9212 100644 --- a/src/utils/stos.ts +++ b/src/utils/stos.ts @@ -11,7 +11,7 @@ import { getDateValue, hexToString, } from './common'; -import { getPortfolioId, meshPortfolioToPortfolioOrAccount } from './portfolios'; +import { getPortfolioId, meshPortfolioToAssetHolder } from './portfolios'; export const getFundraiserDetails = async ( item: Codec, @@ -19,14 +19,10 @@ export const getFundraiserDetails = async ( ): Promise, 'stoId' | 'name'> | null> => { const { creator: creatorId, start, end, status, tiers, ...rest } = JSON.parse(item.toString()); - const offeringPortfolio = meshPortfolioToPortfolioOrAccount( - extractValue(rest, 'offering_portfolio') - ); - const raisingPortfolio = meshPortfolioToPortfolioOrAccount( - extractValue(rest, 'raising_portfolio') - ); + const offeringPortfolio = meshPortfolioToAssetHolder(extractValue(rest, 'offering_portfolio')); + const raisingPortfolio = meshPortfolioToAssetHolder(extractValue(rest, 'raising_portfolio')); - if ('accountId' in offeringPortfolio || 'accountId' in raisingPortfolio) { + if ('account' in offeringPortfolio || 'account' in raisingPortfolio) { return null; } diff --git a/yarn.lock b/yarn.lock index ff2fac1c..8f5ff5aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,9 +22,9 @@ __metadata: languageName: node linkType: hard -"@apollo/client@npm:^3.11.2, @apollo/client@npm:^3.9.11": - version: 3.13.4 - resolution: "@apollo/client@npm:3.13.4" +"@apollo/client@npm:^3.14.0": + version: 3.14.0 + resolution: "@apollo/client@npm:3.14.0" dependencies: "@graphql-typed-document-node/core": "npm:^3.1.1" "@wry/caches": "npm:^1.0.0" @@ -54,13 +54,13 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: 10c0/3fd98ddcdeabcc7500cf4186b234edc99e8bf09bca4becc6932642db816207c9dc9b4ad7b2f874b8c7e29563218f373ad4876910f8db4c787bac75c98f13bbaf + checksum: 10c0/38776832627def88f707131f9fe394e10b067c67ce84102664cd8f922229671fc5d61bcff702c0c403972f6a57998f243210c681bcda96c68b2b3c82dbb1c789 languageName: node linkType: hard -"@apollo/client@npm:^3.14.0": - version: 3.14.0 - resolution: "@apollo/client@npm:3.14.0" +"@apollo/client@npm:^3.9.11": + version: 3.13.4 + resolution: "@apollo/client@npm:3.13.4" dependencies: "@graphql-typed-document-node/core": "npm:^3.1.1" "@wry/caches": "npm:^1.0.0" @@ -90,7 +90,7 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: 10c0/38776832627def88f707131f9fe394e10b067c67ce84102664cd8f922229671fc5d61bcff702c0c403972f6a57998f243210c681bcda96c68b2b3c82dbb1c789 + checksum: 10c0/3fd98ddcdeabcc7500cf4186b234edc99e8bf09bca4becc6932642db816207c9dc9b4ad7b2f874b8c7e29563218f373ad4876910f8db4c787bac75c98f13bbaf languageName: node linkType: hard @@ -1367,6 +1367,13 @@ __metadata: languageName: node linkType: hard +"@borewit/text-codec@npm:^0.2.1": + version: 0.2.2 + resolution: "@borewit/text-codec@npm:0.2.2" + checksum: 10c0/2d3fb132bc6a132914a8fbf8e9ff2fa1ead210ecc395b28bb7355bd7719548a5e351ffe39f21c3bee8048f6cabd99eabd404bb5cc809cad9cba25abed19d271f + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -2247,6 +2254,13 @@ __metadata: languageName: node linkType: hard +"@isaacs/cliui@npm:^9.0.0": + version: 9.0.0 + resolution: "@isaacs/cliui@npm:9.0.0" + checksum: 10c0/971063b7296419f85053dacd0a0285dcadaa3dfc139228b23e016c1a9848121ad4aa5e7fcca7522062014e1eb6239a7424188b9f2cba893a79c90aae5710319c + languageName: node + linkType: hard + "@isaacs/fs-minipass@npm:^4.0.0": version: 4.0.1 resolution: "@isaacs/fs-minipass@npm:4.0.1" @@ -2601,9 +2615,9 @@ __metadata: languageName: node linkType: hard -"@modelcontextprotocol/sdk@npm:^1.17.2": - version: 1.21.1 - resolution: "@modelcontextprotocol/sdk@npm:1.21.1" +"@modelcontextprotocol/sdk@npm:1.24.3": + version: 1.24.3 + resolution: "@modelcontextprotocol/sdk@npm:1.24.3" dependencies: ajv: "npm:^8.17.1" ajv-formats: "npm:^3.0.1" @@ -2614,16 +2628,20 @@ __metadata: eventsource-parser: "npm:^3.0.0" express: "npm:^5.0.1" express-rate-limit: "npm:^7.5.0" + jose: "npm:^6.1.1" pkce-challenge: "npm:^5.0.0" raw-body: "npm:^3.0.0" - zod: "npm:^3.23.8" - zod-to-json-schema: "npm:^3.24.1" + zod: "npm:^3.25 || ^4.0" + zod-to-json-schema: "npm:^3.25.0" peerDependencies: "@cfworker/json-schema": ^4.1.1 + zod: ^3.25 || ^4.0 peerDependenciesMeta: "@cfworker/json-schema": optional: true - checksum: 10c0/5493af701bf7131abd375c1769195220d5d9452373f9ec4ed01782e46bf5ad59537d5bf1926c813dc435a4b26bc6fa91e66c45c81eb250e3165a9bb53eba57af + zod: + optional: false + checksum: 10c0/91746ddf347d61815c09d2a09d3dc7564576b417f7349c33c672a7e3c69dcd215a52a066b02fcd9eaab1cdeab60cc827f3382b28b2ab68e7fc46d2e1f3824cad languageName: node linkType: hard @@ -2634,16 +2652,18 @@ __metadata: languageName: node linkType: hard -"@nestjs/common@npm:^11.0.7": - version: 11.0.11 - resolution: "@nestjs/common@npm:11.0.11" +"@nestjs/common@npm:^11.0.16": + version: 11.1.21 + resolution: "@nestjs/common@npm:11.1.21" dependencies: + file-type: "npm:21.3.4" iterare: "npm:1.2.1" + load-esm: "npm:1.0.3" tslib: "npm:2.8.1" uid: "npm:2.0.2" peerDependencies: - class-transformer: "*" - class-validator: "*" + class-transformer: ">=0.4.1" + class-validator: ">=0.13.2" reflect-metadata: ^0.1.12 || ^0.2.0 rxjs: ^7.1.0 peerDependenciesMeta: @@ -2651,7 +2671,7 @@ __metadata: optional: true class-validator: optional: true - checksum: 10c0/9b8a8ed7298bcbb73eef28fb73d65c98c05fce7c7382cd25c79d90235d4849ee56c646966753edd3b3564d0a66745130dd828e78015394e99c5dfab4a6761d95 + checksum: 10c0/534c2b2f05f4825e4d9374423607d4e4dc42398e110145a4a5d493ed4e4cdf7d8eba0a95abd17c091280f8628db00195b835db92bbc5a309b90d37630fd85782 languageName: node linkType: hard @@ -2748,7 +2768,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.9.7, @noble/curves@npm:~1.9.0": +"@noble/curves@npm:1.9.7, @noble/curves@npm:~1.9.0, @noble/curves@npm:~1.9.2": version: 1.9.7 resolution: "@noble/curves@npm:1.9.7" dependencies: @@ -3087,9 +3107,9 @@ __metadata: languageName: node linkType: hard -"@oclif/core@npm:^4.3.3": - version: 4.8.0 - resolution: "@oclif/core@npm:4.8.0" +"@oclif/core@npm:^4.8.0": + version: 4.11.0 + resolution: "@oclif/core@npm:4.11.0" dependencies: ansi-escapes: "npm:^4.3.2" ansis: "npm:^3.17.0" @@ -3101,7 +3121,7 @@ __metadata: indent-string: "npm:^4.0.0" is-wsl: "npm:^2.2.0" lilconfig: "npm:^3.1.3" - minimatch: "npm:^9.0.5" + minimatch: "npm:^10.2.5" semver: "npm:^7.7.3" string-width: "npm:^4.2.3" supports-color: "npm:^8" @@ -3109,7 +3129,7 @@ __metadata: widest-line: "npm:^3.1.0" wordwrap: "npm:^1.0.0" wrap-ansi: "npm:^7.0.0" - checksum: 10c0/83347c86250390b9c53d7eeb4f85adcc57578827b2de65be606b609290f4101f24b4245bd9c1dbeaca10a5e29c3fc68eaa3b5efa5f801d222e4f8e59691e8a86 + checksum: 10c0/ad775d4a7afab14b0ea8380773b46b074068ff1dabd1accdbbd10ad907561c41b2c48d5e8b33c9840d4de00c00e438fc8088cc37ec3faae53c8a0c3bcf0b7ffb languageName: node linkType: hard @@ -3443,21 +3463,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/api-augment@npm:15.8.1" - dependencies: - "@polkadot/api-base": "npm:15.8.1" - "@polkadot/rpc-augment": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-augment": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - tslib: "npm:^2.8.1" - checksum: 10c0/e9e81cdbc7bc4b8c686c3757bd025875aee57179f5a72cf4fec4b893c5f120be7c2fe7e101778ce0a3d109e8d7fc7cf6ac453030dff7300d9880b040cb2353f2 - languageName: node - linkType: hard - "@polkadot/api-augment@npm:16.5.2": version: 16.5.2 resolution: "@polkadot/api-augment@npm:16.5.2" @@ -3473,16 +3478,18 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-base@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/api-base@npm:15.8.1" +"@polkadot/api-augment@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/api-augment@npm:16.5.6" dependencies: - "@polkadot/rpc-core": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - rxjs: "npm:^7.8.1" + "@polkadot/api-base": "npm:16.5.6" + "@polkadot/rpc-augment": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-augment": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/c70a62ea44fee77d00ea30bff80cdd4bb6c7e69549832e4178244af36c6d6c754ec2b073297a66f11da3329bfa4096bf3470b782be7be818c8259e5094d093d9 + checksum: 10c0/aa6c0c88ca9861e5e1895dfcde9be5084b82d9036af07e45f4b5f7f0cc984dba740c703cc7fc15ae2f631c1be1b526b94f564b507e884815976bf47f4e6e8bcf languageName: node linkType: hard @@ -3499,21 +3506,16 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-derive@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/api-derive@npm:15.8.1" - dependencies: - "@polkadot/api": "npm:15.8.1" - "@polkadot/api-augment": "npm:15.8.1" - "@polkadot/api-base": "npm:15.8.1" - "@polkadot/rpc-core": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - "@polkadot/util-crypto": "npm:^13.4.3" +"@polkadot/api-base@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/api-base@npm:16.5.6" + dependencies: + "@polkadot/rpc-core": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10c0/adf350d1fd77b5a27b1e7a4a50afa46eb1d71bcd7ac1eb62c882224b63395ebb24067fa990aa4bbaa6e481bde77470d4b434f4724b585f45e2732bd9194364bf + checksum: 10c0/6ef61777d9a3d0dedade23d856193d578609bd7587e2c71a258befc0fa12a89d3503b4667353cb0ba2c9fe33c2b5fa606d5ad2cdce195a884685f5fa00563a22 languageName: node linkType: hard @@ -3535,28 +3537,21 @@ __metadata: languageName: node linkType: hard -"@polkadot/api@npm:15.8.1, @polkadot/api@npm:^15.6.1": - version: 15.8.1 - resolution: "@polkadot/api@npm:15.8.1" - dependencies: - "@polkadot/api-augment": "npm:15.8.1" - "@polkadot/api-base": "npm:15.8.1" - "@polkadot/api-derive": "npm:15.8.1" - "@polkadot/keyring": "npm:^13.4.3" - "@polkadot/rpc-augment": "npm:15.8.1" - "@polkadot/rpc-core": "npm:15.8.1" - "@polkadot/rpc-provider": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-augment": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/types-create": "npm:15.8.1" - "@polkadot/types-known": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - "@polkadot/util-crypto": "npm:^13.4.3" - eventemitter3: "npm:^5.0.1" +"@polkadot/api-derive@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/api-derive@npm:16.5.6" + dependencies: + "@polkadot/api": "npm:16.5.6" + "@polkadot/api-augment": "npm:16.5.6" + "@polkadot/api-base": "npm:16.5.6" + "@polkadot/rpc-core": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" + "@polkadot/util-crypto": "npm:^14.0.3" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10c0/4e6cdae018172443052121ffdc751023786bbb62d5e9d81a987835f409b243096167d4fcaca2c64039f4fd0f46d7f47e73b68bb6f7890d22cb041c7c6ca315d6 + checksum: 10c0/a794c1ee520e3ad1c7dcf0920aaeea128b2a17096f91b7db03c30bd6437bf628dd5ccbf0753acf659045639156bcd0b9cb1eadac801e61b71d348ab262173eed languageName: node linkType: hard @@ -3585,17 +3580,28 @@ __metadata: languageName: node linkType: hard -"@polkadot/keyring@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/keyring@npm:13.4.3" - dependencies: - "@polkadot/util": "npm:13.4.3" - "@polkadot/util-crypto": "npm:13.4.3" - tslib: "npm:^2.8.0" - peerDependencies: - "@polkadot/util": 13.4.3 - "@polkadot/util-crypto": 13.4.3 - checksum: 10c0/3cffcbcee32ec4212f4ee69cd9dde4ea4875f456b748130a1dc4b318d1ac34550bbb95a67c2ab03d7162f81f8c33b15cf6c5204dad169f975141a65345c0d72a +"@polkadot/api@npm:16.5.6, @polkadot/api@npm:^16.4.7": + version: 16.5.6 + resolution: "@polkadot/api@npm:16.5.6" + dependencies: + "@polkadot/api-augment": "npm:16.5.6" + "@polkadot/api-base": "npm:16.5.6" + "@polkadot/api-derive": "npm:16.5.6" + "@polkadot/keyring": "npm:^14.0.3" + "@polkadot/rpc-augment": "npm:16.5.6" + "@polkadot/rpc-core": "npm:16.5.6" + "@polkadot/rpc-provider": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-augment": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/types-create": "npm:16.5.6" + "@polkadot/types-known": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" + "@polkadot/util-crypto": "npm:^14.0.3" + eventemitter3: "npm:^5.0.1" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.8.1" + checksum: 10c0/d3a78f6a6f37e9541fdf65d5f3bc3a2c57f23237771d533a2bf139a1de8d4f7259c5fb37aa8d25b81a3140386e4626acc21180de66664f8070339fa301bd19c2 languageName: node linkType: hard @@ -3613,14 +3619,17 @@ __metadata: languageName: node linkType: hard -"@polkadot/networks@npm:13.4.3, @polkadot/networks@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/networks@npm:13.4.3" +"@polkadot/keyring@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/keyring@npm:14.0.3" dependencies: - "@polkadot/util": "npm:13.4.3" - "@substrate/ss58-registry": "npm:^1.51.0" + "@polkadot/util": "npm:14.0.3" + "@polkadot/util-crypto": "npm:14.0.3" tslib: "npm:^2.8.0" - checksum: 10c0/a178369c8fef6fb32e5096a897b36a70dedd657ef198333223be9d36ca17ba0a26301c5896aa3d88a0a91a778eee63591f6b5884d630d79f32d81c3e191cf51d + peerDependencies: + "@polkadot/util": 14.0.3 + "@polkadot/util-crypto": 14.0.3 + checksum: 10c0/3b7b3823e8d2f321780ab449a57725035ecd068d429fa4ac1137471aec10696636f0b6beae40e2dd3b58463ae5ef515db2b2d4dc56fcca8078d9c24de1c720f1 languageName: node linkType: hard @@ -3635,16 +3644,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-augment@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/rpc-augment@npm:15.8.1" +"@polkadot/networks@npm:14.0.3, @polkadot/networks@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/networks@npm:14.0.3" dependencies: - "@polkadot/rpc-core": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - tslib: "npm:^2.8.1" - checksum: 10c0/4392a2692a3824e7a666e3c7af19753dbc66aca6ad9f9e20d8a917fa09f4b92c398ff154243ada8b35ff987e7d939d0199f373509bb7ddb0881df0e7fda53c3f + "@polkadot/util": "npm:14.0.3" + "@substrate/ss58-registry": "npm:^1.51.0" + tslib: "npm:^2.8.0" + checksum: 10c0/9568207781f4d0d430ff1d2e69f43c13b00eebb5834e8d635855275c44eb9c991ab6194dc5151fd52bba1cc1b7b4752527a2f562656e54756c2cab2a08d70ea7 languageName: node linkType: hard @@ -3661,17 +3668,16 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-core@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/rpc-core@npm:15.8.1" +"@polkadot/rpc-augment@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/rpc-augment@npm:16.5.6" dependencies: - "@polkadot/rpc-augment": "npm:15.8.1" - "@polkadot/rpc-provider": "npm:15.8.1" - "@polkadot/types": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - rxjs: "npm:^7.8.1" + "@polkadot/rpc-core": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/3fa9e6b7e79f20634102dad7f331f977b1aa35fecafe29b742ef1c0f86f0e1c134b0b36a7070b2a6ab21cf25b3bf121d27391410430f35fc1db3484c043c90f3 + checksum: 10c0/a9b2d0bed59794055da272b29771ae1b02b0929ed6ce7daf813f1a396972f8a31f80b74ffe76cd9ac0fa93f2c9c3271ba6e5245d3cf8e18f4c52a35e295e62a3 languageName: node linkType: hard @@ -3689,27 +3695,17 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-provider@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/rpc-provider@npm:15.8.1" - dependencies: - "@polkadot/keyring": "npm:^13.4.3" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-support": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - "@polkadot/util-crypto": "npm:^13.4.3" - "@polkadot/x-fetch": "npm:^13.4.3" - "@polkadot/x-global": "npm:^13.4.3" - "@polkadot/x-ws": "npm:^13.4.3" - "@substrate/connect": "npm:0.8.11" - eventemitter3: "npm:^5.0.1" - mock-socket: "npm:^9.3.1" - nock: "npm:^13.5.5" +"@polkadot/rpc-core@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/rpc-core@npm:16.5.6" + dependencies: + "@polkadot/rpc-augment": "npm:16.5.6" + "@polkadot/rpc-provider": "npm:16.5.6" + "@polkadot/types": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" + rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - dependenciesMeta: - "@substrate/connect": - optional: true - checksum: 10c0/2f2d4ca88208266f93ab95924c84a59360d267b3e2f87580168fda0b4709f1b00be47e628f65a67de3a3d0d75dc9aa22c8cd992d0085e16b4b3cf82e02d1b2cd + checksum: 10c0/a591fcd88fbbb2fd21e0f10dc126f1847d42147891719bb02fd22739dbeaf15cebefe0dcb99ad30a16a9526e72a60b3a69d9d5e6b68904ef5026de4f36b3986d languageName: node linkType: hard @@ -3737,6 +3733,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-provider@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/rpc-provider@npm:16.5.6" + dependencies: + "@polkadot/keyring": "npm:^14.0.3" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-support": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" + "@polkadot/util-crypto": "npm:^14.0.3" + "@polkadot/x-fetch": "npm:^14.0.3" + "@polkadot/x-global": "npm:^14.0.3" + "@polkadot/x-ws": "npm:^14.0.3" + "@substrate/connect": "npm:0.8.11" + eventemitter3: "npm:^5.0.1" + mock-socket: "npm:^9.3.1" + nock: "npm:^13.5.5" + tslib: "npm:^2.8.1" + dependenciesMeta: + "@substrate/connect": + optional: true + checksum: 10c0/d6d164ea07f4c9e63c2be851e396c491f5949ef0702d45ddc043b246dd607943a41174d2b061df067fe48dc60d73896fc8d1333f42250ec7077d3bb81b9a8724 + languageName: node + linkType: hard + "@polkadot/typegen@npm:^16.5.2": version: 16.5.2 resolution: "@polkadot/typegen@npm:16.5.2" @@ -3768,18 +3788,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-augment@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types-augment@npm:15.8.1" - dependencies: - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - tslib: "npm:^2.8.1" - checksum: 10c0/941f68d3d2949f971b1a64586dfe512976bd7e936eddc9c16ca52a4d73f665457d7a77431630c05ff6970482c847595a531f33a6056f55e531db714f03962ece - languageName: node - linkType: hard - "@polkadot/types-augment@npm:16.5.2": version: 16.5.2 resolution: "@polkadot/types-augment@npm:16.5.2" @@ -3792,14 +3800,15 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-codec@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types-codec@npm:15.8.1" +"@polkadot/types-augment@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types-augment@npm:16.5.6" dependencies: - "@polkadot/util": "npm:^13.4.3" - "@polkadot/x-bigint": "npm:^13.4.3" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/79a809d6676f2d223b1c785e0ed45b718155b638941888ffd9e4d9db7d996370598b3568a9f10b0373b92c5d7f5de116c086ece568c0ba315516f4f4cef699ae + checksum: 10c0/c81f6bdb704c38d1cd3ce18f3bb1550116455cbb12435293053c1406e0ecc08bad629c4535ac885d3e334eefe7db4a6729fff80af3b9027eb9d79dd957973d3f languageName: node linkType: hard @@ -3814,14 +3823,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-create@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types-create@npm:15.8.1" +"@polkadot/types-codec@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types-codec@npm:16.5.6" dependencies: - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" + "@polkadot/util": "npm:^14.0.3" + "@polkadot/x-bigint": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/b79af1c40b7dd6755928d2bcb8a1c661893c4d3cbb839f0be2e06b5123712c87c07456ae1741cd0aa08d39b4334ae54a359f0121ae8e993c4c61e022d2e364c1 + checksum: 10c0/197c49c894850b0b239a7f5c2792468d6302ee3927420bde6430b1cda833a4609f71616080fad2da6098d98c1118c02eff190b6e02b32ffa1afdccb3118da3b5 languageName: node linkType: hard @@ -3836,17 +3845,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-known@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types-known@npm:15.8.1" +"@polkadot/types-create@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types-create@npm:16.5.6" dependencies: - "@polkadot/networks": "npm:^13.4.3" - "@polkadot/types": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/types-create": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/e30fb30bb65d3c71e0e62977731bb16b00f9734d2f5e5194728a86b1553e4240f58ec38d1ace386fefbde33229a3721c5631cd1f516a165998c8aea7b5561df7 + checksum: 10c0/cc115c15a5e05934103dc3dae92ea73cf29a8178b142d17ce5c0cb97e2808b56109ac079fdb97d4ce5cc63e565350d758c7f29cf5aef149198af5ba484e87fc5 languageName: node linkType: hard @@ -3864,13 +3870,17 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-support@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types-support@npm:15.8.1" +"@polkadot/types-known@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types-known@npm:16.5.6" dependencies: - "@polkadot/util": "npm:^13.4.3" + "@polkadot/networks": "npm:^14.0.3" + "@polkadot/types": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/types-create": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/c5a1389f334533009d3ab2de78f5b5503e9a927b256d9cd68b29684a14c3b2f83cc4bfe47f9a41e499ccb9fa91a6867e6e4f6a2779c13c227bc2586dc35666c6 + checksum: 10c0/697e925be9c280e06c2e10eb5a70dc4ae07cb25586e3a9a2fe557a3fd0b108c49199231738bd1139953cde877a6759290645fbcd2a6256046e542f08eeafc9b2 languageName: node linkType: hard @@ -3884,19 +3894,13 @@ __metadata: languageName: node linkType: hard -"@polkadot/types@npm:15.8.1": - version: 15.8.1 - resolution: "@polkadot/types@npm:15.8.1" - dependencies: - "@polkadot/keyring": "npm:^13.4.3" - "@polkadot/types-augment": "npm:15.8.1" - "@polkadot/types-codec": "npm:15.8.1" - "@polkadot/types-create": "npm:15.8.1" - "@polkadot/util": "npm:^13.4.3" - "@polkadot/util-crypto": "npm:^13.4.3" - rxjs: "npm:^7.8.1" +"@polkadot/types-support@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types-support@npm:16.5.6" + dependencies: + "@polkadot/util": "npm:^14.0.3" tslib: "npm:^2.8.1" - checksum: 10c0/ebb9b9a1045331d663c8c2881863d6fd333d559e483c52aa8b1c0e89e9e523eff16980681b688ae002343e0b43abbb8bcaaccc89c3341a73cc14612ec3f091f4 + checksum: 10c0/4ec520fb81c55535438d2c5a98ea8ad56c526c21f4affbf976a417628768f26438a4bd16a973a8dbacb899f08a7aa73c24b5d623532771723126039b4c247db3 languageName: node linkType: hard @@ -3916,23 +3920,19 @@ __metadata: languageName: node linkType: hard -"@polkadot/util-crypto@npm:13.4.3, @polkadot/util-crypto@npm:^13.2.3, @polkadot/util-crypto@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/util-crypto@npm:13.4.3" +"@polkadot/types@npm:16.5.6": + version: 16.5.6 + resolution: "@polkadot/types@npm:16.5.6" dependencies: - "@noble/curves": "npm:^1.3.0" - "@noble/hashes": "npm:^1.3.3" - "@polkadot/networks": "npm:13.4.3" - "@polkadot/util": "npm:13.4.3" - "@polkadot/wasm-crypto": "npm:^7.4.1" - "@polkadot/wasm-util": "npm:^7.4.1" - "@polkadot/x-bigint": "npm:13.4.3" - "@polkadot/x-randomvalues": "npm:13.4.3" - "@scure/base": "npm:^1.1.7" - tslib: "npm:^2.8.0" - peerDependencies: - "@polkadot/util": 13.4.3 - checksum: 10c0/601b3d57eea400c9229d4766092659e8095eb7aa7329cdddb0f6bc325b312cf7bdaa24c86792ff1aae4b7d810130455c425a1336cf9066adbef66b5d923c6eeb + "@polkadot/keyring": "npm:^14.0.3" + "@polkadot/types-augment": "npm:16.5.6" + "@polkadot/types-codec": "npm:16.5.6" + "@polkadot/types-create": "npm:16.5.6" + "@polkadot/util": "npm:^14.0.3" + "@polkadot/util-crypto": "npm:^14.0.3" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.8.1" + checksum: 10c0/917bf03b0755b483f85cb1e662ae041f2b187f1f8559ea552064212fe29ae95cde55d037c6aa4bf5bdb17562ccb1e36b788c8571f2174be3996627820e59ef0e languageName: node linkType: hard @@ -3956,18 +3956,24 @@ __metadata: languageName: node linkType: hard -"@polkadot/util@npm:13.4.3": - version: 13.4.3 - resolution: "@polkadot/util@npm:13.4.3" +"@polkadot/util-crypto@npm:14.0.3, @polkadot/util-crypto@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/util-crypto@npm:14.0.3" dependencies: - "@polkadot/x-bigint": "npm:13.4.3" - "@polkadot/x-global": "npm:13.4.3" - "@polkadot/x-textdecoder": "npm:13.4.3" - "@polkadot/x-textencoder": "npm:13.4.3" - "@types/bn.js": "npm:^5.1.6" - bn.js: "npm:^5.2.1" + "@noble/curves": "npm:^1.3.0" + "@noble/hashes": "npm:^1.3.3" + "@polkadot/networks": "npm:14.0.3" + "@polkadot/util": "npm:14.0.3" + "@polkadot/wasm-crypto": "npm:^7.5.3" + "@polkadot/wasm-util": "npm:^7.5.3" + "@polkadot/x-bigint": "npm:14.0.3" + "@polkadot/x-randomvalues": "npm:14.0.3" + "@scure/base": "npm:^1.1.7" + "@scure/sr25519": "npm:^0.2.0" tslib: "npm:^2.8.0" - checksum: 10c0/06798e9799926abcf3b40fff1e659099ca8f8be378a41bda30f12b2cd8f90ce18b8a3feeb735c0cab8c183231cebec5fbbeb26046fa48ca7e825bebed5f79ddc + peerDependencies: + "@polkadot/util": 14.0.3 + checksum: 10c0/c63bc62e9c99b96a01402c4a3fe5839e0846a5d400249e1e032ebdd8881970004d20061da3af3ac8a3bfcc4d12194aa360211ac166f7cdb4549918447804f038 languageName: node linkType: hard @@ -3986,31 +3992,18 @@ __metadata: languageName: node linkType: hard -"@polkadot/util@npm:^13.2.3, @polkadot/util@npm:^13.4.3": - version: 13.5.4 - resolution: "@polkadot/util@npm:13.5.4" +"@polkadot/util@npm:14.0.3, @polkadot/util@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/util@npm:14.0.3" dependencies: - "@polkadot/x-bigint": "npm:13.5.4" - "@polkadot/x-global": "npm:13.5.4" - "@polkadot/x-textdecoder": "npm:13.5.4" - "@polkadot/x-textencoder": "npm:13.5.4" + "@polkadot/x-bigint": "npm:14.0.3" + "@polkadot/x-global": "npm:14.0.3" + "@polkadot/x-textdecoder": "npm:14.0.3" + "@polkadot/x-textencoder": "npm:14.0.3" "@types/bn.js": "npm:^5.1.6" bn.js: "npm:^5.2.1" tslib: "npm:^2.8.0" - checksum: 10c0/c7d2b5f1d6f0518a727b61be48fd60c2304771bbc6465653d1143548da9f7090c72df880985dbb1841225b593765096a779367a607a14f96486dedaca8e6035d - languageName: node - linkType: hard - -"@polkadot/wasm-bridge@npm:7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-bridge@npm:7.4.1" - dependencies: - "@polkadot/wasm-util": "npm:7.4.1" - tslib: "npm:^2.7.0" - peerDependencies: - "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10c0/8123c2d72ed24f6900185eb982f228789414c1458c8a291e17a9bd70cd36616f0e04fb40cb01e90d27223eb2ce81391af36f6e5b741cb6d9a83850bb5b9e038e + checksum: 10c0/31972be5f2c00658cd62e8d46a0d1ffd859cd73f34b957c9f57167d505190e23d045f81d728e2e89b85aeb9a8128f47f335e74623a21bc95a91e23c1d673554d languageName: node linkType: hard @@ -4027,14 +4020,16 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-crypto-asmjs@npm:7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-crypto-asmjs@npm:7.4.1" +"@polkadot/wasm-bridge@npm:7.5.4": + version: 7.5.4 + resolution: "@polkadot/wasm-bridge@npm:7.5.4" dependencies: + "@polkadot/wasm-util": "npm:7.5.4" tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10c0/7b19748b2ccdc2d964c137ae5eabdf022d7860c05981270c82392898ac6641d5602a2c2ea1059ef8f8929dd361a75fdb25bfaa7961f3dfcf497f987145c6850a + "@polkadot/x-randomvalues": "*" + checksum: 10c0/47958e2846527d1f492674fecb24121a060aeb93a558a34ef8b000844df015749391ee67b9bf39ee126e7f60a9582fb97db57d8a90fb0036dfb1d57608203d60 languageName: node linkType: hard @@ -4049,19 +4044,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-crypto-init@npm:7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-crypto-init@npm:7.4.1" +"@polkadot/wasm-crypto-asmjs@npm:7.5.4": + version: 7.5.4 + resolution: "@polkadot/wasm-crypto-asmjs@npm:7.5.4" dependencies: - "@polkadot/wasm-bridge": "npm:7.4.1" - "@polkadot/wasm-crypto-asmjs": "npm:7.4.1" - "@polkadot/wasm-crypto-wasm": "npm:7.4.1" - "@polkadot/wasm-util": "npm:7.4.1" tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10c0/fdcb96b4ba318680837d728b3c60c0bbbe326c9b8c15d70394cfbfdee06c95f8311b6fe13e4c862472faef4a2a9ccb218519fb15ad2f67d15b4cbb1b7c3eecba + checksum: 10c0/4dcbef752ce17f9bf5731743b55186a4b319aef590103bd3bb66a5627c0b66ec5f97beb3d1be96ac61c68c765b4f0c3d088d54b6cc5d1b651d14dc9243359b70 languageName: node linkType: hard @@ -4081,15 +4071,19 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-crypto-wasm@npm:7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-crypto-wasm@npm:7.4.1" +"@polkadot/wasm-crypto-init@npm:7.5.4": + version: 7.5.4 + resolution: "@polkadot/wasm-crypto-init@npm:7.5.4" dependencies: - "@polkadot/wasm-util": "npm:7.4.1" + "@polkadot/wasm-bridge": "npm:7.5.4" + "@polkadot/wasm-crypto-asmjs": "npm:7.5.4" + "@polkadot/wasm-crypto-wasm": "npm:7.5.4" + "@polkadot/wasm-util": "npm:7.5.4" tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10c0/2673a567cea785f7b9ec5b8371e05a53064651a9c64ac0fc45d7d5c8a080810cb1bd0f1950e2789d2c8895bcca35e9dc84b8a7b77c59b9b2d30beed8a964d043 + "@polkadot/x-randomvalues": "*" + checksum: 10c0/20422bd90e0a257987924fb06569e349736f86b818ec17d4082255c394f08d40d14fd692eaafdfc216fee3798d502e637d6f2bfacbf9c5f3d9f37e231d066de4 languageName: node linkType: hard @@ -4105,20 +4099,15 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-crypto@npm:^7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-crypto@npm:7.4.1" +"@polkadot/wasm-crypto-wasm@npm:7.5.4": + version: 7.5.4 + resolution: "@polkadot/wasm-crypto-wasm@npm:7.5.4" dependencies: - "@polkadot/wasm-bridge": "npm:7.4.1" - "@polkadot/wasm-crypto-asmjs": "npm:7.4.1" - "@polkadot/wasm-crypto-init": "npm:7.4.1" - "@polkadot/wasm-crypto-wasm": "npm:7.4.1" - "@polkadot/wasm-util": "npm:7.4.1" + "@polkadot/wasm-util": "npm:7.5.4" tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - "@polkadot/x-randomvalues": "*" - checksum: 10c0/b896f88ebf6b6864263b9042a14b6e5ef7371e47e56c6f1c297472f6d24b40645ee4e9abed5d32bfd95de4797811cb109c44da6064dd2509db3ce05a53fe2d72 + checksum: 10c0/1feb2069d804dfc7721222d435c411e557d66775689b8d8bf0b5f7af16126c9e089905544bcb79abf63117e771286ad790b98ee63a127aadeee6a2e1bb8148af languageName: node linkType: hard @@ -4139,14 +4128,20 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-util@npm:7.4.1, @polkadot/wasm-util@npm:^7.4.1": - version: 7.4.1 - resolution: "@polkadot/wasm-util@npm:7.4.1" +"@polkadot/wasm-crypto@npm:^7.5.3": + version: 7.5.4 + resolution: "@polkadot/wasm-crypto@npm:7.5.4" dependencies: + "@polkadot/wasm-bridge": "npm:7.5.4" + "@polkadot/wasm-crypto-asmjs": "npm:7.5.4" + "@polkadot/wasm-crypto-init": "npm:7.5.4" + "@polkadot/wasm-crypto-wasm": "npm:7.5.4" + "@polkadot/wasm-util": "npm:7.5.4" tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10c0/4e7042f854350a7e0c978d816abc3a8e37adcd6e8a5a35a4893928e79ecc0950fc4073993ad813ad8edd2c5fa6f603a5395018d19c44b8a338f52974747c3a9c + "@polkadot/x-randomvalues": "*" + checksum: 10c0/232627257755ae1487152638ae532f9986a7b8b0b4b236851e43f79396793e1c1b5e339f6d7a920180c06e2d3d8f4c2e25539ac8eb4ec3e9d4537cdd2b54c23d languageName: node linkType: hard @@ -4161,23 +4156,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:13.4.3, @polkadot/x-bigint@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-bigint@npm:13.4.3" - dependencies: - "@polkadot/x-global": "npm:13.4.3" - tslib: "npm:^2.8.0" - checksum: 10c0/133bb54e6020dde4945ddaa685f0714f09930ef1518f8ab3e03a042ab6b892bb3ec882199966c290adbe5dc2b3c6d6312624a8671eb835346df8664c3d2f1773 - languageName: node - linkType: hard - -"@polkadot/x-bigint@npm:13.5.4": - version: 13.5.4 - resolution: "@polkadot/x-bigint@npm:13.5.4" +"@polkadot/wasm-util@npm:7.5.4, @polkadot/wasm-util@npm:^7.5.3": + version: 7.5.4 + resolution: "@polkadot/wasm-util@npm:7.5.4" dependencies: - "@polkadot/x-global": "npm:13.5.4" - tslib: "npm:^2.8.0" - checksum: 10c0/3c00e5cac854ed1f730fe70e474891c9943522de4820d7c88fc8c65884a6237332f19a4e5180297166bc97aed80bdbfe66877e2d3c0ea11cd1542aba03b91245 + tslib: "npm:^2.7.0" + peerDependencies: + "@polkadot/util": "*" + checksum: 10c0/a5a42b7d0b401ff68ee22017ad2b55eb0bfbdd1000d13a6e9dd05f374496237c1409a0cf18cfc8bdbd642110ae6c1b6e39a7484e5f8bdecdc48010c66c46b460 languageName: node linkType: hard @@ -4191,14 +4177,13 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-fetch@npm:13.4.3" +"@polkadot/x-bigint@npm:14.0.3, @polkadot/x-bigint@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-bigint@npm:14.0.3" dependencies: - "@polkadot/x-global": "npm:13.4.3" - node-fetch: "npm:^3.3.2" + "@polkadot/x-global": "npm:14.0.3" tslib: "npm:^2.8.0" - checksum: 10c0/3352bed239d8d1227e12af202707500bc81589b6492639f54a5130b94ea6f3b8e74760c0429cfa6543cfc57fc796a63e1898540b95c09ca116af466e7eaf0e36 + checksum: 10c0/4ea97796327f838ea08bb620ecefd5ad00e6685fd22fae427b5f6c4bef50fa21417a1f154e3ad95355da111adc339f4f7b8dd214d8e152042f487a628cc00eda languageName: node linkType: hard @@ -4213,21 +4198,14 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-global@npm:13.4.3, @polkadot/x-global@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-global@npm:13.4.3" - dependencies: - tslib: "npm:^2.8.0" - checksum: 10c0/704d0f1f221a7cd3fadc64502a9da133fd438d4931de8e6c0ada04545e25c90759c4a79dec1595623f28c8cc29a3123cbbc0d1932613c174da85d5f1de24dbbe - languageName: node - linkType: hard - -"@polkadot/x-global@npm:13.5.4": - version: 13.5.4 - resolution: "@polkadot/x-global@npm:13.5.4" +"@polkadot/x-fetch@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-fetch@npm:14.0.3" dependencies: + "@polkadot/x-global": "npm:14.0.3" + node-fetch: "npm:^3.3.2" tslib: "npm:^2.8.0" - checksum: 10c0/5c3a58a143201217e29bc067195bff8695ce93ba662fac444688d2cc5f717464405c24edbded187927119dd1cf98f29974180579bc80a864e561b1b87a37d5ba + checksum: 10c0/1710947bdad9466bed2ceeb2f63112e84f8e99c04edb223b6879852bcfb685a1a5ec24d63439f7f730ca16577a31cafd511202458cfdcd835bd738060ecf7d70 languageName: node linkType: hard @@ -4240,16 +4218,12 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-randomvalues@npm:13.4.3" +"@polkadot/x-global@npm:14.0.3, @polkadot/x-global@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-global@npm:14.0.3" dependencies: - "@polkadot/x-global": "npm:13.4.3" tslib: "npm:^2.8.0" - peerDependencies: - "@polkadot/util": 13.4.3 - "@polkadot/wasm-util": "*" - checksum: 10c0/be067c265c0a2fde838a876e352a35b9bb3950c1b0e87b5464f31e18b3999b50daf63d0dcca3819ea33cbda44e7857d53b4fa391c64ae00a975e9c09b5e21578 + checksum: 10c0/323d966ca45de68bd12cd53c39579d4df9fa5faa50c93f7f988b9e3526362400935e8cb40f37201b896795661f4c52cba7e7f5937bf1c6d972c25ab5eee8cfd5 languageName: node linkType: hard @@ -4266,23 +4240,16 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-textdecoder@npm:13.4.3" - dependencies: - "@polkadot/x-global": "npm:13.4.3" - tslib: "npm:^2.8.0" - checksum: 10c0/187685b2d125bf22828bd39977941d77ba314af37691f1e86a123fa148a9cd7e0ef4470048d40454eeb8c1830e89d7258bd314b3ee47d6e6557de910d1871b3c - languageName: node - linkType: hard - -"@polkadot/x-textdecoder@npm:13.5.4": - version: 13.5.4 - resolution: "@polkadot/x-textdecoder@npm:13.5.4" +"@polkadot/x-randomvalues@npm:14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-randomvalues@npm:14.0.3" dependencies: - "@polkadot/x-global": "npm:13.5.4" + "@polkadot/x-global": "npm:14.0.3" tslib: "npm:^2.8.0" - checksum: 10c0/5937cfeba742dff1857b6576dddd5e5140d2e80834156002f38f5ff29807d9cf5464c1c2965208733c6143dfe8174537fa757b765117bc07807e7e588f3dca5b + peerDependencies: + "@polkadot/util": 14.0.3 + "@polkadot/wasm-util": "*" + checksum: 10c0/3fff52aae44e3352411591da68639daef061d00b62967d68e3832b01a6a6ac7870090e69a433a6290274f9fb64fbf7e1f24f4213db6bbce86ca414f48f83a9e7 languageName: node linkType: hard @@ -4296,23 +4263,13 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-textencoder@npm:13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-textencoder@npm:13.4.3" - dependencies: - "@polkadot/x-global": "npm:13.4.3" - tslib: "npm:^2.8.0" - checksum: 10c0/8c9b2f53142abf3dafd35c6fadf719e84098466e4ac9f4b58f0c7f0cce6aaf4c7a69d6323a708223e10bc439e35b87cd5ed95f507be7745fb23a32a3f52257b2 - languageName: node - linkType: hard - -"@polkadot/x-textencoder@npm:13.5.4": - version: 13.5.4 - resolution: "@polkadot/x-textencoder@npm:13.5.4" +"@polkadot/x-textdecoder@npm:14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-textdecoder@npm:14.0.3" dependencies: - "@polkadot/x-global": "npm:13.5.4" + "@polkadot/x-global": "npm:14.0.3" tslib: "npm:^2.8.0" - checksum: 10c0/14fdf11b6bc77b1ecd7f72002a4c80bcdeea3296059e1f017e41731e41fd8d5dd22cf524120aec26ee9d6357bb7bd5ec3fcb00e40b7863f8da55770b787ca127 + checksum: 10c0/c930086aa26b522c55e9308d33595cb888242535cb926111e3f1e1937b51aaf17de7dc365723eac97b16d5f58ecb0512d81aec4e7915e0eb3984ba296881b0f2 languageName: node linkType: hard @@ -4326,14 +4283,13 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-ws@npm:^13.4.3": - version: 13.4.3 - resolution: "@polkadot/x-ws@npm:13.4.3" +"@polkadot/x-textencoder@npm:14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-textencoder@npm:14.0.3" dependencies: - "@polkadot/x-global": "npm:13.4.3" + "@polkadot/x-global": "npm:14.0.3" tslib: "npm:^2.8.0" - ws: "npm:^8.18.0" - checksum: 10c0/929ffd34c6625ef5bcf8dcf1f4a922d6e234bf75e23de633b56a747285b0a5f85c6f28339a2ff61aa297dc9c5b98ca783e6c70bf7e7856fc2b6be6aba92a7cb6 + checksum: 10c0/0e840c8128cd4ea7640ac209546dce72ae38cc7be64abb1e7277d99cc76056c06722036666e4f988e1169a5ccd61d8eeb17a2eb81eca1352d7b78d3c52a15031 languageName: node linkType: hard @@ -4348,6 +4304,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-ws@npm:^14.0.3": + version: 14.0.3 + resolution: "@polkadot/x-ws@npm:14.0.3" + dependencies: + "@polkadot/x-global": "npm:14.0.3" + tslib: "npm:^2.8.0" + ws: "npm:^8.18.0" + checksum: 10c0/64bbe4ea22e0dad53ecdfbb85a81e7d1dfdde7f0d30a416c30c3519687b2b4ea598ac9b8ee80bd4c98f892610bf3ccec6a2d924e8bde0f7ea4edde43ae10717d + languageName: node + linkType: hard + "@polymeshassociation/polymesh-local@npm:^5.13.0-alpha.3": version: 5.13.0-alpha.3 resolution: "@polymeshassociation/polymesh-local@npm:5.13.0-alpha.3" @@ -4370,16 +4337,16 @@ __metadata: languageName: node linkType: hard -"@polymeshassociation/polymesh-types@npm:^7.2.0": - version: 7.2.0 - resolution: "@polymeshassociation/polymesh-types@npm:7.2.0" +"@polymeshassociation/polymesh-types@npm:^7.4.0": + version: 7.4.0 + resolution: "@polymeshassociation/polymesh-types@npm:7.4.0" dependencies: "@polkadot/api": "npm:16.5.2" "@polkadot/api-base": "npm:16.5.2" "@polkadot/rpc-core": "npm:16.5.2" "@polkadot/types": "npm:16.5.2" "@polkadot/types-codec": "npm:16.5.2" - checksum: 10c0/258bda42dea27d2f0d107e3cbfff6134a93ba042d8e6ab4b1c52a3e47437eff4a0b1672d8db251e745489edcbdcfbefd26b6c5e95f6239dacde68013e5fe858c + checksum: 10c0/e0ba7d34eee7171f8ed02dfe47295fdbb55bcc4b315d327a724312242fcea3b485064f64a453c9f13cdd1b75197626714482a0e16fe15274223bd3f150c554b8 languageName: node linkType: hard @@ -4425,6 +4392,16 @@ __metadata: languageName: node linkType: hard +"@scure/sr25519@npm:^0.2.0": + version: 0.2.0 + resolution: "@scure/sr25519@npm:0.2.0" + dependencies: + "@noble/curves": "npm:~1.9.2" + "@noble/hashes": "npm:~1.8.0" + checksum: 10c0/7836a7ea9e50c3c36c19f14408b52fc57d255e5b82a19e1ccb05bc3e369b20ee64d00683930b7171a1a728b4ed8f8fbb8f28194f1d51eb380991e0be2f44daef + languageName: node + linkType: hard + "@semantic-release/changelog@npm:^6.0.3": version: 6.0.3 resolution: "@semantic-release/changelog@npm:6.0.3" @@ -4709,15 +4686,15 @@ __metadata: languageName: node linkType: hard -"@subql/cli@npm:^6.6.0": - version: 6.6.0 - resolution: "@subql/cli@npm:6.6.0" +"@subql/cli@npm:^6.6.3": + version: 6.6.3 + resolution: "@subql/cli@npm:6.6.3" dependencies: "@apollo/client": "npm:^3.14.0" "@inquirer/prompts": "npm:^5.3.6" - "@modelcontextprotocol/sdk": "npm:^1.17.2" - "@oclif/core": "npm:^4.3.3" - "@subql/common": "npm:~5.8.2-0" + "@modelcontextprotocol/sdk": "npm:1.24.3" + "@oclif/core": "npm:^4.8.0" + "@subql/common": "npm:~5.8.2" "@subql/contract-sdk": "npm:^1.9.0" "@subql/network-clients": "npm:^1.1.0" "@subql/utils": "npm:~2.22.1" @@ -4728,7 +4705,7 @@ __metadata: dotenv: "npm:^16.4.5" ejs: "npm:^3.1.10" fuzzy: "npm:^0.1.3" - glob: "npm:^10.4" + glob: "npm:^11.1" graphql: "npm:^16.11.0" graphql-request: "npm:^7.2.0" json5: "npm:^2.2.3" @@ -4753,60 +4730,26 @@ __metadata: zod: "npm:^3.25.67" bin: subql: ./bin/run - checksum: 10c0/30479c1f8f94c92503652e38c509ea47f158a11be4968a46c2c2f87967a289573b5c948b73d77ce12e720001681b68ce0fc553d740326ca8dfccedd8c31b27ed + checksum: 10c0/62a889b15736932a65bf0100eb4f2a4570ae3c001b2dcd95ed615651269da0380cbd8916d2e8cd2aeb6360d73477b754a6b7f14d02de8efd1496f3d3783f63b0 languageName: node linkType: hard -"@subql/common-substrate@npm:4.3.7": - version: 4.3.7 - resolution: "@subql/common-substrate@npm:4.3.7" +"@subql/common-substrate@npm:~4.5.5": + version: 4.5.5 + resolution: "@subql/common-substrate@npm:4.5.5" dependencies: - "@subql/common": "npm:5.3.1" - "@subql/types": "npm:3.11.5" + "@subql/common": "npm:~5.8.2" + "@subql/types": "npm:~3.15.0" peerDependencies: - class-transformer: "*" - class-validator: "*" - checksum: 10c0/918d7cd937c88bc336107063bef8a478128a9550d2464c53caf3fe83fb9e5f6f7464b8cb536025ef855b765aecfdd5e0aec99c56c65e248d0cf1349cd5d6ffdc + class-transformer: ^0.5.1 + class-validator: 0.14.1 + checksum: 10c0/e2c1e5cb2fc80ce1a7abf3b1540126c541397e4a462dcc9ec6d5a74c991aae5298a18ca1bcf6335ee5e82f56bb1138493c5370c092985a5aa9bc094027eb0b7d languageName: node linkType: hard -"@subql/common@npm:5.3.1": - version: 5.3.1 - resolution: "@subql/common@npm:5.3.1" - dependencies: - "@subql/types-core": "npm:2.0.1" - axios: "npm:^0.28.0" - class-transformer: "npm:^0.5.1" - class-validator: "npm:^0.14.1" - form-data: "npm:^4.0.1" - js-yaml: "npm:^4.1.0" - reflect-metadata: "npm:^0.1.14" - semver: "npm:^7.6.3" - update-notifier: "npm:^5.1.0" - checksum: 10c0/98a22937b7914052eeb887e852beee7006cbc6953f2733df9759b16276479f9e218c500c84391c67665b3e5cf0f0e24b93259b8ffa932c46c0dc5959b2144cfe - languageName: node - linkType: hard - -"@subql/common@npm:5.4.0": - version: 5.4.0 - resolution: "@subql/common@npm:5.4.0" - dependencies: - "@subql/types-core": "npm:2.0.1" - axios: "npm:^0.28.0" - class-transformer: "npm:^0.5.1" - class-validator: "npm:^0.14.1" - form-data: "npm:^4.0.1" - js-yaml: "npm:^4.1.0" - reflect-metadata: "npm:^0.1.14" - semver: "npm:^7.6.3" - update-notifier: "npm:^5.1.0" - checksum: 10c0/bee4a01ed2243be5867a0e5ae688ab06c36f4863bf1fcae41330265c0db229109e6df3fb59201fcf32718def8745a0f3b3893077f6136ee54e317ae0a2158043 - languageName: node - linkType: hard - -"@subql/common@npm:~5.8.2-0": - version: 5.8.2-0 - resolution: "@subql/common@npm:5.8.2-0" +"@subql/common@npm:~5.8.2": + version: 5.8.2 + resolution: "@subql/common@npm:5.8.2" dependencies: "@subql/types-core": "npm:~2.2.0" axios: "npm:^1.13.1" @@ -4817,7 +4760,7 @@ __metadata: reflect-metadata: "npm:^0.2.2" semver: "npm:^7.6.3" update-notifier: "npm:^5.1.0" - checksum: 10c0/e6bd9273f5d60bbe539892808276ae8a0f79f9b677a54d78b096c2831b6763b01127c4924f73054857b21163b4383a73c55d1edeff02bbc6729195e211ba1210 + checksum: 10c0/946938419a1d76ae1bc9551d8764791718f0dcc6e0c9389f644b47e57d5b734f50ce9b20f77277403a93fd0b287cbf6a86a043c05bb26d621b974479a64a6789 languageName: node linkType: hard @@ -4867,24 +4810,25 @@ __metadata: languageName: node linkType: hard -"@subql/node-core@npm:17.2.2": - version: 17.2.2 - resolution: "@subql/node-core@npm:17.2.2" +"@subql/node-core@npm:~19.0.0": + version: 19.0.0 + resolution: "@subql/node-core@npm:19.0.0" dependencies: - "@apollo/client": "npm:^3.11.2" - "@nestjs/common": "npm:^11.0.7" + "@apollo/client": "npm:^3.14.0" + "@nestjs/common": "npm:^11.0.16" "@nestjs/event-emitter": "npm:^3.0.0" "@nestjs/schedule": "npm:^5.0.1" - "@subql/common": "npm:5.4.0" - "@subql/testing": "npm:2.2.4" - "@subql/types": "npm:3.12.1" - "@subql/utils": "npm:2.18.0" + "@subql/common": "npm:~5.8.2" + "@subql/testing": "npm:~2.3.1" + "@subql/types": "npm:~3.15.0" + "@subql/utils": "npm:~2.22.1" "@willsoto/nestjs-prometheus": "npm:^6.0.2" async-mutex: "npm:^0.5.0" cron-converter: "npm:^2.0.1" - cross-fetch: "npm:^3.1.6" csv-stringify: "npm:^6.5.1" dayjs: "npm:^1.11.12" + dotenv: "npm:^16.4.5" + graphql: "npm:^15.8.0" lodash: "npm:^4.17.21" lru-cache: "npm:10.1.0" merkle-tools: "npm:^1.4.1" @@ -4893,58 +4837,42 @@ __metadata: source-map: "npm:^0.7.4" tar: "npm:^7.4.3" toposort-class: "npm:^1.0.1" - vm2: "npm:^3.9.19" + vm2: "npm:3.9.19" yargs: "npm:^16.2.0" - checksum: 10c0/7ab1f6e54bffea7c2ac0b077af185840ab88507fd1b3c615a64d70fb907821e6187189a1ffb00325de5f6d506b2ad48e24da9e1d4ec1d72d9d48421343ae067e + checksum: 10c0/96a722b41d5740473ad2630ecb2d6a3622d68829515c77f6eeef072586faa0240a4c3be448895d94d15a248c1a53522b8cf4f2f302a9df1bb48342bf26658eff languageName: node linkType: hard -"@subql/node@npm:^5.11.2": - version: 5.11.2 - resolution: "@subql/node@npm:5.11.2" +"@subql/node@npm:^6.4.6": + version: 6.4.6 + resolution: "@subql/node@npm:6.4.6" dependencies: - "@nestjs/common": "npm:^11.0.7" + "@apollo/client": "npm:^3.14.0" + "@nestjs/common": "npm:^11.0.16" "@nestjs/core": "npm:^11.0.7" "@nestjs/event-emitter": "npm:^3.0.0" "@nestjs/platform-express": "npm:^11.0.7" "@nestjs/schedule": "npm:^5.0.1" - "@polkadot/api": "npm:^15.6.1" - "@subql/common": "npm:5.4.0" - "@subql/common-substrate": "npm:4.3.7" - "@subql/node-core": "npm:17.2.2" - "@subql/types": "npm:3.12.1" - "@subql/utils": "npm:2.18.0" + "@polkadot/api": "npm:^16.4.7" + "@subql/common-substrate": "npm:~4.5.5" + "@subql/node-core": "npm:~19.0.0" + "@subql/types": "npm:~3.15.0" + "@subql/utils": "npm:~2.22.1" fetch-h2: "npm:3.0.2" lodash: "npm:^4.17.21" - reflect-metadata: "npm:^0.1.14" - peerDependencies: - "@apollo/client": ^3.7.16 + reflect-metadata: "npm:^0.2.2" bin: subql-node: ./bin/run - checksum: 10c0/7af22e62e7c7dcb300a2ebcec0708258ba910f20ea4d78117b8fe686f6d51f80d177e23eb56c0f3844b89da410d8da9769668a6fbfea8d0e5c5380015b8058b7 + checksum: 10c0/16b6396c5534b61c1ffa2446233ced362d4f9b1b92780b12a6bf243977b0d5de26ea72503a991747ed272fc26a8be3d6309f17b608e086a1c1771f047a9b1fd3 languageName: node linkType: hard -"@subql/testing@npm:2.2.4": - version: 2.2.4 - resolution: "@subql/testing@npm:2.2.4" +"@subql/testing@npm:~2.3.1": + version: 2.3.1 + resolution: "@subql/testing@npm:2.3.1" dependencies: - "@subql/types-core": "npm:^2.0.2" - checksum: 10c0/d194a6d9372087c2e9a0c611cec69f7891b5d958b4640fafd4ea8aed36a7d8c400a7aa6f51638086da9dec5cc4260e56f786e49601054865e93170c9232bec29 - languageName: node - linkType: hard - -"@subql/types-core@npm:2.0.1": - version: 2.0.1 - resolution: "@subql/types-core@npm:2.0.1" - checksum: 10c0/044e538ff0dc82b369857c35a2d200380f40b677bf2e30e24b5472a990634497581d5d1a2410942e1d75a4d562905caf54b09c677ae25c59e5b714a0fcec2631 - languageName: node - linkType: hard - -"@subql/types-core@npm:2.0.2, @subql/types-core@npm:^2.0.2": - version: 2.0.2 - resolution: "@subql/types-core@npm:2.0.2" - checksum: 10c0/7101ae57134d6047d5cd479e88e761c6856e73b2ea3b3847b3cbf9d2dd3cbbe9f83a9e0124d7d4aa7c0ca0842507c92d9e87875ab037e37c17430889841d9abd + "@subql/types-core": "npm:^2.2.0" + checksum: 10c0/3123eb3607fcc63032abf0b2863161978fb9a57de4ea558c38ae49c11f728dbc1290c688a120e7b903972813a7a8b09461dd97c29254837304995d09c9bfe6ce languageName: node linkType: hard @@ -4958,29 +4886,7 @@ __metadata: languageName: node linkType: hard -"@subql/types@npm:3.11.5": - version: 3.11.5 - resolution: "@subql/types@npm:3.11.5" - dependencies: - "@subql/types-core": "npm:2.0.1" - peerDependencies: - "@polkadot/api": ^14 - checksum: 10c0/14fe60c9232efe67a42665ff6a45a0bfeaa12383eb632f9dbc71ea389f57ae1b119a145e1eaa57f614966d84ce8b29d0efbb5e591fe27fa55367a4249c5c29e2 - languageName: node - linkType: hard - -"@subql/types@npm:3.12.1": - version: 3.12.1 - resolution: "@subql/types@npm:3.12.1" - dependencies: - "@subql/types-core": "npm:2.0.2" - peerDependencies: - "@polkadot/api": ^15 - checksum: 10c0/c0acdb1b490eb1fc42ee943b93cb83184119bfe6fe15f44829db0b19d31dcd5b5ef50813b6eb2e0d5b6e574d2ba7f2fcd5bdc3fc88fa5c2bc2f74cc97fb4afa3 - languageName: node - linkType: hard - -"@subql/types@npm:^3.15.0": +"@subql/types@npm:^3.15.0, @subql/types@npm:~3.15.0": version: 3.15.0 resolution: "@subql/types@npm:3.15.0" dependencies: @@ -4991,25 +4897,6 @@ __metadata: languageName: node linkType: hard -"@subql/utils@npm:2.18.0": - version: 2.18.0 - resolution: "@subql/utils@npm:2.18.0" - dependencies: - "@polkadot/util": "npm:^13.2.3" - "@polkadot/util-crypto": "npm:^13.2.3" - "@subql/x-sequelize": "npm:6.32.0-0.0.4" - chalk: "npm:^4.1.2" - detect-port: "npm:^1.6.1" - flatted: "npm:^3.3.1" - graphql: "npm:^15.8.0" - graphql-tag: "npm:^2.12.6" - lodash: "npm:^4.17.21" - pino: "npm:^6.13.3" - rotating-file-stream: "npm:^3.2.3" - checksum: 10c0/e86319ac82ca747c84abb59c251d828d0ff47ff4ff7b31540bb65a350c2c67f6bd395a9b6d43c134256c9a0e2ae160111e0fab1feab2c42dc04fd05a967f69a0 - languageName: node - linkType: hard - "@subql/utils@npm:~2.22.1": version: 2.22.1 resolution: "@subql/utils@npm:2.22.1" @@ -5131,6 +5018,23 @@ __metadata: languageName: node linkType: hard +"@tokenizer/inflate@npm:^0.4.1": + version: 0.4.1 + resolution: "@tokenizer/inflate@npm:0.4.1" + dependencies: + debug: "npm:^4.4.3" + token-types: "npm:^6.1.1" + checksum: 10c0/9817516efe21d1ce3bdfb80a1f94efc8981064ce3873448ba79f4d81d96c0694c484c289bd042d346ae5536cf77f5aa9a367d39c3df700eb610761b7c306b4de + languageName: node + linkType: hard + +"@tokenizer/token@npm:^0.3.0": + version: 0.3.0 + resolution: "@tokenizer/token@npm:0.3.0" + checksum: 10c0/7ab9a822d4b5ff3f5bca7f7d14d46bdd8432528e028db4a52be7fbf90c7f495cc1af1324691dda2813c6af8dc4b8eb29de3107d4508165f9aa5b53e7d501f155 + languageName: node + linkType: hard + "@tootallnate/once@npm:1": version: 1.1.2 resolution: "@tootallnate/once@npm:1.1.2" @@ -6755,17 +6659,6 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.28.0": - version: 0.28.1 - resolution: "axios@npm:0.28.1" - dependencies: - follow-redirects: "npm:^1.15.0" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10c0/0437f851bb3552645cb44151bddeecf6bc85b41ea8f355f954fb5338f922d8ddcd255fc1eeffe83d9dd175dcdc1fb613f546ba607fa96cd33670738b30f7ca60 - languageName: node - linkType: hard - "axios@npm:^1.13.1": version: 1.13.2 resolution: "axios@npm:1.13.2" @@ -6900,6 +6793,13 @@ __metadata: languageName: node linkType: hard +"balanced-match@npm:^4.0.2": + version: 4.0.4 + resolution: "balanced-match@npm:4.0.4" + checksum: 10c0/07e86102a3eb2ee2a6a1a89164f29d0dbaebd28f2ca3f5ca786f36b8b23d9e417eb3be45a4acf754f837be5ac0a2317de90d3fcb7f4f4dc95720a1f36b26a17b + languageName: node + linkType: hard + "base-x@npm:^5.0.0": version: 5.0.1 resolution: "base-x@npm:5.0.1" @@ -7086,6 +6986,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^5.0.5": + version: 5.0.5 + resolution: "brace-expansion@npm:5.0.5" + dependencies: + balanced-match: "npm:^4.0.2" + checksum: 10c0/4d238e14ed4f5cc9c07285550a41cef23121ca08ba99fa9eb5b55b580dcb6bf868b8210aa10526bdc9f8dc97f33ca2a7259039c4cc131a93042beddb424c48e3 + languageName: node + linkType: hard + "braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -7469,7 +7378,7 @@ __metadata: languageName: node linkType: hard -"class-validator@npm:0.14.1, class-validator@npm:^0.14.1": +"class-validator@npm:0.14.1": version: 0.14.1 resolution: "class-validator@npm:0.14.1" dependencies: @@ -8107,7 +8016,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.4, cross-fetch@npm:^3.1.5, cross-fetch@npm:^3.1.6": +"cross-fetch@npm:^3.1.4, cross-fetch@npm:^3.1.5": version: 3.2.0 resolution: "cross-fetch@npm:3.2.0" dependencies: @@ -9728,6 +9637,18 @@ __metadata: languageName: node linkType: hard +"file-type@npm:21.3.4": + version: 21.3.4 + resolution: "file-type@npm:21.3.4" + dependencies: + "@tokenizer/inflate": "npm:^0.4.1" + strtok3: "npm:^10.3.4" + token-types: "npm:^6.1.1" + uint8array-extras: "npm:^1.4.0" + checksum: 10c0/6f15e7538c5d73f9308d2e897365d253a6647a6751bb1b0d85c78aebc02b8976afb7c6c9b3759687a064b1b3d60246e5504746b8f11e38b0d5a1b339087e00d2 + languageName: node + linkType: hard + "filelist@npm:^1.0.4": version: 1.0.4 resolution: "filelist@npm:1.0.4" @@ -9841,7 +9762,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.9, flatted@npm:^3.3.1, flatted@npm:^3.3.3": +"flatted@npm:^3.2.9, flatted@npm:^3.3.3": version: 3.3.3 resolution: "flatted@npm:3.3.3" checksum: 10c0/e957a1c6b0254aa15b8cce8533e24165abd98fadc98575db082b786b5da1b7d72062b81bfdcd1da2f4d46b6ed93bec2434e62333e9b4261d79ef2e75a10dd538 @@ -9858,16 +9779,6 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.0": - version: 1.15.9 - resolution: "follow-redirects@npm:1.15.9" - peerDependenciesMeta: - debug: - optional: true - checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f - languageName: node - linkType: hard - "for-each@npm:^0.3.3, for-each@npm:^0.3.5": version: 0.3.5 resolution: "for-each@npm:0.3.5" @@ -9877,7 +9788,7 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.1.0": +"foreground-child@npm:^3.1.0, foreground-child@npm:^3.3.1": version: 3.3.1 resolution: "foreground-child@npm:3.3.1" dependencies: @@ -9899,7 +9810,7 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0, form-data@npm:^4.0.1": +"form-data@npm:^4.0.0": version: 4.0.2 resolution: "form-data@npm:4.0.2" dependencies: @@ -10242,7 +10153,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7, glob@npm:^10.4, glob@npm:^10.4.5": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7, glob@npm:^10.4.5": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -10258,6 +10169,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.1": + version: 11.1.0 + resolution: "glob@npm:11.1.0" + dependencies: + foreground-child: "npm:^3.3.1" + jackspeak: "npm:^4.1.1" + minimatch: "npm:^10.1.1" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^2.0.0" + bin: + glob: dist/esm/bin.mjs + checksum: 10c0/1ceae07f23e316a6fa74581d9a74be6e8c2e590d2f7205034dd5c0435c53f5f7b712c2be00c3b65bf0a49294a1c6f4b98cd84c7637e29453b5aa13b79f1763a2 + languageName: node + linkType: hard + "glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -11560,6 +11487,15 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.1.1": + version: 4.2.3 + resolution: "jackspeak@npm:4.2.3" + dependencies: + "@isaacs/cliui": "npm:^9.0.0" + checksum: 10c0/b5c0c414f1607c2aa0597f4bf2c03b8443897fccd5fd3c2b3e4f77d556b2bc7c3d3413828ba91e0789f6fb40ad90242f7f89fb20aee9e9d705bc1681f7564f67 + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.9.2 resolution: "jake@npm:10.9.2" @@ -12132,6 +12068,13 @@ __metadata: languageName: node linkType: hard +"jose@npm:^6.1.1": + version: 6.2.3 + resolution: "jose@npm:6.2.3" + checksum: 10c0/aa91bccba22cc84d86308f833749bcb0b00441e35c24e0ac79abeac5f76dc62d47bdef9c1da6a0c609f5da6478595f52b252085888b89dbdb163861e40ea4188 + languageName: node + linkType: hard + "js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" @@ -12653,6 +12596,13 @@ __metadata: languageName: node linkType: hard +"load-esm@npm:1.0.3": + version: 1.0.3 + resolution: "load-esm@npm:1.0.3" + checksum: 10c0/285a3666a29c11f7b466bb70ee3582af32893d03ed91b68be939c656a15afd27f3683f5f8d56b52834ce2911ecf1c84e515e6048248fb5268a89b724a8ddbf65 + languageName: node + linkType: hard + "load-json-file@npm:^4.0.0": version: 4.0.0 resolution: "load-json-file@npm:4.0.0" @@ -12914,6 +12864,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.3.6 + resolution: "lru-cache@npm:11.3.6" + checksum: 10c0/3afe3e3000e424c18b640dcea5776b5c1de8684b7dac9718d58792dff1a4692b38cc14e263cbb41bdab98ffcf5408f003b33133b179ce5d271284be72a3ff2a9 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -13263,6 +13220,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.1.1, minimatch@npm:^10.2.5": + version: 10.2.5 + resolution: "minimatch@npm:10.2.5" + dependencies: + brace-expansion: "npm:^5.0.5" + checksum: 10c0/6bb058bd6324104b9ec2f763476a35386d05079c1f5fe4fbf1f324a25237cd4534d6813ecd71f48208f4e635c1221899bef94c3c89f7df55698fe373aaae20fd + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -14542,6 +14508,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.2 + resolution: "path-scurry@npm:2.0.2" + dependencies: + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 10c0/b35ad37cf6557a87fd057121ce2be7695380c9138d93e87ae928609da259ea0a170fac6f3ef1eb3ece8a068e8b7f2f3adf5bb2374cf4d4a57fe484954fcc9482 + languageName: node + linkType: hard + "path-to-regexp@npm:8.2.0, path-to-regexp@npm:^8.0.0": version: 8.2.0 resolution: "path-to-regexp@npm:8.2.0" @@ -14788,12 +14764,12 @@ __metadata: "@polkadot/typegen": "npm:^16.5.2" "@polkadot/types-support": "npm:^16.5.2" "@polymeshassociation/polymesh-local": "npm:^5.13.0-alpha.3" - "@polymeshassociation/polymesh-types": "npm:^7.2.0" + "@polymeshassociation/polymesh-types": "npm:^7.4.0" "@semantic-release/changelog": "npm:^6.0.3" "@semantic-release/exec": "npm:^6.0.3" "@semantic-release/npm": "npm:^11.0.0" - "@subql/cli": "npm:^6.6.0" - "@subql/node": "npm:^5.11.2" + "@subql/cli": "npm:^6.6.3" + "@subql/node": "npm:^6.4.6" "@subql/types": "npm:^3.15.0" "@subql/types-core": "npm:^2.2.0" "@types/bn.js": "npm:^4.11.6" @@ -15443,13 +15419,6 @@ __metadata: languageName: node linkType: hard -"reflect-metadata@npm:^0.1.14": - version: 0.1.14 - resolution: "reflect-metadata@npm:0.1.14" - checksum: 10c0/3a6190c7f6cb224f26a012d11f9e329360c01c1945e2cbefea23976a8bacf9db6b794aeb5bf18adcb673c448a234fbc06fc41853c00a6c206b30f0777ecf019e - languageName: node - linkType: hard - "reflect-metadata@npm:^0.2.2": version: 0.2.2 resolution: "reflect-metadata@npm:0.2.2" @@ -16820,6 +16789,15 @@ __metadata: languageName: node linkType: hard +"strtok3@npm:^10.3.4": + version: 10.3.5 + resolution: "strtok3@npm:10.3.5" + dependencies: + "@tokenizer/token": "npm:^0.3.0" + checksum: 10c0/8d2477b239054c9f1f5b14a65d531147ca158ab9887fdc2d0938e77b7ec8891fb683b58254c7643afd5d98a421a59207534d491762b111f58c795071ecbe9fd1 + languageName: node + linkType: hard + "supports-color@npm:^2.0.0": version: 2.0.0 resolution: "supports-color@npm:2.0.0" @@ -17183,6 +17161,17 @@ __metadata: languageName: node linkType: hard +"token-types@npm:^6.1.1": + version: 6.1.2 + resolution: "token-types@npm:6.1.2" + dependencies: + "@borewit/text-codec": "npm:^0.2.1" + "@tokenizer/token": "npm:^0.3.0" + ieee754: "npm:^1.2.1" + checksum: 10c0/8786e28e3cb65b9e890bc3c38def98e6dfe4565538237f8c0e47dbe549ed8f5f00de8dc464717868308abb4729f1958f78f69e1c4c3deebbb685729113a6fee8 + languageName: node + linkType: hard + "toposort-class@npm:^1.0.1": version: 1.0.1 resolution: "toposort-class@npm:1.0.1" @@ -17723,6 +17712,13 @@ __metadata: languageName: node linkType: hard +"uint8array-extras@npm:^1.4.0": + version: 1.5.0 + resolution: "uint8array-extras@npm:1.5.0" + checksum: 10c0/0e74641ac7dadb02eadefc1ccdadba6010e007757bda824960de3c72bbe2b04e6d3af75648441f412148c4103261d54fcb60be45a2863beb76643a55fddba3bd + languageName: node + linkType: hard + "uint8arrays@npm:3.1.1, uint8arrays@npm:^3.0.0": version: 3.1.1 resolution: "uint8arrays@npm:3.1.1" @@ -18129,7 +18125,7 @@ __metadata: languageName: node linkType: hard -"vm2@npm:^3.9.19": +"vm2@npm:3.9.19": version: 3.9.19 resolution: "vm2@npm:3.9.19" dependencies: @@ -18776,16 +18772,23 @@ __metadata: languageName: node linkType: hard -"zod-to-json-schema@npm:^3.24.1": - version: 3.24.6 - resolution: "zod-to-json-schema@npm:3.24.6" +"zod-to-json-schema@npm:^3.25.0": + version: 3.25.2 + resolution: "zod-to-json-schema@npm:3.25.2" peerDependencies: - zod: ^3.24.1 - checksum: 10c0/b907ab6d057100bd25a37e5545bf5f0efa5902cd84d3c3ec05c2e51541431a47bd9bf1e5e151a244273409b45f5986d55b26e5d207f98abc5200702f733eb368 + zod: ^3.25.28 || ^4 + checksum: 10c0/dd300554393903022487688af14fbda5c719ba8179702bb55b3aa86318830467f0f7beb7d654036975ac963dc4843b72e59636448bfff9a0608f277bb6a14939 + languageName: node + linkType: hard + +"zod@npm:^3.25 || ^4.0": + version: 4.4.3 + resolution: "zod@npm:4.4.3" + checksum: 10c0/7ea31b558e88f9faf44f31dd185e2e1cbf51fed3081787fb96cc2534749b50c0acfc6da7f0922a7353ed092dd358c7d50c28ea96c94d04af64191bd33152eca3 languageName: node linkType: hard -"zod@npm:^3.23.8, zod@npm:^3.25.67": +"zod@npm:^3.25.67": version: 3.25.76 resolution: "zod@npm:3.25.76" checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c