Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e16d20e996 | ||
|
|
bfab0f8538 | ||
|
|
4752a98456 | ||
|
|
e63a3ec6a9 | ||
|
|
4dc30d7d98 | ||
|
|
71f6825b00 | ||
|
|
d56b0bfccc | ||
|
|
39ff956076 | ||
|
|
faa22fc634 | ||
|
|
f5ce395371 | ||
|
|
b986d4cb5d | ||
|
|
9c39cd9255 | ||
|
|
43e2c44ac1 | ||
|
|
3507a74d60 | ||
|
|
97797d64f1 | ||
|
|
88d7207102 | ||
|
|
1616b014b3 | ||
|
|
c20538f6f7 | ||
|
|
e77c2dd78c | ||
|
|
6e7ce901ab | ||
|
|
3396ed6010 | ||
|
|
09ec89ae62 | ||
|
|
a7d78ff6eb | ||
|
|
868043a22b | ||
|
|
0310582056 | ||
|
|
629b9b486e | ||
|
|
500e2022c3 | ||
|
|
f8c2701751 | ||
|
|
d70ef05b54 | ||
|
|
4b1d4c7335 | ||
|
|
c79939e650 | ||
|
|
8f298ba2a0 | ||
|
|
da6311d584 | ||
|
|
d589adf208 | ||
|
|
dfbfaf12eb | ||
|
|
91989e1a2b | ||
|
|
86c2a96ed4 | ||
|
|
9f3dab39c0 | ||
|
|
a02687c9fb | ||
|
|
80399fefcd | ||
|
|
ff9a0b3d44 | ||
|
|
8df82af638 | ||
|
|
ddfcc5624c | ||
|
|
7b08fbb695 | ||
|
|
07d85783d8 | ||
|
|
f0d6fc0167 | ||
|
|
7b085307f8 | ||
|
|
e22a38dd9c | ||
|
|
2ceb727ee6 | ||
|
|
bc4e656745 | ||
|
|
6d2b3b8463 | ||
|
|
5369b6cb10 | ||
|
|
53fd71b732 | ||
|
|
63e38b3d1c | ||
|
|
cd98ac65f3 | ||
|
|
7bd0819cbb | ||
|
|
e84c2a5180 | ||
|
|
aabf4b3e45 | ||
|
|
0f67d3e54d | ||
|
|
8cbc36550b | ||
|
|
25c46f2a0d | ||
|
|
f7124f7d69 | ||
|
|
afe12e5293 | ||
|
|
53c8952c66 | ||
|
|
7478eb4fce | ||
|
|
bc7ee1a1da | ||
|
|
1eb878a773 | ||
|
|
ccef61070b | ||
|
|
64300aa436 | ||
|
|
5a3255bc59 | ||
|
|
800064a18c | ||
|
|
b1e8fcf16e | ||
|
|
a1843c8cf6 | ||
|
|
a9b0f97f74 | ||
|
|
763e73138a | ||
|
|
e5103cd63f | ||
|
|
f606982bce | ||
|
|
392d447b99 | ||
|
|
3a6c4a524a | ||
|
|
014017104f | ||
|
|
026fb18933 | ||
|
|
361b411dc5 | ||
|
|
011b0b4a88 | ||
|
|
2798be0f1c | ||
|
|
03d7510ef6 | ||
|
|
e66704233c | ||
|
|
53eecf6220 | ||
|
|
051fa6965a |
@@ -15,6 +15,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
- name: ${{ matrix.step }}
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Jaco <jacogr@gmail.com>
|
||||
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> <action@github.com>
|
||||
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Github Actions <action@github.com>
|
||||
+49
-2
@@ -1,5 +1,52 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 7.5.1 Jan 23, 2022
|
||||
|
||||
Upgrade priority: Low. Recommended for users of the latest contract pallet and ink! versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add additional namespaced contract tests (Thanks to https://github.com/VargSupercolony)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `Registry` consistency, augment extensions
|
||||
- Add `.multi` support on `api.at(...).<section>.<method>`
|
||||
- Add support for ink! metadata V3 with payable constructors
|
||||
- Cleanup ink! metadata parsing, allowing for easier extension
|
||||
- Expose `contract.{query, tx}.<method>.meta`, aligning with API
|
||||
- Fix storage metadata, aligning method with decorated name
|
||||
- Adjust typegen, only using exportInterface
|
||||
- Added Kusama/Polkadot 9151 upgrade block (known types)
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.4.1 Jan 15, 2022
|
||||
|
||||
Upgrade priority: Medium. Required for all chains using `Range` and `RangeInclusive` types. Also includes better error handling for number conversions.
|
||||
|
||||
Changes:
|
||||
|
||||
- Asserts for invalid number format inputs (MAX_SAFE_INTEGER, float)
|
||||
- Ensure `Range/RangeInclusive` variant check does not fail on encoding
|
||||
- Ensure non-option calls in api-contract are marked as `@deprecated`
|
||||
- Added Kusama 9150 upgrade block (known types)
|
||||
- Update `@polkadot/util` to 8.3.2
|
||||
|
||||
|
||||
## 7.3.1 Jan 9, 2022
|
||||
|
||||
Upgrade priority: Low. Maintenance upgrade, tracking the latest `@polkadot` libraries.
|
||||
|
||||
Changes:
|
||||
|
||||
- Extend support for `WrapperKeepOpaque` with internal decoding (allowed to fail)
|
||||
- Adjust max-entries in historic provider LRU
|
||||
- Update to latest Substrate/Polkadot/Kusama metadata
|
||||
- Update `@polkadot/util` to 8.3.1
|
||||
- Update package paths under ESM
|
||||
|
||||
|
||||
## 7.2.1 Jan 3, 2022
|
||||
|
||||
Upgrade priority: Low. Recommended for users generating TS chain-specific augmentations.
|
||||
@@ -44,9 +91,9 @@ Changes:
|
||||
|
||||
Upgrade priority: Low. Recommended for TS users with their own non-Polkadot/Kusama chains.
|
||||
|
||||
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to retore old behavior.
|
||||
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to restore old behavior. A full writeup of the rationale and other options can be found [in the FAQ](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing)
|
||||
|
||||
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compaitible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
|
||||
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compatible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
2782 Jaco 7.5.1 (#4492)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
36 Keith Ingram Storage deposit limit changes (#4370)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
15 Xiliang Chen add Authority origin (#3645)
|
||||
11 Ian He HttpProvider support clone() (#3949)
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||
4 Alexander Popiak Add asset id in signing (#4009)
|
||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||
4 Nantian fix bigint type (#3869)
|
||||
4 Thibaut Sardan no subscription for http (#3127)
|
||||
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||
3 hamidra add support for n key entries for NMaps (#3886)
|
||||
3 Hamza Tokuchi more typos (#2532)
|
||||
3 Julien Eluard Fixed typos about module balances (#1402)
|
||||
3 KarishmaBothara Backward compatibility thing (#3511)
|
||||
3 Miguel Hervas Adding RT4 Types (#3007)
|
||||
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
|
||||
3 YJ feat: Vote interface as U8a (#1061)
|
||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
||||
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
||||
2 Jakub Pánik All heads subscription (#1899)
|
||||
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
|
||||
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
||||
2 Nikos Kontakis Add auction in shared types (#4085)
|
||||
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
||||
2 sung wu Update tx.md (#2485)
|
||||
2 Veliko Abi constructor takes different parameters (#3347)
|
||||
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||
1 Andreea Eftene Add storage deposit support (#4304)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 chriswmercer little readme tweak (#279)
|
||||
1 codingsh #2182 - add: search for docs (#2232)
|
||||
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
|
||||
1 Daniel Maricic Fixed typo in README (#2402)
|
||||
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
||||
1 David Don't log full error (#2952)
|
||||
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
|
||||
1 djuanito.eth Update fees to current constants (#2320)
|
||||
1 Drew Stone Update evm definitions to include vicinity (#2279)
|
||||
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
|
||||
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
|
||||
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
|
||||
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
|
||||
1 HackFisher fix OutboundLaneData types (#3992)
|
||||
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
|
||||
1 Hyungsuk Kang Update fees.ts (#1014)
|
||||
1 icodezjb Update SessionKeys (#3035)
|
||||
1 iiiiiiii Make unknownTypes externally accessible (#3263)
|
||||
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
|
||||
1 Joey don't throw error at `onSocketClose` (#4363)
|
||||
1 Jordan Allow typegen for custom RPCs (#2876)
|
||||
1 JQQQ Allow rpc expose definition/ metadata (#3488)
|
||||
1 Kian Paimani Update definitions.ts (#2514)
|
||||
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
|
||||
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
|
||||
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
|
||||
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
|
||||
1 Mario Neises fix usage with typescript (#405)
|
||||
1 Mario Pino Add PolkaStats to API users (#1593)
|
||||
1 Mark Robert Henderson Update warnings.ts to have the latest URLs (#2720)
|
||||
1 Matej Nemček added Kodadot to @polkadot/api users section (#2220)
|
||||
1 Mokhtar Naamani Disable websocket outgoing message fragmentation for w3cwebsocket (#2738)
|
||||
1 Nazar Mokrynskyi Performance tweaks (#4143)
|
||||
1 Nikhil Ranjan add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563)
|
||||
1 Nikolay Volf Fix typo (#1730)
|
||||
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
|
||||
1 Paul M Fox Basic BTreeMaps codec support (#1474)
|
||||
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
|
||||
1 qiuhao update DeriveCustom type (#2581)
|
||||
1 Rocco Musolino remove broken link (#2671)
|
||||
1 satellitex Add BTreeSet<V> Codec (#1639)
|
||||
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
|
||||
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
|
||||
1 Sean Young Solang requires u256 and i256 types (#2752)
|
||||
1 Sergei Pepyakin INK! -> ink! (#1347)
|
||||
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||
1 yjh fix MetadataVersioned.asV12 (#2983)
|
||||
1 Yuri fixes #3693 Fix uniques return types (#3694)
|
||||
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
|
||||
+1
-1
@@ -11,7 +11,7 @@ module.exports = {
|
||||
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
|
||||
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
|
||||
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
|
||||
'@polkadot/types-(augment-lookup|augment-registry|augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
|
||||
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
|
||||
// eslint-disable-next-line sort-keys
|
||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
||||
},
|
||||
|
||||
+5
-5
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "commonjs",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
@@ -31,15 +31,15 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.16.7",
|
||||
"@babel/register": "^7.16.7",
|
||||
"@babel/core": "^7.16.12",
|
||||
"@babel/register": "^7.16.9",
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/dev": "^0.65.4",
|
||||
"@polkadot/dev": "^0.65.43",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^27.4.0",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^4.5.3"
|
||||
"typescript": "^4.5.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api-base": "7.2.1",
|
||||
"@polkadot/rpc-augment": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/types-augment": "7.2.1",
|
||||
"@polkadot/types-codec": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2"
|
||||
"@polkadot/api-base": "7.5.1",
|
||||
"@polkadot/rpc-augment": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/types-augment": "7.5.1",
|
||||
"@polkadot/types-codec": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -1022,6 +1022,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
NotRegistered: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism
|
||||
* is disabled.
|
||||
**/
|
||||
PvfCheckDisabled: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given validator already has cast a vote.
|
||||
**/
|
||||
|
||||
@@ -574,6 +574,21 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A new head has been noted for a Para. `para_id`
|
||||
**/
|
||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* The given validation code was rejected by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given validation code was accepted by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given para either initiated or subscribed to a PVF check for the given validation
|
||||
* code. `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckStarted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
@@ -264,6 +264,11 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The active configuration for the current session.
|
||||
**/
|
||||
activeConfig: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsConfigurationHostConfiguration>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* If this is set, then the configuration setters will bypass the consistency checks. This
|
||||
* is meant to be used only as the last resort.
|
||||
**/
|
||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Pending configuration (if any) for the next session.
|
||||
*
|
||||
@@ -765,7 +770,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[Bytes, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
@@ -1072,7 +1077,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||
* Does not have any entries before the session index in the first session change notification.
|
||||
**/
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
@@ -139,7 +139,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
|
||||
* also decrease the total issuance of the system (`TotalIssuance`).
|
||||
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
|
||||
* If the new free or reserved balance is below the existential deposit,
|
||||
* it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
*
|
||||
@@ -150,7 +150,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
||||
* It will decrease the total issuance of the system by the `TransferFee`.
|
||||
* If the sender's account is below the existential deposit as a result
|
||||
* of the transfer, the account will be reaped.
|
||||
*
|
||||
@@ -437,6 +436,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
configuration: {
|
||||
/**
|
||||
* Setting this to true will disable consistency checks for the configuration setters.
|
||||
* Use with caution.
|
||||
**/
|
||||
setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
|
||||
/**
|
||||
* Set the availability period for parachains.
|
||||
**/
|
||||
@@ -553,6 +557,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Sets the minimum delay between announcing the upgrade block for a parachain until the
|
||||
* upgrade taking place.
|
||||
*
|
||||
* See the field documentation for information and constraints for the new value.
|
||||
**/
|
||||
setMinimumValidationUpgradeDelay: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
@@ -604,14 +610,14 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
||||
**/
|
||||
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
||||
/**
|
||||
* Set the validation upgrade cooldown.
|
||||
**/
|
||||
setValidationUpgradeCooldown: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the validation upgrade delay.
|
||||
**/
|
||||
setValidationUpgradeDelay: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the validation upgrade frequency.
|
||||
**/
|
||||
setValidationUpgradeFrequency: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the zeroth delay tranche width.
|
||||
**/
|
||||
@@ -1896,7 +1902,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - Plus Call Weight
|
||||
* # </weight>
|
||||
**/
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Bytes, bool, u64]>;
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
||||
/**
|
||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||
*
|
||||
@@ -1967,6 +1973,22 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
paras: {
|
||||
/**
|
||||
* Adds the validation code to the storage.
|
||||
*
|
||||
* The code will not be added if it is already present. Additionally, if PVF pre-checking
|
||||
* is running for that code, it will be instantly accepted.
|
||||
*
|
||||
* Otherwise, the code will be added into the storage. Note that the code will be added
|
||||
* into storage with reference count 0. This is to account the fact that there are no users
|
||||
* for this code yet. The caller will have to make sure that this code eventually gets
|
||||
* used by some parachain or removed from the storage to avoid storage leaks. For the latter
|
||||
* prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation.
|
||||
*
|
||||
* This function is mainly meant to be used for upgrading parachains that do not follow
|
||||
* the go-ahead signal while the PVF pre-checking feature is enabled.
|
||||
**/
|
||||
addTrustedValidationCode: AugmentedSubmittable<(validationCode: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Note a new block head for para within the context of the current block.
|
||||
**/
|
||||
@@ -1993,7 +2015,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV1PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
* This is better than removing the storage directly, because it will not remove the code
|
||||
* that was suddenly got used by some parachain while this dispatchable was pending
|
||||
* dispatching.
|
||||
**/
|
||||
pokeUnusedValidationCode: AugmentedSubmittable<(validationCodeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2102,7 +2132,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -983,6 +983,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
NotRegistered: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism
|
||||
* is disabled.
|
||||
**/
|
||||
PvfCheckDisabled: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given validator already has cast a vote.
|
||||
**/
|
||||
|
||||
@@ -552,6 +552,21 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A new head has been noted for a Para. `para_id`
|
||||
**/
|
||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* The given validation code was rejected by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given validation code was accepted by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given para either initiated or subscribed to a PVF check for the given validation
|
||||
* code. `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckStarted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1SessionInfo, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
@@ -264,6 +264,11 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The active configuration for the current session.
|
||||
**/
|
||||
activeConfig: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsConfigurationHostConfiguration>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* If this is set, then the configuration setters will bypass the consistency checks. This
|
||||
* is meant to be used only as the last resort.
|
||||
**/
|
||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Pending configuration (if any) for the next session.
|
||||
*
|
||||
@@ -739,7 +744,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[Bytes, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
@@ -1011,7 +1016,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||
* Does not have any entries before the session index in the first session change notification.
|
||||
**/
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV1PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
@@ -139,7 +139,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
|
||||
* also decrease the total issuance of the system (`TotalIssuance`).
|
||||
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
|
||||
* If the new free or reserved balance is below the existential deposit,
|
||||
* it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
*
|
||||
@@ -150,7 +150,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
||||
* It will decrease the total issuance of the system by the `TransferFee`.
|
||||
* If the sender's account is below the existential deposit as a result
|
||||
* of the transfer, the account will be reaped.
|
||||
*
|
||||
@@ -437,6 +436,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
configuration: {
|
||||
/**
|
||||
* Setting this to true will disable consistency checks for the configuration setters.
|
||||
* Use with caution.
|
||||
**/
|
||||
setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
|
||||
/**
|
||||
* Set the availability period for parachains.
|
||||
**/
|
||||
@@ -553,6 +557,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Sets the minimum delay between announcing the upgrade block for a parachain until the
|
||||
* upgrade taking place.
|
||||
*
|
||||
* See the field documentation for information and constraints for the new value.
|
||||
**/
|
||||
setMinimumValidationUpgradeDelay: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
@@ -604,14 +610,14 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
||||
**/
|
||||
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
||||
/**
|
||||
* Set the validation upgrade cooldown.
|
||||
**/
|
||||
setValidationUpgradeCooldown: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the validation upgrade delay.
|
||||
**/
|
||||
setValidationUpgradeDelay: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the validation upgrade frequency.
|
||||
**/
|
||||
setValidationUpgradeFrequency: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set the zeroth delay tranche width.
|
||||
**/
|
||||
@@ -1845,7 +1851,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - Plus Call Weight
|
||||
* # </weight>
|
||||
**/
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Bytes, bool, u64]>;
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
||||
/**
|
||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||
*
|
||||
@@ -1916,6 +1922,22 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
paras: {
|
||||
/**
|
||||
* Adds the validation code to the storage.
|
||||
*
|
||||
* The code will not be added if it is already present. Additionally, if PVF pre-checking
|
||||
* is running for that code, it will be instantly accepted.
|
||||
*
|
||||
* Otherwise, the code will be added into the storage. Note that the code will be added
|
||||
* into storage with reference count 0. This is to account the fact that there are no users
|
||||
* for this code yet. The caller will have to make sure that this code eventually gets
|
||||
* used by some parachain or removed from the storage to avoid storage leaks. For the latter
|
||||
* prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation.
|
||||
*
|
||||
* This function is mainly meant to be used for upgrading parachains that do not follow
|
||||
* the go-ahead signal while the PVF pre-checking feature is enabled.
|
||||
**/
|
||||
addTrustedValidationCode: AugmentedSubmittable<(validationCode: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Note a new block head for para within the context of the current block.
|
||||
**/
|
||||
@@ -1942,7 +1964,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV1PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
* This is better than removing the storage directly, because it will not remove the code
|
||||
* that was suddenly got used by some parachain while this dispatchable was pending
|
||||
* dispatching.
|
||||
**/
|
||||
pokeUnusedValidationCode: AugmentedSubmittable<(validationCodeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2044,7 +2074,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
|
||||
@@ -206,11 +206,30 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* The maximum number of tries that can be queued for deletion.
|
||||
* The maximum number of contracts that can be pending for deletion.
|
||||
*
|
||||
* When a contract is deleted by calling `seal_terminate` it becomes inaccessible
|
||||
* immediately, but the deletion of the storage items it has accumulated is performed
|
||||
* later. The contract is put into the deletion queue. This defines how many
|
||||
* contracts can be queued up at the same time. If that limit is reached `seal_terminate`
|
||||
* will fail. The action must be retried in a later block in that case.
|
||||
*
|
||||
* The reasons for limiting the queue depth are:
|
||||
*
|
||||
* 1. The queue is in storage in order to be persistent between blocks. We want to limit
|
||||
* the amount of storage that can be consumed.
|
||||
* 2. The queue is stored in a vector and needs to be decoded as a whole when reading
|
||||
* it at the end of each block. Longer queues take more weight to decode and hence
|
||||
* limit the amount of items that can be deleted per block.
|
||||
**/
|
||||
deletionQueueDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of weight that can be consumed per block for lazy trie removal.
|
||||
*
|
||||
* The amount of weight that is dedicated per block to work on the deletion queue. Larger
|
||||
* values allow more trie keys to be deleted in each block but reduce the amount of
|
||||
* weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more
|
||||
* information about the deletion queue.
|
||||
**/
|
||||
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -223,6 +242,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance a caller has to pay for each storage item.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
* Changing this value for an existing chain might need a storage migration.
|
||||
|
||||
@@ -255,6 +255,12 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* No code could be found at the supplied code hash.
|
||||
**/
|
||||
CodeNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The contract's code was found to be invalid during validation or instrumentation.
|
||||
* A more detailed error can be found on the node console if debug messages are enabled
|
||||
* or in the debug buffer which is returned to RPC clients.
|
||||
**/
|
||||
CodeRejected: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The code supplied to `instantiate_with_code` exceeds the limit specified in the
|
||||
* current schedule.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
@@ -723,7 +723,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[Bytes, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
||||
@@ -533,7 +533,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
|
||||
* also decrease the total issuance of the system (`TotalIssuance`).
|
||||
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
|
||||
* If the new free or reserved balance is below the existential deposit,
|
||||
* it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
*
|
||||
@@ -544,7 +544,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
||||
* It will decrease the total issuance of the system by the `TransferFee`.
|
||||
* If the sender's account is below the existential deposit as a result
|
||||
* of the transfer, the account will be reaped.
|
||||
*
|
||||
@@ -1625,7 +1624,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
@@ -2266,7 +2265,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - Plus Call Weight
|
||||
* # </weight>
|
||||
**/
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Bytes, bool, u64]>;
|
||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
||||
/**
|
||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
]
|
||||
}
|
||||
@@ -10,10 +10,10 @@
|
||||
"**/kusama/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/rpc-core": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2",
|
||||
"rxjs": "^7.5.1"
|
||||
"@polkadot/rpc-core": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3",
|
||||
"rxjs": "^7.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../rpc-core" },
|
||||
{ "path": "../types" }
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/types-codec": "7.2.1",
|
||||
"@polkadot/types-create": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2",
|
||||
"@polkadot/util-crypto": "^8.2.2",
|
||||
"rxjs": "^7.5.1"
|
||||
"@polkadot/api": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/types-codec": "7.5.1",
|
||||
"@polkadot/types-create": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3",
|
||||
"@polkadot/util-crypto": "^8.3.3",
|
||||
"rxjs": "^7.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "7.2.1",
|
||||
"@polkadot/keyring": "^8.2.2"
|
||||
"@polkadot/api-augment": "7.5.1",
|
||||
"@polkadot/keyring": "^8.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ interface JSONAbi {
|
||||
},
|
||||
V2: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V3: {
|
||||
spec: SpecDef;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +59,10 @@ describe('Abi', (): void => {
|
||||
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
try {
|
||||
const messageIds = (abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
label || (
|
||||
Array.isArray(name)
|
||||
? name[0]
|
||||
? name.join('::')
|
||||
: name
|
||||
)
|
||||
);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { TypeRegistry } from '@polkadot/types';
|
||||
import { TypeDefInfo } from '@polkadot/types-create';
|
||||
import { assert, assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { v0ToLatest, v1ToLatest } from './toLatest';
|
||||
import { convertVersions, enumVersions } from './toLatest';
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
@@ -26,23 +26,18 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
|
||||
}
|
||||
|
||||
// FIXME: This is still workable with V0, V1 & V2, but certainly is not a scalable
|
||||
// approach (right at this point don't quite have better ideas that is not as complex
|
||||
// as the conversion tactics in the runtime Metadata)
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
const metadata = registry.createType('ContractMetadata',
|
||||
isObject(json.V2)
|
||||
? { V2: json.V2 }
|
||||
: isObject(json.V1)
|
||||
? { V1: json.V1 }
|
||||
: { V0: json }
|
||||
vx
|
||||
? { [vx]: json[vx] }
|
||||
: { V0: json }
|
||||
) as unknown as ContractMetadata;
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
return metadata.isV2
|
||||
? metadata.asV2
|
||||
: metadata.isV1
|
||||
? v1ToLatest(registry, metadata.asV1)
|
||||
: v0ToLatest(registry, metadata.asV0);
|
||||
assert(converter, () => `Unable to convert ABI with version ${metadata.type} to latest`);
|
||||
|
||||
return converter[1](registry, metadata[`as${converter[0]}`]);
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
|
||||
@@ -90,7 +85,8 @@ export class Abi {
|
||||
);
|
||||
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
|
||||
this.#createMessage(spec, index, {
|
||||
isConstructor: true
|
||||
isConstructor: true,
|
||||
isPayable: spec.payable.isTrue
|
||||
})
|
||||
);
|
||||
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
|
||||
@@ -209,6 +205,7 @@ export class Abi {
|
||||
identifier,
|
||||
index,
|
||||
method: stringCamelCase(identifier),
|
||||
path: identifier.split('::').map((s) => stringCamelCase(s)),
|
||||
selector: spec.selector,
|
||||
toU8a: (params: unknown[]) =>
|
||||
this.#encodeArgs(spec, args, params)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { v0ToLatest, v1ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
@@ -65,9 +65,58 @@ describe('v1ToLatest', (): void => {
|
||||
).toEqual(['flip', 'get']);
|
||||
});
|
||||
|
||||
it('has the correct messages with namespaced method name', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'PSP22Metadata::token_name', 'PSP22Metadata::token_symbol', 'PSP22Metadata::token_decimals', 'PSP22Mintable::mint', 'PSP22::decrease_allowance', 'PSP22::transfer', 'PSP22::approve', 'PSP22::allowance', 'PSP22::transfer_from', 'PSP22::balance_of', 'PSP22::increase_allowance', 'PSP22::total_supply', 'pause', 'unpause'
|
||||
]);
|
||||
});
|
||||
|
||||
it('has the correct constructor arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['init_value']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v2ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
|
||||
const latest = v2ToLatest(registry, contract.asV2);
|
||||
|
||||
it('has the correct constructor flag', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v3ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,38 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
|
||||
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { v0ToV1 } from './toV1';
|
||||
import { v1ToV2 } from './toV2';
|
||||
import { v2ToV3 } from './toV3';
|
||||
|
||||
export function v1ToLatest (registry: Registry, v1: ContractMetadataV1): ContractMetadataLatest {
|
||||
return v1ToV2(registry, v1);
|
||||
type Versions = 'V3' | 'V2' | 'V1' | 'V0';
|
||||
|
||||
type Converter = (registry: Registry, vx: any) => ContractMetadataLatest;
|
||||
|
||||
// Helper to convert metadata from one step to the next
|
||||
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataLatest, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataLatest {
|
||||
return (registry: Registry, input: I): ContractMetadataLatest =>
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v0ToLatest (registry: Registry, v0: ContractMetadataV0): ContractMetadataLatest {
|
||||
return v1ToLatest(registry, v0ToV1(registry, v0));
|
||||
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
|
||||
return v3;
|
||||
}
|
||||
|
||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = ['V3', 'V2', 'V1'];
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V3', v3ToLatest],
|
||||
['V2', v2ToLatest],
|
||||
['V1', v1ToLatest],
|
||||
['V0', v0ToLatest]
|
||||
];
|
||||
|
||||
@@ -7,8 +7,25 @@ import type { Registry } from '@polkadot/types/types';
|
||||
import { convertSiV0toV1 } from '@polkadot/types';
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
interface Named {
|
||||
name: unknown;
|
||||
}
|
||||
|
||||
function v0ToV1Names (all: Named[]): unknown[] {
|
||||
return all.map((e) =>
|
||||
objectSpread({}, e, {
|
||||
name: Array.isArray(e.name)
|
||||
? e.name
|
||||
: [e.name]
|
||||
}));
|
||||
}
|
||||
|
||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||
spec: objectSpread({}, v0.spec, {
|
||||
constructors: v0ToV1Names(v0.spec.constructors),
|
||||
messages: v0ToV1Names(v0.spec.messages)
|
||||
}),
|
||||
types: convertSiV0toV1(registry, v0.types)
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ const ARG_TYPES = {
|
||||
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
||||
return objectSpread({}, entry, {
|
||||
label: Array.isArray(entry.name)
|
||||
? entry.name[0]
|
||||
? entry.name.join('::')
|
||||
: entry.name
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV2, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
export function v2ToV3 (registry: Registry, v2: ContractMetadataV2): ContractMetadataV3 {
|
||||
return registry.createType('ContractMetadataV3', objectSpread({}, v2, {
|
||||
spec: objectSpread({}, v2.spec, {
|
||||
constructors: v2.spec.constructors.map((c) =>
|
||||
// V3 introduces the payable flag on constructors, for <V3, it is always true
|
||||
registry.createType('ContractConstructorSpecV3', objectSpread({}, c, { payable: true }))
|
||||
)
|
||||
})
|
||||
}));
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx((o, p) => this.#deploy(c, o, p));
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#deploy(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx((o, p) => this.#instantiate(c, o, p));
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#instantiate(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { assert, BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefine
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent, extractOptions, isOptions } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { withMeta } from './util';
|
||||
|
||||
export interface ContractConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
||||
@@ -29,18 +30,20 @@ const ERROR_NO_CALL = 'Your node does not expose the contracts.call RPC. This is
|
||||
|
||||
const l = logger('Contract');
|
||||
|
||||
function createQuery <ApiType extends ApiTypes> (fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
|
||||
return (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
|
||||
function createQuery <ApiType extends ApiTypes> (meta: AbiMessage, fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
|
||||
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
|
||||
isOptions(options)
|
||||
? fn(origin, options, params)
|
||||
: fn(origin, ...extractOptions<ContractOptions>(options, params));
|
||||
: fn(origin, ...extractOptions<ContractOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
function createTx <ApiType extends ApiTypes> (fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
|
||||
return (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
|
||||
function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
|
||||
return withMeta(meta, (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
|
||||
isOptions(options)
|
||||
? fn(options, params)
|
||||
: fn(...extractOptions<ContractOptions>(options, params));
|
||||
: fn(...extractOptions<ContractOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
export class ContractSubmittableResult extends SubmittableResult {
|
||||
@@ -70,11 +73,11 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.messages.forEach((m): void => {
|
||||
if (isUndefined(this.#tx[m.method])) {
|
||||
this.#tx[m.method] = createTx((o, p) => this.#exec(m, o, p));
|
||||
this.#tx[m.method] = createTx(m, (o, p) => this.#exec(m, o, p));
|
||||
}
|
||||
|
||||
if (isUndefined(this.#query[m.method])) {
|
||||
this.#query[m.method] = createQuery((f, o, p) => this.#read(m, o, p).send(f));
|
||||
this.#query[m.method] = createQuery(m, (f, o, p) => this.#read(m, o, p).send(f));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,23 +8,31 @@ import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
|
||||
|
||||
export interface BlueprintDeploy<ApiType extends ApiTypes> {
|
||||
export interface MessageMeta {
|
||||
readonly meta: AbiMessage;
|
||||
}
|
||||
|
||||
export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(value: bigint | string | number | BN, gasLimit: bigint | string | number | BN, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractQuery<ApiType extends ApiTypes> {
|
||||
export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(origin: AccountId | string | Uint8Array, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
}
|
||||
|
||||
export interface ContractTx<ApiType extends ApiTypes> {
|
||||
export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractGeneric<O, T> {
|
||||
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(messageOrId: AbiMessage | string | number, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): T;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { SubmittableResult } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||
|
||||
import { Bytes } from '@polkadot/types';
|
||||
@@ -16,11 +16,18 @@ import { extractOptions, isOptions } from '../util';
|
||||
|
||||
export const EMPTY_SALT = new Uint8Array();
|
||||
|
||||
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
|
||||
return (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
|
||||
export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, creator: Omit<T, 'meta'>): T {
|
||||
(creator as T).meta = meta;
|
||||
|
||||
return creator as T;
|
||||
}
|
||||
|
||||
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
|
||||
return withMeta(meta, (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
|
||||
isOptions(options)
|
||||
? fn(options, params)
|
||||
: fn(...extractOptions<BlueprintOptions>(options, params));
|
||||
: fn(...extractOptions<BlueprintOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T> {
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -0,0 +1,529 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len",
|
||||
"typeName": "u32"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries",
|
||||
"typeName": "u32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev",
|
||||
"typeName": "Index"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"type": "{\"value\":\"u128\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 9,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 13,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 14,
|
||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 17,
|
||||
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 19,
|
||||
"type": "Option<Text>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, ContractsErrorsPsp22Psp22Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "{\"_enum\":{\"Custom\":\"Text\",\"InsufficientBalance\":\"Null\",\"InsufficientAllowance\":\"Null\",\"ZeroRecipientAddress\":\"Null\",\"ZeroSenderAddress\":\"Null\",\"SafeTransferCheckFailed\":\"Text\"}}",
|
||||
"docs": [],
|
||||
"namespace": "contracts::traits::errors::psp22::PSP22Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 0,
|
||||
"name": "Custom"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "InsufficientAllowance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "ZeroRecipientAddress"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 4,
|
||||
"name": "ZeroSenderAddress"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 5,
|
||||
"name": "SafeTransferCheckFailed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 23,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,204 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "[u8;32]"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 6,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 7,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Null, TraitErc20Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "trait_erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,5 +5,6 @@ import { createVersionedExport } from '../util';
|
||||
import * as v0 from './v0';
|
||||
import * as v1 from './v1';
|
||||
import * as v2 from './v2';
|
||||
import * as v3 from './v3';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2 });
|
||||
export default createVersionedExport({ v0, v1, v2, v3 });
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json';
|
||||
// A complex contract example with traits.
|
||||
export { default as psp22 } from './psp22_minter_pauser.contract.json';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xbb381c2fc980121b17c7b2bf2756d5964a12151cb846e0a9eff9cc337806456d",
|
||||
"language": "ink! 3.0.0-rc7",
|
||||
"compiler": "rustc 1.60.0-nightly",
|
||||
"wasm": "0x0061736d0100000001280860027f7f0060000060037f7f7f0060017f006000017f60017f017f60037f7f7f017f60017f017e02880106057365616c30107365616c5f7365745f73746f726167650002057365616c30107365616c5f6765745f73746f726167650006057365616c300a7365616c5f696e7075740000057365616c300b7365616c5f72657475726e0002057365616c30167365616c5f76616c75655f7472616e73666572726564000003656e76066d656d6f727902010210030a090400050103070001000608017f01418080040b071102066465706c6f7900080463616c6c000c0ac40b096102027f027e230041206b22002400200041106a22014200370300200042003703082000411036021c200041086a2000411c6a1004200028021c41114f0440000b2001290300210220002903082103200041206a2400410541042002200384501b0bc20101027f230041306b220224004101210302402000027f20014101714504404104100541ff01714105470d011a0b200241106a4200370300200241186a4200370300200241206a42003703002002420037030820024201370300200241808001360228200241086a41808004200241286a100120022802282201418180014f720d012002200136022c200241808004360228200241286a100741ff017122014102460d014100210320014100470b3a0001200020033a0000200241306a24000f0b000b4201027f230041106b22012400200141086a2000100d20012d0009210020012d00082102200141106a240041024101410220004101461b410020001b20024101711b0bd30202057f027e230041306b2200240020004180800136020c200041808004360208200041086a1009200020002903083703100240200041106a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721012005421888a721022005421088a7210302402006a741087641ff0171220441ed014704402004419b0147200341ff017141ae014772200241ff0171419d0147200141de004772720d02200041106a100741ff017122014102460d02100541ff01714105470d02200041286a4200370300200041206a4200370300200041186a4200370300200042003703102001410171200041106a100b0c010b200341ff017141cb0047200241ff0171419d0147722001411b47720d01200041286a4200370300200041206a4200370300200041186a4200370300200042003703104100200041106a100b0b200041306a24000f0b000b4101027f230041106b2201240020012000280204220236020c20002802002001410c6a10022002200128020c2202490440000b20002002360204200141106a24000b850102027f017e230041106b220124002001420437030841042102027f02400240034020012000100d20012d00004101710d01200141086a20026a20012d00013a0000200241016a22024108470d000b20012903082203a741044f0d01000b4101210241000c010b410021022003422088a70b2100200141106a24002002ad2000ad420886840b6b01017f230041306b220224004180800420003a0000200241286a200141186a290000370300200241206a200141106a290000370300200241186a200141086a2900003703002002420137030820022001290000370310200241106a4180800441011000200241306a24000b910302057f027e230041406a22002400024002400240100541ff01714105470d0020004180800136021c200041808004360218200041186a100920002000290318370320027f0240200041206a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721022005421888a721012005421088a721032006a741087641ff01712204412f470440200441e30047200341ff0171413a4772200141ff017141a50147200241d1004772720d014101210141000c020b200341ff017141860147200141ff017141db0047720d00410021014100200241d901460d011a0b4101210141010b0d00024020010440200041086a418002100620002d0009210120002d00084101710d01200041386a4200370300200041306a4200370300200041286a4200370300200042003703202001417f73410171200041206a100b0c040b200041106a4100100620002d0011210120002d0010410171450d020b20014105460d020b000b4180800420014101713a000041004180800441011003000b200041406b24000b3c01017f200020012802042202047f2001200241016b36020420012001280200220141016a36020020012d00000520010b3a000120002002453a00000b"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc7",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"V3": {
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "default",
|
||||
"payable": true,
|
||||
"selector": "0xed4b9d1b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "get",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json';
|
||||
// A complex contract example with traits.
|
||||
export { default as traitErc20 } from './trait_erc20.contract.json';
|
||||
File diff suppressed because one or more lines are too long
@@ -40,6 +40,7 @@ export interface AbiMessage {
|
||||
isMutating?: boolean;
|
||||
isPayable?: boolean;
|
||||
method: string;
|
||||
path: string[];
|
||||
returnType?: TypeDef | null;
|
||||
selector: ContractSelector;
|
||||
toU8a: (params: unknown[]) => Uint8Array;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
"mock.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-create" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-create/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"mock.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../api-augment" },
|
||||
{ "path": "../api-contract" },
|
||||
{ "path": "../types" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-contract/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api": "7.2.1",
|
||||
"@polkadot/api-augment": "7.2.1",
|
||||
"@polkadot/api-base": "7.2.1",
|
||||
"@polkadot/rpc-core": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/types-codec": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2",
|
||||
"@polkadot/util-crypto": "^8.2.2",
|
||||
"rxjs": "^7.5.1"
|
||||
"@polkadot/api": "7.5.1",
|
||||
"@polkadot/api-augment": "7.5.1",
|
||||
"@polkadot/api-base": "7.5.1",
|
||||
"@polkadot/rpc-core": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/types-codec": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3",
|
||||
"@polkadot/util-crypto": "^8.3.3",
|
||||
"rxjs": "^7.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "7.2.1",
|
||||
"@polkadot/api-augment": "7.2.1",
|
||||
"@polkadot/rpc-augment": "7.2.1",
|
||||
"@polkadot/rpc-provider": "7.2.1",
|
||||
"@polkadot/types-support": "7.2.1"
|
||||
"@polkadot/api": "7.5.1",
|
||||
"@polkadot/api-augment": "7.5.1",
|
||||
"@polkadot/rpc-augment": "7.5.1",
|
||||
"@polkadot/rpc-provider": "7.5.1",
|
||||
"@polkadot/types-support": "7.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { HeaderExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -39,7 +38,7 @@ export function getHeader (instanceId: string, api: DeriveApi): (blockHash: Uint
|
||||
)
|
||||
]).pipe(
|
||||
map(([header, validators]) =>
|
||||
createHeaderExtended(header.registry as Registry, header, validators)
|
||||
createHeaderExtended(header.registry, header, validators)
|
||||
),
|
||||
catchError((): Observable<undefined> =>
|
||||
// where rpc.chain.getHeader throws, we will land here - it can happen that
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { SignedBlockExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -33,7 +32,7 @@ export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => O
|
||||
]);
|
||||
}),
|
||||
map(([header, block, events]) =>
|
||||
createSignedBlockExtended(block.registry as Registry, block, events, header.validators)
|
||||
createSignedBlockExtended(block.registry, block, events, header.validators)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { HeaderExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -35,7 +34,7 @@ export function subscribeNewHeads (instanceId: string, api: DeriveApi): () => Ob
|
||||
map(([header, validators]): HeaderExtended => {
|
||||
header.createdAtHash = header.hash;
|
||||
|
||||
return createHeaderExtended(header.registry as Registry, header, validators);
|
||||
return createHeaderExtended(header.registry, header, validators);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/test/*",
|
||||
"**/checkTypes.manual.ts",
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/test/*",
|
||||
"**/checkTypes.manual.ts",
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../api-augment" },
|
||||
{ "path": "../rpc-core" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" }
|
||||
]
|
||||
}
|
||||
@@ -13,15 +13,15 @@
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../api-augment" },
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../api-derive" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../rpc-provider" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-augment" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-support" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../api-derive/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../rpc-provider/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-support/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
+18
-18
@@ -20,29 +20,29 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api-augment": "7.2.1",
|
||||
"@polkadot/api-base": "7.2.1",
|
||||
"@polkadot/api-derive": "7.2.1",
|
||||
"@polkadot/keyring": "^8.2.2",
|
||||
"@polkadot/rpc-augment": "7.2.1",
|
||||
"@polkadot/rpc-core": "7.2.1",
|
||||
"@polkadot/rpc-provider": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/types-augment": "7.2.1",
|
||||
"@polkadot/types-codec": "7.2.1",
|
||||
"@polkadot/types-create": "7.2.1",
|
||||
"@polkadot/types-known": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2",
|
||||
"@polkadot/util-crypto": "^8.2.2",
|
||||
"@polkadot/api-augment": "7.5.1",
|
||||
"@polkadot/api-base": "7.5.1",
|
||||
"@polkadot/api-derive": "7.5.1",
|
||||
"@polkadot/keyring": "^8.3.3",
|
||||
"@polkadot/rpc-augment": "7.5.1",
|
||||
"@polkadot/rpc-core": "7.5.1",
|
||||
"@polkadot/rpc-provider": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/types-augment": "7.5.1",
|
||||
"@polkadot/types-codec": "7.5.1",
|
||||
"@polkadot/types-create": "7.5.1",
|
||||
"@polkadot/types-known": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3",
|
||||
"@polkadot/util-crypto": "^8.3.3",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.5.1"
|
||||
"rxjs": "^7.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "7.2.1",
|
||||
"@polkadot/types-support": "7.2.1"
|
||||
"@polkadot/api-augment": "7.5.1",
|
||||
"@polkadot/types-support": "7.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
const lazySection = (section: string) =>
|
||||
lazyMethods({}, Object.keys(query[section]), (method: string) =>
|
||||
blockHash
|
||||
? this._decorateStorageEntryAt(registry as Registry, query[section][method], decorateMethod, blockHash)
|
||||
? this._decorateStorageEntryAt(registry, query[section][method], decorateMethod, blockHash)
|
||||
: this._decorateStorageEntry(query[section][method], decorateMethod)
|
||||
);
|
||||
|
||||
@@ -526,7 +526,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
decorated.sizeAt = decorateMethod((blockHash: Hash | Uint8Array | string, ...args: unknown[]): Observable<u64> =>
|
||||
getQueryAt(blockHash).pipe(
|
||||
switchMap((q) =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(args, q.creator.meta.registry as Registry), blockHash))));
|
||||
this._rpcCore.state.getStorageSize(getArgs(args, q.creator.meta.registry), blockHash))));
|
||||
|
||||
// .keys() & .entries() only available on map types
|
||||
if (creator.iterKey && creator.meta.type.isMap) {
|
||||
@@ -613,6 +613,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
this._retrieveMapKeys(creator, blockHash, args)));
|
||||
}
|
||||
|
||||
if (this.supportMulti && creator.meta.type.isMap) {
|
||||
// When using double map storage function, user need to pass double map key as an array
|
||||
decorated.multi = decorateMethod((args: unknown[]): Observable<Codec[]> =>
|
||||
creator.meta.type.asMap.hashers.length === 1
|
||||
? this._retrieveMulti(args.map((a) => [creator, [a]]), blockHash)
|
||||
: this._retrieveMulti(args.map((a) => [creator, a as unknown[]]), blockHash)
|
||||
);
|
||||
}
|
||||
|
||||
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
return this._decorateFunctionMeta(creator as unknown as MetaDecoration, decorated) as unknown as QueryableStorageEntry<ApiType>;
|
||||
@@ -647,17 +656,21 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
// retrieve a set of values for a specific set of keys - here we chunk the keys into PAGE_SIZE sizes
|
||||
private _retrieveMulti (keys: [StorageEntry, unknown[]][]): Observable<Codec[]> {
|
||||
private _retrieveMulti (keys: [StorageEntry, unknown[]][], blockHash?: Uint8Array): Observable<Codec[]> {
|
||||
if (!keys.length) {
|
||||
return of([]);
|
||||
}
|
||||
|
||||
const queryCall = this.hasSubscriptions
|
||||
const queryCall = this.hasSubscriptions && !blockHash
|
||||
? this._rpcCore.state.subscribeStorage
|
||||
: this._rpcCore.state.queryStorageAt;
|
||||
|
||||
return combineLatest(
|
||||
arrayChunk(keys, PAGE_SIZE_V).map((keys) => queryCall(keys))
|
||||
arrayChunk(keys, PAGE_SIZE_V).map((k) =>
|
||||
blockHash
|
||||
? queryCall(k, blockHash)
|
||||
: queryCall(k)
|
||||
)
|
||||
).pipe(
|
||||
map(arrayFlatten)
|
||||
);
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import type { Observable, OperatorFunction } from 'rxjs';
|
||||
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
|
||||
import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
||||
import type { CodecRegistry } from '@polkadot/types-codec/types';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { ApiInterfaceRx, ApiTypes, PromiseOrObs, SignerResult } from '../types';
|
||||
import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, SubmittableExtrinsic, SubmittablePaymentResult, SubmittableResultResult, SubmittableResultSubscription } from './types';
|
||||
|
||||
@@ -26,7 +26,7 @@ interface SubmittableOptions<ApiType extends ApiTypes> {
|
||||
|
||||
const identity = <T> (input: T): T => input;
|
||||
|
||||
function makeEraOptions (api: ApiInterfaceRx, registry: CodecRegistry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
||||
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
||||
if (!header) {
|
||||
if (isNumber(partialOptions.era)) {
|
||||
// since we have no header, it is immortal, remove any option overrides
|
||||
@@ -84,7 +84,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
||||
|
||||
#transformResult: (input: ISubmittableResult) => ISubmittableResult = identity;
|
||||
|
||||
constructor (registry: CodecRegistry, extrinsic: Call | Extrinsic | Uint8Array | string) {
|
||||
constructor (registry: Registry, extrinsic: Call | Extrinsic | Uint8Array | string) {
|
||||
super(registry, extrinsic, { version: api.extrinsicType });
|
||||
|
||||
this.#ignoreStatusCb = apiType === 'rxjs';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/checkTypes.manual.ts",
|
||||
"**/*.spec.ts",
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../api-derive/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../rpc-provider/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-known/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/checkTypes.manual.ts",
|
||||
"**/*.spec.ts",
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../api-derive" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../rpc-core" },
|
||||
{ "path": "../rpc-provider" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-known" }
|
||||
]
|
||||
}
|
||||
@@ -13,14 +13,14 @@
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../api-augment" },
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../api-derive" },
|
||||
{ "path": "../rpc-core" },
|
||||
{ "path": "../rpc-provider" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-known" },
|
||||
{ "path": "../types-support" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../api-derive/tsconfig.build.json" },
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../rpc-provider/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-known/tsconfig.build.json" },
|
||||
{ "path": "../types-support/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/rpc-core": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/types-codec": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2"
|
||||
"@polkadot/rpc-core": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/types-codec": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/rpc-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/rpc-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
module.exports = typeof __dirname === 'string'
|
||||
? __dirname.replace('/cjs', '')
|
||||
: undefined;
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type":"commonjs"
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import dirname from './cjs/dirname';
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, dirname, others);
|
||||
detectPackage(packageInfo, null, others);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', version: '7.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.5.1' };
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" }
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.2.1",
|
||||
"version": "7.5.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/rpc-augment": "7.2.1",
|
||||
"@polkadot/rpc-provider": "7.2.1",
|
||||
"@polkadot/types": "7.2.1",
|
||||
"@polkadot/util": "^8.2.2",
|
||||
"rxjs": "^7.5.1"
|
||||
"@polkadot/rpc-augment": "7.5.1",
|
||||
"@polkadot/rpc-provider": "7.5.1",
|
||||
"@polkadot/types": "7.5.1",
|
||||
"@polkadot/util": "^8.3.3",
|
||||
"rxjs": "^7.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^8.2.2",
|
||||
"@polkadot/rpc-augment": "7.2.1"
|
||||
"@polkadot/keyring": "^8.3.3",
|
||||
"@polkadot/rpc-augment": "7.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,8 @@ export class RpcCore {
|
||||
? await this.#getBlockRegistry(u8aToU8a(blockHash))
|
||||
: { registry: this.#registryDefault };
|
||||
const params = this._formatInputs(registry, null, def, values);
|
||||
|
||||
// only cache .at(<blockHash>) queries, e.g. where valid blockHash was supplied
|
||||
const result = await this.provider.send<AnyJson>(rpcName, params.map((p) => p.toJSON()), !!blockHash);
|
||||
|
||||
return this._formatResult(isScale, registry, blockHash, method, def, params, result);
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/rpc-core authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
declare const __dirname: string | undefined;
|
||||
|
||||
export default __dirname;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user