git.delta.rocks / unique-network / refs/commits / 755170ea07c5

difftreelog

update unique-types-js

Igor Kozyrev2021-11-24parent: #14a916c.patch.diff
in: master

24 files changed

modifiedtests/README.mddiffbeforeafterboth
51. Checkout polkadot in sibling folder with this project51. Checkout polkadot in sibling folder with this project
6```bash6```bash
7git clone https://github.com/paritytech/polkadot.git && cd polkadot7git clone https://github.com/paritytech/polkadot.git && cd polkadot
8git checkout release-v0.9.98git checkout release-v0.9.12
9```9```
1010
112. Build with nightly-2021-06-28112. Build with nightly-2021-06-28
modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, createItemExpectSuccess, nftEventMessage} from '../util/helpers';13import {createCollectionExpectSuccess, createItemExpectSuccess, uniqueEventMessage} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
31 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');31 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');
32 const burnItem = api.tx.unique.burnItem(collectionID, itemID, 1);32 const burnItem = api.tx.unique.burnItem(collectionID, itemID, 1);
33 const events = await submitTransactionAsync(alice, burnItem);33 const events = await submitTransactionAsync(alice, burnItem);
34 const msg = JSON.stringify(nftEventMessage(events));34 const msg = JSON.stringify(uniqueEventMessage(events));
35 expect(msg).to.be.contain(checkSection);35 expect(msg).to.be.contain(checkSection);
36 expect(msg).to.be.contain(checkTreasury);36 expect(msg).to.be.contain(checkTreasury);
37 expect(msg).to.be.contain(checkSystem);37 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {nftEventMessage} from '../util/helpers';13import {uniqueEventMessage} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
29 await usingApi(async (api: ApiPromise) => {29 await usingApi(async (api: ApiPromise) => {
30 const tx = api.tx.unique.createCollection([0x31], [0x32], '0x33', 'NFT');30 const tx = api.tx.unique.createCollection([0x31], [0x32], '0x33', 'NFT');
31 const events = await submitTransactionAsync(alice, tx);31 const events = await submitTransactionAsync(alice, tx);
32 const msg = JSON.stringify(nftEventMessage(events));32 const msg = JSON.stringify(uniqueEventMessage(events));
33 expect(msg).to.be.contain(checkSection);33 expect(msg).to.be.contain(checkSection);
34 expect(msg).to.be.contain(checkTreasury);34 expect(msg).to.be.contain(checkTreasury);
35 expect(msg).to.be.contain(checkSystem);35 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, nftEventMessage, normalizeAccountId} from '../util/helpers';13import {createCollectionExpectSuccess, uniqueEventMessage, normalizeAccountId} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
30 const collectionID = await createCollectionExpectSuccess();30 const collectionID = await createCollectionExpectSuccess();
31 const createItem = api.tx.unique.createItem(collectionID, normalizeAccountId(alice.address), 'NFT');31 const createItem = api.tx.unique.createItem(collectionID, normalizeAccountId(alice.address), 'NFT');
32 const events = await submitTransactionAsync(alice, createItem);32 const events = await submitTransactionAsync(alice, createItem);
33 const msg = JSON.stringify(nftEventMessage(events));33 const msg = JSON.stringify(uniqueEventMessage(events));
34 expect(msg).to.be.contain(checkSection);34 expect(msg).to.be.contain(checkSection);
35 expect(msg).to.be.contain(checkTreasury);35 expect(msg).to.be.contain(checkTreasury);
36 expect(msg).to.be.contain(checkSystem);36 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, nftEventMessage, normalizeAccountId} from '../util/helpers';13import {createCollectionExpectSuccess, uniqueEventMessage, normalizeAccountId} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
31 const args = [{NFT: ['0x31', '0x31']}, {NFT: ['0x32', '0x32']}, {NFT: ['0x33', '0x33']}];31 const args = [{NFT: ['0x31', '0x31']}, {NFT: ['0x32', '0x32']}, {NFT: ['0x33', '0x33']}];
32 const createMultipleItems = api.tx.unique.createMultipleItems(collectionID, normalizeAccountId(alice.address), args);32 const createMultipleItems = api.tx.unique.createMultipleItems(collectionID, normalizeAccountId(alice.address), args);
33 const events = await submitTransactionAsync(alice, createMultipleItems);33 const events = await submitTransactionAsync(alice, createMultipleItems);
34 const msg = JSON.stringify(nftEventMessage(events));34 const msg = JSON.stringify(uniqueEventMessage(events));
35 expect(msg).to.be.contain(checkSection);35 expect(msg).to.be.contain(checkSection);
36 expect(msg).to.be.contain(checkTreasury);36 expect(msg).to.be.contain(checkTreasury);
37 expect(msg).to.be.contain(checkSystem);37 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, nftEventMessage} from '../util/helpers';13import {createCollectionExpectSuccess, uniqueEventMessage} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
29 const collectionID = await createCollectionExpectSuccess();29 const collectionID = await createCollectionExpectSuccess();
30 const destroyCollection = api.tx.unique.destroyCollection(collectionID);30 const destroyCollection = api.tx.unique.destroyCollection(collectionID);
31 const events = await submitTransactionAsync(alice, destroyCollection);31 const events = await submitTransactionAsync(alice, destroyCollection);
32 const msg = JSON.stringify(nftEventMessage(events));32 const msg = JSON.stringify(uniqueEventMessage(events));
33 expect(msg).to.be.contain(checkTreasury);33 expect(msg).to.be.contain(checkTreasury);
34 expect(msg).to.be.contain(checkSystem);34 expect(msg).to.be.contain(checkSystem);
35 });35 });
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, createItemExpectSuccess, nftEventMessage, normalizeAccountId} from '../util/helpers';13import {createCollectionExpectSuccess, createItemExpectSuccess, uniqueEventMessage, normalizeAccountId} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
33 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');33 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');
34 const transfer = api.tx.unique.transfer(normalizeAccountId(bob.address), collectionID, itemID, 1);34 const transfer = api.tx.unique.transfer(normalizeAccountId(bob.address), collectionID, itemID, 1);
35 const events = await submitTransactionAsync(alice, transfer);35 const events = await submitTransactionAsync(alice, transfer);
36 const msg = JSON.stringify(nftEventMessage(events));36 const msg = JSON.stringify(uniqueEventMessage(events));
37 expect(msg).to.be.contain(checkSection);37 expect(msg).to.be.contain(checkSection);
38 expect(msg).to.be.contain(checkTreasury);38 expect(msg).to.be.contain(checkTreasury);
39 expect(msg).to.be.contain(checkSystem);39 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
10import chaiAsPromised from 'chai-as-promised';10import chaiAsPromised from 'chai-as-promised';
11import privateKey from '../substrate/privateKey';11import privateKey from '../substrate/privateKey';
12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';12import usingApi, {submitTransactionAsync} from '../substrate/substrate-api';
13import {createCollectionExpectSuccess, createItemExpectSuccess, nftEventMessage, normalizeAccountId} from '../util/helpers';13import {createCollectionExpectSuccess, createItemExpectSuccess, uniqueEventMessage, normalizeAccountId} from '../util/helpers';
1414
15chai.use(chaiAsPromised);15chai.use(chaiAsPromised);
16const expect = chai.expect;16const expect = chai.expect;
33 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');33 const itemID = await createItemExpectSuccess(alice, collectionID, 'NFT');
34 const transferFrom = api.tx.unique.transferFrom(normalizeAccountId(alice.address), normalizeAccountId(bob.address), collectionID, itemID, 1);34 const transferFrom = api.tx.unique.transferFrom(normalizeAccountId(alice.address), normalizeAccountId(bob.address), collectionID, itemID, 1);
35 const events = await submitTransactionAsync(alice, transferFrom);35 const events = await submitTransactionAsync(alice, transferFrom);
36 const msg = JSON.stringify(nftEventMessage(events));36 const msg = JSON.stringify(uniqueEventMessage(events));
37 expect(msg).to.be.contain(checkSection);37 expect(msg).to.be.contain(checkSection);
38 expect(msg).to.be.contain(checkTreasury);38 expect(msg).to.be.contain(checkTreasury);
39 expect(msg).to.be.contain(checkSystem);39 expect(msg).to.be.contain(checkSystem);
modifiedtests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth
159 [key: string]: Codec;159 [key: string]: Codec;
160 };160 };
161 vesting: {161 vesting: {
162 maxVestingSchedules: u32 & AugmentedConst<ApiType>;
163 /**162 /**
164 * The minimum amount transferred to call `vested_transfer`.163 * The minimum amount transferred to call `vested_transfer`.
165 **/164 **/
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
241 **/241 **/
242 [key: string]: AugmentedError<ApiType>;242 [key: string]: AugmentedError<ApiType>;
243 };243 };
244 nft: {
245 /**
246 * Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.
247 **/
248 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;
249 /**
250 * Collection limit bounds per collection exceeded
251 **/
252 CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
253 /**
254 * This address is not set as sponsor, use setCollectionSponsor first.
255 **/
256 ConfirmUnsetSponsorFail: AugmentedError<ApiType>;
257 /**
258 * Length of items properties must be greater than 0.
259 **/
260 EmptyArgument: AugmentedError<ApiType>;
261 /**
262 * Tried to enable permissions which are only permitted to be disabled
263 **/
264 OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
265 /**
266 * Generic error
267 **/
268 [key: string]: AugmentedError<ApiType>;
269 };
270 nonfungible: {244 nonfungible: {
271 /**245 /**
272 * Used amount > 1 with NFT246 * Used amount > 1 with NFT
395 **/369 **/
396 [key: string]: AugmentedError<ApiType>;370 [key: string]: AugmentedError<ApiType>;
397 };371 };
398 scheduler: {
399 /**
400 * Failed to schedule a call
401 **/
402 FailedToSchedule: AugmentedError<ApiType>;
403 /**
404 * Cannot find the scheduled call.
405 **/
406 NotFound: AugmentedError<ApiType>;
407 /**
408 * Reschedule failed because it does not change scheduled time.
409 **/
410 RescheduleNoChange: AugmentedError<ApiType>;
411 /**
412 * Given target block number is in the past.
413 **/
414 TargetBlockNumberInPast: AugmentedError<ApiType>;
415 /**
416 * Generic error
417 **/
418 [key: string]: AugmentedError<ApiType>;
419 };
420 sudo: {372 sudo: {
421 /**373 /**
422 * Sender must be the Sudo account374 * Sender must be the Sudo account
475 **/427 **/
476 [key: string]: AugmentedError<ApiType>;428 [key: string]: AugmentedError<ApiType>;
477 };429 };
430 unique: {
431 /**
432 * Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.
433 **/
434 CollectionDecimalPointLimitExceeded: AugmentedError<ApiType>;
435 /**
436 * Collection limit bounds per collection exceeded
437 **/
438 CollectionLimitBoundsExceeded: AugmentedError<ApiType>;
439 /**
440 * This address is not set as sponsor, use setCollectionSponsor first.
441 **/
442 ConfirmUnsetSponsorFail: AugmentedError<ApiType>;
443 /**
444 * Length of items properties must be greater than 0.
445 **/
446 EmptyArgument: AugmentedError<ApiType>;
447 /**
448 * Tried to enable permissions which are only permitted to be disabled
449 **/
450 OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
451 /**
452 * Generic error
453 **/
454 [key: string]: AugmentedError<ApiType>;
455 };
478 vesting: {456 vesting: {
479 /**457 /**
480 * Amount being transferred is too low to create a vesting schedule.458 * The vested transfer amount is too low
481 **/459 **/
482 AmountLow: AugmentedError<ApiType>;460 AmountLow: AugmentedError<ApiType>;
483 /**461 /**
484 * The account already has `MaxVestingSchedules` count of schedules and thus462 * Insufficient amount of balance to lock
485 * cannot add another one. Consider merging existing schedules in order to add another.463 **/
486 **/
487 AtMaxVestingSchedules: AugmentedError<ApiType>;464 InsufficientBalanceToLock: AugmentedError<ApiType>;
488 /**465 /**
489 * Failed to create a new schedule because some parameter was invalid.466 * Failed because the maximum vesting schedules was exceeded
490 **/467 **/
491 InvalidScheduleParams: AugmentedError<ApiType>;468 MaxVestingSchedulesExceeded: AugmentedError<ApiType>;
492 /**469 /**
493 * The account given is not vesting.470 * This account have too many vesting schedules
494 **/471 **/
472 TooManyVestingSchedules: AugmentedError<ApiType>;
473 /**
474 * Vesting period is zero
475 **/
495 NotVesting: AugmentedError<ApiType>;476 ZeroVestingPeriod: AugmentedError<ApiType>;
496 /**477 /**
497 * An index was out of bounds of the vesting schedules.478 * Number of vests is zero
498 **/479 **/
499 ScheduleIndexOutOfBounds: AugmentedError<ApiType>;480 ZeroVestingPeriodCount: AugmentedError<ApiType>;
500 /**481 /**
501 * Generic error482 * Generic error
502 **/483 **/
modifiedtests/src/interfaces/augment-api-events.tsdiffbeforeafterboth
2/* eslint-disable */2/* eslint-disable */
33
4import type { EthereumLog, EvmCoreErrorExitReason } from './ethereum';4import type { EthereumLog, EvmCoreErrorExitReason } from './ethereum';
5import type { PalletCommonAccountBasicCrossAccountIdRepr } from './nft';5import type { PalletCommonAccountBasicCrossAccountIdRepr } from './unique';
6import type { ApiTypes } from '@polkadot/api/types';6import type { ApiTypes } from '@polkadot/api/types';
7import type { Bytes, Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types';7import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types';
8import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';8import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
9import type { FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';9import type { FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
10import type { ITuple } from '@polkadot/types/types';
1110
12declare module '@polkadot/api/types/events' {11declare module '@polkadot/api/types/events' {
13 export interface AugmentedEvents<ApiType> {12 export interface AugmentedEvents<ApiType> {
389 **/388 **/
390 [key: string]: AugmentedEvent<ApiType>;389 [key: string]: AugmentedEvent<ApiType>;
391 };390 };
392 scheduler: {
393 /**
394 * Canceled some task. \[when, index\]
395 **/
396 Canceled: AugmentedEvent<ApiType, [u32, u32]>;
397 /**
398 * Dispatched some task. \[task, id, result\]
399 **/
400 Dispatched: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<Bytes>, Result<Null, SpRuntimeDispatchError>]>;
401 /**
402 * Scheduled some task. \[when, index\]
403 **/
404 Scheduled: AugmentedEvent<ApiType, [u32, u32]>;
405 /**
406 * Generic event
407 **/
408 [key: string]: AugmentedEvent<ApiType>;
409 };
410 sudo: {391 sudo: {
411 /**392 /**
412 * The \[sudoer\] just switched identity; the old key is supplied.393 * The \[sudoer\] just switched identity; the old key is supplied.
491 [key: string]: AugmentedEvent<ApiType>;472 [key: string]: AugmentedEvent<ApiType>;
492 };473 };
493 vesting: {474 vesting: {
494 /**475 /**
495 * An \[account\] has become fully vested.476 * Claimed vesting. \[who, locked_amount\]
496 **/477 **/
497 VestingCompleted: AugmentedEvent<ApiType, [AccountId32]>;478 Claimed: AugmentedEvent<ApiType, [AccountId32, u128]>;
498 /**479 /**
499 * The amount vested has been updated. This could indicate a change in funds available.480 * Added new vesting schedule. \[from, to, vesting_schedule\]
500 * The balance given is the amount which is left unvested (and thus locked).481 **/
501 * \[account, unvested\]
502 **/
503 VestingUpdated: AugmentedEvent<ApiType, [AccountId32, u128]>;482 VestingScheduleAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, OrmlVestingVestingSchedule]>;
483 /**
484 * Updated vesting schedules. \[who\]
485 **/
486 VestingSchedulesUpdated: AugmentedEvent<ApiType, [AccountId32]>;
504 /**487 /**
505 * Generic event488 * Generic event
506 **/489 **/
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
2/* eslint-disable */2/* eslint-disable */
33
4import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';4import type { EthereumBlock, EthereumReceipt, EthereumTransactionLegacyTransaction, FpRpcTransactionStatus } from './ethereum';
5import type { NftDataStructsCollection, PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2 } from './nft';
6import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';5import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
6import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';
7import type { ApiTypes } from '@polkadot/api/types';7import type { ApiTypes } from '@polkadot/api/types';
8import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';8import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
9import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';9import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
10import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeGenericDigest } from '@polkadot/types/lookup';10import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeGenericDigest } from '@polkadot/types/lookup';
11import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';11import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
1212
13declare module '@polkadot/api/types/storage' {13declare module '@polkadot/api/types/storage' {
58 /**58 /**
59 * Collection info59 * Collection info
60 **/60 **/
61 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<NftDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;61 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
62 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;62 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
63 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;63 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
64 /**
65 * Not used by code, exists only to provide some types to metadata
66 **/
67 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
64 /**68 /**
65 * List of collection admins69 * List of collection admins
66 **/70 **/
171 **/175 **/
172 [key: string]: QueryableStorageEntry<ApiType>;176 [key: string]: QueryableStorageEntry<ApiType>;
173 };177 };
174 nft: {
175 /**
176 * Used for migrations
177 **/
178 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
179 /**
180 * (Collection id (controlled?2), who created (real))
181 * TODO: Off chain worker should remove from this map when collection gets removed
182 **/
183 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<u32>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;
184 /**
185 * Collection id (controlled?2), owning user (real)
186 **/
187 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<u32>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
188 /**
189 * Collection id (controlled?2), token id (controlled?2)
190 **/
191 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
192 /**
193 * Collection id (controlled?2), token id (controlled?2)
194 **/
195 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
196 /**
197 * Variable metadata sponsoring
198 * Collection id (controlled?2), token id (controlled?2)
199 **/
200 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
201 /**
202 * Generic query
203 **/
204 [key: string]: QueryableStorageEntry<ApiType>;
205 };
206 nftPayment: {
207 /**
208 * Generic query
209 **/
210 [key: string]: QueryableStorageEntry<ApiType>;
211 };
212 nonfungible: {178 nonfungible: {
213 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;179 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
214 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;180 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
383 **/349 **/
384 [key: string]: QueryableStorageEntry<ApiType>;350 [key: string]: QueryableStorageEntry<ApiType>;
385 };351 };
386 scheduler: {
387 /**
388 * Items to be executed, indexed by the block number that they should be executed on.
389 **/
390 agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUnqSchedulerScheduledV2>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
391 /**
392 * Lookup from identity to the block number and index of the task.
393 **/
394 lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
395 specAgenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletUnqSchedulerCallSpec>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
396 /**
397 * Storage version of the pallet.
398 *
399 * New networks start with last version.
400 **/
401 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletUnqSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
402 /**
403 * Generic query
404 **/
405 [key: string]: QueryableStorageEntry<ApiType>;
406 };
407 sudo: {352 sudo: {
408 /**353 /**
409 * The `AccountId` of the sudo key.354 * The `AccountId` of the sudo key.
537 **/482 **/
538 [key: string]: QueryableStorageEntry<ApiType>;483 [key: string]: QueryableStorageEntry<ApiType>;
539 };484 };
540 vesting: {485 unique: {
541 /**486 /**
542 * Storage version of the pallet.487 * Used for migrations
543 * 488 **/
544 * New networks start with latest version, as determined by the genesis build.
545 **/
546 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletVestingReleases>, []> & QueryableStorageEntry<ApiType, []>;489 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
547 /**490 /**
548 * Information regarding the vesting of a given account.491 * (Collection id (controlled?2), who created (real))
549 **/492 * TODO: Off chain worker should remove from this map when collection gets removed
493 **/
550 vesting: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Vec<PalletVestingVestingInfo>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;494 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;
495 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
496 /**
497 * Collection id (controlled?2), owning user (real)
498 **/
499 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
500 /**
501 * Approval sponsoring
502 **/
503 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
504 /**
505 * Collection id (controlled?2), token id (controlled?2)
506 **/
507 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
508 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;
509 /**
510 * Collection id (controlled?2), token id (controlled?2)
511 **/
512 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;
513 /**
514 * Variable metadata sponsoring
515 * Collection id (controlled?2), token id (controlled?2)
516 **/
517 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
551 /**518 /**
552 * Generic query519 * Generic query
553 **/520 **/
554 [key: string]: QueryableStorageEntry<ApiType>;521 [key: string]: QueryableStorageEntry<ApiType>;
555 };522 };
523 vesting: {
524 /**
525 * Vesting schedules of an account.
526 *
527 * VestingSchedules: map AccountId => Vec<VestingSchedule>
528 **/
529 vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
530 /**
531 * Generic query
532 **/
533 [key: string]: QueryableStorageEntry<ApiType>;
534 };
556 xcmpQueue: {535 xcmpQueue: {
557 /**536 /**
558 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.537 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.
modifiedtests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth
1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2/* eslint-disable */2/* eslint-disable */
33
4import type { NftDataStructsCollection, NftDataStructsCollectionId, NftDataStructsCollectionStats, NftDataStructsTokenId, PalletCommonAccountBasicCrossAccountIdRepr } from './nft';4import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionStats, UpDataStructsTokenId } from './unique';
5import type { Bytes, HashMap, Json, Metadata, Null, Option, StorageKey, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types';5import type { Bytes, HashMap, Json, Metadata, Null, Option, StorageKey, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types';
6import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';6import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
7import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';7import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
355 **/355 **/
356 version: AugmentedRpc<() => Observable<Text>>;356 version: AugmentedRpc<() => Observable<Text>>;
357 };357 };
358 nft: {
359 /**
360 * Get amount of different user tokens
361 **/
362 accountBalance: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;
363 /**
364 * Get tokens owned by account
365 **/
366 accountTokens: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<NftDataStructsTokenId>>>;
367 /**
368 * Get admin list
369 **/
370 adminlist: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
371 /**
372 * Get allowed amount
373 **/
374 allowance: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
375 /**
376 * Check if user is allowed to use collection
377 **/
378 allowed: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
379 /**
380 * Get allowlist
381 **/
382 allowlist: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
383 /**
384 * Get amount of specific account token
385 **/
386 balance: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
387 /**
388 * Get collection by specified id
389 **/
390 collectionById: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<NftDataStructsCollection>>>;
391 /**
392 * Get collection stats
393 **/
394 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<NftDataStructsCollectionStats>>;
395 /**
396 * Get tokens contained in collection
397 **/
398 collectionTokens: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<NftDataStructsTokenId>>>;
399 /**
400 * Get token constant metadata
401 **/
402 constMetadata: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;
403 /**
404 * Get last token id
405 **/
406 lastTokenId: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<NftDataStructsTokenId>>;
407 /**
408 * Check if token exists
409 **/
410 tokenExists: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
411 /**
412 * Get token owner
413 **/
414 tokenOwner: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;
415 /**
416 * Get token variable metadata
417 **/
418 variableMetadata: AugmentedRpc<(collection: NftDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: NftDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;
419 };
420 offchain: {358 offchain: {
421 /**359 /**
422 * Get offchain local storage under given key and prefix360 * Get offchain local storage under given key and prefix
609 **/547 **/
610 version: AugmentedRpc<() => Observable<Text>>;548 version: AugmentedRpc<() => Observable<Text>>;
611 };549 };
550 unique: {
551 /**
552 * Get amount of different user tokens
553 **/
554 accountBalance: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;
555 /**
556 * Get tokens owned by account
557 **/
558 accountTokens: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenId>>>;
559 /**
560 * Get admin list
561 **/
562 adminlist: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
563 /**
564 * Get allowed amount
565 **/
566 allowance: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
567 /**
568 * Check if user is allowed to use collection
569 **/
570 allowed: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
571 /**
572 * Get allowlist
573 **/
574 allowlist: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
575 /**
576 * Get amount of specific account token
577 **/
578 balance: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
579 /**
580 * Get collection by specified id
581 **/
582 collectionById: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollection>>>;
583 /**
584 * Get collection stats
585 **/
586 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;
587 /**
588 * Get tokens contained in collection
589 **/
590 collectionTokens: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenId>>>;
591 /**
592 * Get token constant metadata
593 **/
594 constMetadata: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;
595 /**
596 * Get last token id
597 **/
598 lastTokenId: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenId>>;
599 /**
600 * Check if token exists
601 **/
602 tokenExists: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
603 /**
604 * Get token owner
605 **/
606 tokenOwner: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;
607 /**
608 * Get token variable metadata
609 **/
610 variableMetadata: AugmentedRpc<(collection: UpDataStructsCollectionId | AnyNumber | Uint8Array, tokenId: UpDataStructsTokenId | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;
611 };
612 web3: {612 web3: {
613 /**613 /**
614 * Returns current client version.614 * Returns current client version.
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
2/* eslint-disable */2/* eslint-disable */
33
4import type { EthereumTransactionLegacyTransaction } from './ethereum';4import type { EthereumTransactionLegacyTransaction } from './ethereum';
5import type { NftDataStructsAccessMode, NftDataStructsCollectionLimits, NftDataStructsCollectionMode, NftDataStructsCreateItemData, NftDataStructsMetaUpdatePermission, NftDataStructsSchemaVersion, PalletCommonAccountBasicCrossAccountIdRepr } from './nft';
6import type { CumulusPrimitivesParachainInherentParachainInherentData } from './polkadot';5import type { CumulusPrimitivesParachainInherentParachainInherentData } from './polkadot';
6import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion } from './unique';
7import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';7import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
8import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';8import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
9import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';9import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
10import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';10import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
11import type { PalletVestingVestingInfo, SpCoreChangesTrieChangesTrieConfiguration, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';11import type { SpCoreChangesTrieChangesTrieConfiguration, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
12import type { AnyNumber, ITuple } from '@polkadot/types/types';12import type { AnyNumber, ITuple } from '@polkadot/types/types';
1313
14declare module '@polkadot/api/types/submittable' {14declare module '@polkadot/api/types/submittable' {
201 **/201 **/
202 [key: string]: SubmittableExtrinsicFunction<ApiType>;202 [key: string]: SubmittableExtrinsicFunction<ApiType>;
203 };203 };
204 nft: {
205 /**
206 * Adds an admin of the Collection.
207 * NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership.
208 *
209 * # Permissions
210 *
211 * * Collection Owner.
212 * * Collection Admin.
213 *
214 * # Arguments
215 *
216 * * collection_id: ID of the Collection to add admin for.
217 *
218 * * new_admin_id: Address of new admin to add.
219 **/
220 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
221 /**
222 * Add an address to allow list.
223 *
224 * # Permissions
225 *
226 * * Collection Owner
227 * * Collection Admin
228 *
229 * # Arguments
230 *
231 * * collection_id.
232 *
233 * * address.
234 **/
235 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
236 /**
237 * Set, change, or remove approved address to transfer the ownership of the NFT.
238 *
239 * # Permissions
240 *
241 * * Collection Owner
242 * * Collection Admin
243 * * Current NFT owner
244 *
245 * # Arguments
246 *
247 * * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).
248 *
249 * * collection_id.
250 *
251 * * item_id: ID of the item.
252 **/
253 approve: AugmentedSubmittable<(spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
254 /**
255 * Destroys a concrete instance of NFT on behalf of the owner
256 * See also: [`approve`]
257 *
258 * # Permissions
259 *
260 * * Collection Owner.
261 * * Collection Admin.
262 * * Current NFT Owner.
263 *
264 * # Arguments
265 *
266 * * collection_id: ID of the collection.
267 *
268 * * item_id: ID of NFT to burn.
269 *
270 * * from: owner of item
271 **/
272 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32, u128]>;
273 /**
274 * Destroys a concrete instance of NFT.
275 *
276 * # Permissions
277 *
278 * * Collection Owner.
279 * * Collection Admin.
280 * * Current NFT Owner.
281 *
282 * # Arguments
283 *
284 * * collection_id: ID of the collection.
285 *
286 * * item_id: ID of NFT to burn.
287 **/
288 burnItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;
289 /**
290 * Change the owner of the collection.
291 *
292 * # Permissions
293 *
294 * * Collection Owner.
295 *
296 * # Arguments
297 *
298 * * collection_id.
299 *
300 * * new_owner.
301 **/
302 changeCollectionOwner: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newOwner: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;
303 /**
304 * # Permissions
305 *
306 * * Sponsor.
307 *
308 * # Arguments
309 *
310 * * collection_id.
311 **/
312 confirmSponsorship: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
313 /**
314 * This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner and admin of the collection are set to the address that signed the transaction. Both addresses can be changed later.
315 *
316 * # Permissions
317 *
318 * * Anyone.
319 *
320 * # Arguments
321 *
322 * * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.
323 *
324 * * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.
325 *
326 * * token_prefix: UTF-8 string with token prefix.
327 *
328 * * mode: [CollectionMode] collection type and type dependent data.
329 **/
330 createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: NftDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, NftDataStructsCollectionMode]>;
331 /**
332 * This method creates a concrete instance of NFT Collection created with CreateCollection method.
333 *
334 * # Permissions
335 *
336 * * Collection Owner.
337 * * Collection Admin.
338 * * Anyone if
339 * * Allow List is enabled, and
340 * * Address is added to allow list, and
341 * * MintPermission is enabled (see SetMintPermission method)
342 *
343 * # Arguments
344 *
345 * * collection_id: ID of the collection.
346 *
347 * * owner: Address, initial owner of the NFT.
348 *
349 * * data: Token data to store on chain.
350 **/
351 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: NftDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, NftDataStructsCreateItemData]>;
352 /**
353 * This method creates multiple items in a collection created with CreateCollection method.
354 *
355 * # Permissions
356 *
357 * * Collection Owner.
358 * * Collection Admin.
359 * * Anyone if
360 * * Allow List is enabled, and
361 * * Address is added to allow list, and
362 * * MintPermission is enabled (see SetMintPermission method)
363 *
364 * # Arguments
365 *
366 * * collection_id: ID of the collection.
367 *
368 * * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].
369 *
370 * * owner: Address, initial owner of the NFT.
371 **/
372 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<NftDataStructsCreateItemData> | (NftDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, Vec<NftDataStructsCreateItemData>]>;
373 /**
374 * **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.
375 *
376 * # Permissions
377 *
378 * * Collection Owner.
379 *
380 * # Arguments
381 *
382 * * collection_id: collection to destroy.
383 **/
384 destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
385 /**
386 * Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.
387 *
388 * # Permissions
389 *
390 * * Collection Owner.
391 * * Collection Admin.
392 *
393 * # Arguments
394 *
395 * * collection_id: ID of the Collection to remove admin for.
396 *
397 * * account_id: Address of admin to remove.
398 **/
399 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
400 /**
401 * Switch back to pay-per-own-transaction model.
402 *
403 * # Permissions
404 *
405 * * Collection owner.
406 *
407 * # Arguments
408 *
409 * * collection_id.
410 **/
411 removeCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
412 /**
413 * Remove an address from allow list.
414 *
415 * # Permissions
416 *
417 * * Collection Owner
418 * * Collection Admin
419 *
420 * # Arguments
421 *
422 * * collection_id.
423 *
424 * * address.
425 **/
426 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
427 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: NftDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsCollectionLimits]>;
428 /**
429 * # Permissions
430 *
431 * * Collection Owner
432 *
433 * # Arguments
434 *
435 * * collection_id.
436 *
437 * * new_sponsor.
438 **/
439 setCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newSponsor: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;
440 /**
441 * Set const on-chain data schema.
442 *
443 * # Permissions
444 *
445 * * Collection Owner
446 * * Collection Admin
447 *
448 * # Arguments
449 *
450 * * collection_id.
451 *
452 * * schema: String representing the const on-chain data schema.
453 **/
454 setConstOnChainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
455 /**
456 * Set meta_update_permission value for particular collection
457 *
458 * # Permissions
459 *
460 * * Collection Owner.
461 *
462 * # Arguments
463 *
464 * * collection_id: ID of the collection.
465 *
466 * * value: New flag value.
467 **/
468 setMetaUpdatePermissionFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: NftDataStructsMetaUpdatePermission | 'ItemOwner' | 'Admin' | 'None' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsMetaUpdatePermission]>;
469 /**
470 * Allows Anyone to create tokens if:
471 * * Allow List is enabled, and
472 * * Address is added to allow list, and
473 * * This method was called with True parameter
474 *
475 * # Permissions
476 * * Collection Owner
477 *
478 * # Arguments
479 *
480 * * collection_id.
481 *
482 * * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
483 **/
484 setMintPermission: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mintPermission: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
485 /**
486 * Set off-chain data schema.
487 *
488 * # Permissions
489 *
490 * * Collection Owner
491 * * Collection Admin
492 *
493 * # Arguments
494 *
495 * * collection_id.
496 *
497 * * schema: String representing the offchain data schema.
498 **/
499 setOffchainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
500 /**
501 * Toggle between normal and allow list access for the methods with access for `Anyone`.
502 *
503 * # Permissions
504 *
505 * * Collection Owner.
506 *
507 * # Arguments
508 *
509 * * collection_id.
510 *
511 * * mode: [AccessMode]
512 **/
513 setPublicAccessMode: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mode: NftDataStructsAccessMode | 'Normal' | 'AllowList' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsAccessMode]>;
514 /**
515 * Set schema standard
516 * ImageURL
517 * Unique
518 *
519 * # Permissions
520 *
521 * * Collection Owner
522 * * Collection Admin
523 *
524 * # Arguments
525 *
526 * * collection_id.
527 *
528 * * schema: SchemaVersion: enum
529 **/
530 setSchemaVersion: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, version: NftDataStructsSchemaVersion | 'ImageURL' | 'Unique' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, NftDataStructsSchemaVersion]>;
531 /**
532 * Set transfers_enabled value for particular collection
533 *
534 * # Permissions
535 *
536 * * Collection Owner.
537 *
538 * # Arguments
539 *
540 * * collection_id: ID of the collection.
541 *
542 * * value: New flag value.
543 **/
544 setTransfersEnabledFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
545 /**
546 * Set off-chain data schema.
547 *
548 * # Permissions
549 *
550 * * Collection Owner
551 * * Collection Admin
552 *
553 * # Arguments
554 *
555 * * collection_id.
556 *
557 * * schema: String representing the offchain data schema.
558 **/
559 setVariableMetaData: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes]>;
560 /**
561 * Set variable on-chain data schema.
562 *
563 * # Permissions
564 *
565 * * Collection Owner
566 * * Collection Admin
567 *
568 * # Arguments
569 *
570 * * collection_id.
571 *
572 * * schema: String representing the variable on-chain data schema.
573 **/
574 setVariableOnChainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
575 /**
576 * Change ownership of the token.
577 *
578 * # Permissions
579 *
580 * * Collection Owner
581 * * Collection Admin
582 * * Current NFT owner
583 *
584 * # Arguments
585 *
586 * * recipient: Address of token recipient.
587 *
588 * * collection_id.
589 *
590 * * item_id: ID of the item
591 * * Non-Fungible Mode: Required.
592 * * Fungible Mode: Ignored.
593 * * Re-Fungible Mode: Required.
594 *
595 * * value: Amount to transfer.
596 * * Non-Fungible Mode: Ignored
597 * * Fungible Mode: Must specify transferred amount
598 * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
599 **/
600 transfer: AugmentedSubmittable<(recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
601 /**
602 * Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.
603 *
604 * # Permissions
605 * * Collection Owner
606 * * Collection Admin
607 * * Current NFT owner
608 * * Address approved by current NFT owner
609 *
610 * # Arguments
611 *
612 * * from: Address that owns token.
613 *
614 * * recipient: Address of token recipient.
615 *
616 * * collection_id.
617 *
618 * * item_id: ID of the item.
619 *
620 * * value: Amount to transfer.
621 **/
622 transferFrom: AugmentedSubmittable<(from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
623 /**
624 * Generic tx
625 **/
626 [key: string]: SubmittableExtrinsicFunction<ApiType>;
627 };
628 nftPayment: {
629 /**
630 * Generic tx
631 **/
632 [key: string]: SubmittableExtrinsicFunction<ApiType>;
633 };
634 parachainSystem: {204 parachainSystem: {
635 authorizeUpgrade: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;205 authorizeUpgrade: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
636 enactAuthorizedUpgrade: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;206 enactAuthorizedUpgrade: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
778 **/348 **/
779 [key: string]: SubmittableExtrinsicFunction<ApiType>;349 [key: string]: SubmittableExtrinsicFunction<ApiType>;
780 };350 };
781 scheduler: {
782 /**
783 * Cancel an anonymously scheduled task.
784 *
785 * # <weight>
786 * - S = Number of already scheduled calls
787 * - Base Weight: 22.15 + 2.869 * S µs
788 * - DB Weight:
789 * - Read: Agenda
790 * - Write: Agenda, Lookup
791 * - Will use base weight of 100 which should be good for up to 30 scheduled calls
792 * # </weight>
793 **/
794 cancel: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
795 /**
796 * Cancel a named scheduled task.
797 *
798 * # <weight>
799 * - S = Number of already scheduled calls
800 * - Base Weight: 24.91 + 2.907 * S µs
801 * - DB Weight:
802 * - Read: Agenda, Lookup
803 * - Write: Agenda, Lookup
804 * - Will use base weight of 100 which should be good for up to 30 scheduled calls
805 * # </weight>
806 **/
807 cancelNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
808 /**
809 * Anonymously schedule a task.
810 *
811 * # <weight>
812 * - S = Number of already scheduled calls
813 * - Base Weight: 22.29 + .126 * S µs
814 * - DB Weight:
815 * - Read: Agenda
816 * - Write: Agenda
817 * - Will use base weight of 25 which should be good for up to 30 scheduled calls
818 * # </weight>
819 **/
820 schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
821 /**
822 * Anonymously schedule a task after a delay.
823 *
824 * # <weight>
825 * Same as [`schedule`].
826 * # </weight>
827 **/
828 scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
829 /**
830 * Schedule a named task.
831 *
832 * # <weight>
833 * - S = Number of already scheduled calls
834 * - Base Weight: 29.6 + .159 * S µs
835 * - DB Weight:
836 * - Read: Agenda, Lookup
837 * - Write: Agenda, Lookup
838 * - Will use base weight of 35 which should be good for more than 30 scheduled calls
839 * # </weight>
840 **/
841 scheduleNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
842 /**
843 * Schedule a named task after a delay.
844 *
845 * # <weight>
846 * Same as [`schedule_named`].
847 * # </weight>
848 **/
849 scheduleNamedAfter: AugmentedSubmittable<(id: Bytes | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
850 /**
851 * Generic tx
852 **/
853 [key: string]: SubmittableExtrinsicFunction<ApiType>;
854 };
855 sudo: {351 sudo: {
856 /**352 /**
857 * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo353 * Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
878 * - Weight of derivative `call` execution + 10,000.374 * - Weight of derivative `call` execution + 10,000.
879 * # </weight>375 * # </weight>
880 **/376 **/
881 sudo: AugmentedSubmittable<(call: Call) => SubmittableExtrinsic<ApiType>, [Call]>;377 sudo: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, [Call]>;
882 /**378 /**
883 * Authenticates the sudo key and dispatches a function call with `Signed` origin from379 * Authenticates the sudo key and dispatches a function call with `Signed` origin from
884 * a given account.380 * a given account.
892 * - Weight of derivative `call` execution + 10,000.388 * - Weight of derivative `call` execution + 10,000.
893 * # </weight>389 * # </weight>
894 **/390 **/
895 sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;391 sudoAs: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, ) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
896 /**392 /**
897 * Authenticates the sudo key and dispatches a function call with `Root` origin.393 * Authenticates the sudo key and dispatches a function call with `Root` origin.
898 * This function does not check the weight of the call, and instead allows the394 * This function does not check the weight of the call, and instead allows the
905 * - The weight of this call is defined by the caller.401 * - The weight of this call is defined by the caller.
906 * # </weight>402 * # </weight>
907 **/403 **/
908 sudoUncheckedWeight: AugmentedSubmittable<(call: Call, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;404 sudoUncheckedWeight: AugmentedSubmittable<(, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
909 /**405 /**
910 * Generic tx406 * Generic tx
911 **/407 **/
1094 **/590 **/
1095 [key: string]: SubmittableExtrinsicFunction<ApiType>;591 [key: string]: SubmittableExtrinsicFunction<ApiType>;
1096 };592 };
1097 vesting: {593 unique: {
1098 /**594 /**
1099 * Force a vested transfer.595 * Adds an admin of the Collection.
596 * NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership.
1100 * 597 *
1101 * The dispatch origin for this call must be _Root_.598 * # Permissions
1102 * 599 *
1103 * - `source`: The account whose funds should be transferred.600 * * Collection Owner.
1104 * - `target`: The account that should be transferred the vested funds.
1105 * - `schedule`: The vesting schedule attached to the transfer.601 * * Collection Admin.
1106 * 602 *
1107 * Emits `VestingCreated`.603 * # Arguments
1108 * 604 *
1109 * NOTE: This will unlock all schedules through the current block.605 * * collection_id: ID of the Collection to add admin for.
1110 * 606 *
1111 * # <weight>607 * * new_admin_id: Address of new admin to add.
1112 * - `O(1)`.
1113 * - DbWeight: 4 Reads, 4 Writes
1114 * - Reads: Vesting Storage, Balances Locks, Target Account, Source Account
1115 * - Writes: Vesting Storage, Balances Locks, Target Account, Source Account
1116 * # </weight>
1117 **/608 **/
1118 forceVestedTransfer: AugmentedSubmittable<(source: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: PalletVestingVestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, PalletVestingVestingInfo]>;609 addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
1119 /**610 /**
1120 * Merge two vesting schedules together, creating a new vesting schedule that unlocks over611 * Add an address to allow list.
1121 * the highest possible start and end blocks. If both schedules have already started the
1122 * current block will be used as the schedule start; with the caveat that if one schedule
1123 * is finished by the current block, the other will be treated as the new merged schedule,
1124 * unmodified.
1125 * 612 *
1126 * NOTE: If `schedule1_index == schedule2_index` this is a no-op.613 * # Permissions
1127 * NOTE: This will unlock all schedules through the current block prior to merging.
1128 * NOTE: If both schedules have ended by the current block, no new schedule will be created
1129 * and both will be removed.
1130 * 614 *
1131 * Merged schedule attributes:615 * * Collection Owner
1132 * - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,
1133 * current_block)`.616 * * Collection Admin
1134 * - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.
1135 * - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.
1136 * 617 *
1137 * The dispatch origin for this call must be _Signed_.618 * # Arguments
1138 * 619 *
1139 * - `schedule1_index`: index of the first schedule to merge.620 * * collection_id.
1140 * - `schedule2_index`: index of the second schedule to merge.621 *
622 * * address.
1141 **/623 **/
1142 mergeSchedules: AugmentedSubmittable<(schedule1Index: u32 | AnyNumber | Uint8Array, schedule2Index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;624 addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
1143 /**625 /**
1144 * Unlock any vested funds of the sender account.626 * Set, change, or remove approved address to transfer the ownership of the NFT.
1145 * 627 *
1146 * The dispatch origin for this call must be _Signed_ and the sender must have funds still628 * # Permissions
1147 * locked under this pallet.
1148 * 629 *
1149 * Emits either `VestingCompleted` or `VestingUpdated`.630 * * Collection Owner
631 * * Collection Admin
632 * * Current NFT owner
1150 * 633 *
1151 * # <weight>634 * # Arguments
1152 * - `O(1)`.635 *
1153 * - DbWeight: 2 Reads, 2 Writes636 * * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).
1154 * - Reads: Vesting Storage, Balances Locks, [Sender Account]637 *
1155 * - Writes: Vesting Storage, Balances Locks, [Sender Account]638 * * collection_id.
639 *
1156 * # </weight>640 * * item_id: ID of the item.
1157 **/641 **/
1158 vest: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;642 approve: AugmentedSubmittable<(spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
1159 /**643 /**
1160 * Create a vested transfer.644 * Destroys a concrete instance of NFT on behalf of the owner
645 * See also: [`approve`]
1161 * 646 *
1162 * The dispatch origin for this call must be _Signed_.647 * # Permissions
1163 * 648 *
1164 * - `target`: The account receiving the vested funds.649 * * Collection Owner.
1165 * - `schedule`: The vesting schedule attached to the transfer.650 * * Collection Admin.
651 * * Current NFT Owner.
1166 * 652 *
1167 * Emits `VestingCreated`.653 * # Arguments
1168 * 654 *
1169 * NOTE: This will unlock all schedules through the current block.655 * * collection_id: ID of the collection.
1170 * 656 *
1171 * # <weight>657 * * item_id: ID of NFT to burn.
1172 * - `O(1)`.
1173 * - DbWeight: 3 Reads, 3 Writes658 *
1174 * - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]659 * * from: owner of item
1175 * - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]
1176 * # </weight>
1177 **/660 **/
1178 vestedTransfer: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: PalletVestingVestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletVestingVestingInfo]>;661 burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32, u128]>;
1179 /**662 /**
1180 * Unlock any vested funds of a `target` account.663 * Destroys a concrete instance of NFT.
1181 * 664 *
1182 * The dispatch origin for this call must be _Signed_.665 * # Permissions
1183 * 666 *
1184 * - `target`: The account whose vested funds should be unlocked. Must have funds still667 * * Collection Owner.
668 * * Collection Admin.
1185 * locked under this pallet.669 * * Current NFT Owner.
1186 * 670 *
1187 * Emits either `VestingCompleted` or `VestingUpdated`.671 * # Arguments
1188 * 672 *
1189 * # <weight>673 * * collection_id: ID of the collection.
1190 * - `O(1)`.
1191 * - DbWeight: 3 Reads, 3 Writes674 *
1192 * - Reads: Vesting Storage, Balances Locks, Target Account675 * * item_id: ID of NFT to burn.
1193 * - Writes: Vesting Storage, Balances Locks, Target Account
1194 * # </weight>
1195 **/676 **/
1196 vestOther: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;677 burnItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;
678 /**
679 * Change the owner of the collection.
680 *
681 * # Permissions
682 *
683 * * Collection Owner.
684 *
685 * # Arguments
686 *
687 * * collection_id.
688 *
689 * * new_owner.
690 **/
691 changeCollectionOwner: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newOwner: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;
692 /**
693 * # Permissions
694 *
695 * * Sponsor.
696 *
697 * # Arguments
698 *
699 * * collection_id.
700 **/
701 confirmSponsorship: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
702 /**
703 * This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner of the collection is set to the address that signed the transaction and can be changed later.
704 *
705 * # Permissions
706 *
707 * * Anyone.
708 *
709 * # Arguments
710 *
711 * * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.
712 *
713 * * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.
714 *
715 * * token_prefix: UTF-8 string with token prefix.
716 *
717 * * mode: [CollectionMode] collection type and type dependent data.
718 **/
719 createCollection: AugmentedSubmittable<(collectionName: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], collectionDescription: Vec<u16> | (u16 | AnyNumber | Uint8Array)[], tokenPrefix: Bytes | string | Uint8Array, mode: UpDataStructsCollectionMode | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<u16>, Vec<u16>, Bytes, UpDataStructsCollectionMode]>;
720 /**
721 * This method creates a concrete instance of NFT Collection created with CreateCollection method.
722 *
723 * # Permissions
724 *
725 * * Collection Owner.
726 * * Collection Admin.
727 * * Anyone if
728 * * Allow List is enabled, and
729 * * Address is added to allow list, and
730 * * MintPermission is enabled (see SetMintPermission method)
731 *
732 * # Arguments
733 *
734 * * collection_id: ID of the collection.
735 *
736 * * owner: Address, initial owner of the NFT.
737 *
738 * * data: Token data to store on chain.
739 **/
740 createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;
741 /**
742 * This method creates multiple items in a collection created with CreateCollection method.
743 *
744 * # Permissions
745 *
746 * * Collection Owner.
747 * * Collection Admin.
748 * * Anyone if
749 * * Allow List is enabled, and
750 * * Address is added to allow list, and
751 * * MintPermission is enabled (see SetMintPermission method)
752 *
753 * # Arguments
754 *
755 * * collection_id: ID of the collection.
756 *
757 * * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].
758 *
759 * * owner: Address, initial owner of the NFT.
760 **/
761 createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;
762 /**
763 * **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.
764 *
765 * # Permissions
766 *
767 * * Collection Owner.
768 *
769 * # Arguments
770 *
771 * * collection_id: collection to destroy.
772 **/
773 destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
774 /**
775 * Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.
776 *
777 * # Permissions
778 *
779 * * Collection Owner.
780 * * Collection Admin.
781 *
782 * # Arguments
783 *
784 * * collection_id: ID of the Collection to remove admin for.
785 *
786 * * account_id: Address of admin to remove.
787 **/
788 removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
789 /**
790 * Switch back to pay-per-own-transaction model.
791 *
792 * # Permissions
793 *
794 * * Collection owner.
795 *
796 * # Arguments
797 *
798 * * collection_id.
799 **/
800 removeCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
801 /**
802 * Remove an address from allow list.
803 *
804 * # Permissions
805 *
806 * * Collection Owner
807 * * Collection Admin
808 *
809 * # Arguments
810 *
811 * * collection_id.
812 *
813 * * address.
814 **/
815 removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
816 setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;
817 /**
818 * # Permissions
819 *
820 * * Collection Owner
821 *
822 * # Arguments
823 *
824 * * collection_id.
825 *
826 * * new_sponsor.
827 **/
828 setCollectionSponsor: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newSponsor: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;
829 /**
830 * Set const on-chain data schema.
831 *
832 * # Permissions
833 *
834 * * Collection Owner
835 * * Collection Admin
836 *
837 * # Arguments
838 *
839 * * collection_id.
840 *
841 * * schema: String representing the const on-chain data schema.
842 **/
843 setConstOnChainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
844 /**
845 * Set meta_update_permission value for particular collection
846 *
847 * # Permissions
848 *
849 * * Collection Owner.
850 *
851 * # Arguments
852 *
853 * * collection_id: ID of the collection.
854 *
855 * * value: New flag value.
856 **/
857 setMetaUpdatePermissionFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: UpDataStructsMetaUpdatePermission | 'ItemOwner' | 'Admin' | 'None' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsMetaUpdatePermission]>;
858 /**
859 * Allows Anyone to create tokens if:
860 * * Allow List is enabled, and
861 * * Address is added to allow list, and
862 * * This method was called with True parameter
863 *
864 * # Permissions
865 * * Collection Owner
866 *
867 * # Arguments
868 *
869 * * collection_id.
870 *
871 * * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
872 **/
873 setMintPermission: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mintPermission: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
874 /**
875 * Set off-chain data schema.
876 *
877 * # Permissions
878 *
879 * * Collection Owner
880 * * Collection Admin
881 *
882 * # Arguments
883 *
884 * * collection_id.
885 *
886 * * schema: String representing the offchain data schema.
887 **/
888 setOffchainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
889 /**
890 * Toggle between normal and allow list access for the methods with access for `Anyone`.
891 *
892 * # Permissions
893 *
894 * * Collection Owner.
895 *
896 * # Arguments
897 *
898 * * collection_id.
899 *
900 * * mode: [AccessMode]
901 **/
902 setPublicAccessMode: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, mode: UpDataStructsAccessMode | 'Normal' | 'AllowList' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsAccessMode]>;
903 /**
904 * Set schema standard
905 * ImageURL
906 * Unique
907 *
908 * # Permissions
909 *
910 * * Collection Owner
911 * * Collection Admin
912 *
913 * # Arguments
914 *
915 * * collection_id.
916 *
917 * * schema: SchemaVersion: enum
918 **/
919 setSchemaVersion: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, version: UpDataStructsSchemaVersion | 'ImageURL' | 'Unique' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsSchemaVersion]>;
920 /**
921 * Set transfers_enabled value for particular collection
922 *
923 * # Permissions
924 *
925 * * Collection Owner.
926 *
927 * # Arguments
928 *
929 * * collection_id: ID of the collection.
930 *
931 * * value: New flag value.
932 **/
933 setTransfersEnabledFlag: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, value: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
934 /**
935 * Set off-chain data schema.
936 *
937 * # Permissions
938 *
939 * * Collection Owner
940 * * Collection Admin
941 *
942 * # Arguments
943 *
944 * * collection_id.
945 *
946 * * schema: String representing the offchain data schema.
947 **/
948 setVariableMetaData: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes]>;
949 /**
950 * Set variable on-chain data schema.
951 *
952 * # Permissions
953 *
954 * * Collection Owner
955 * * Collection Admin
956 *
957 * # Arguments
958 *
959 * * collection_id.
960 *
961 * * schema: String representing the variable on-chain data schema.
962 **/
963 setVariableOnChainSchema: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, schema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
964 /**
965 * Change ownership of the token.
966 *
967 * # Permissions
968 *
969 * * Collection Owner
970 * * Collection Admin
971 * * Current NFT owner
972 *
973 * # Arguments
974 *
975 * * recipient: Address of token recipient.
976 *
977 * * collection_id.
978 *
979 * * item_id: ID of the item
980 * * Non-Fungible Mode: Required.
981 * * Fungible Mode: Ignored.
982 * * Re-Fungible Mode: Required.
983 *
984 * * value: Amount to transfer.
985 * * Non-Fungible Mode: Ignored
986 * * Fungible Mode: Must specify transferred amount
987 * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
988 **/
989 transfer: AugmentedSubmittable<(recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
990 /**
991 * Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.
992 *
993 * # Permissions
994 * * Collection Owner
995 * * Collection Admin
996 * * Current NFT owner
997 * * Address approved by current NFT owner
998 *
999 * # Arguments
1000 *
1001 * * from: Address that owns token.
1002 *
1003 * * recipient: Address of token recipient.
1004 *
1005 * * collection_id.
1006 *
1007 * * item_id: ID of the item.
1008 *
1009 * * value: Amount to transfer.
1010 **/
1011 transferFrom: AugmentedSubmittable<(from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
1012 /**
1013 * Generic tx
1014 **/
1015 [key: string]: SubmittableExtrinsicFunction<ApiType>;
1016 };
1017 vesting: {
1018 claim: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1019 claimFor: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
1020 updateVestingSchedules: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, vestingSchedules: Vec<OrmlVestingVestingSchedule> | (OrmlVestingVestingSchedule | { start?: any; period?: any; periodCount?: any; perPeriod?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [MultiAddress, Vec<OrmlVestingVestingSchedule>]>;
1021 vestedTransfer: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: OrmlVestingVestingSchedule | { start?: any; period?: any; periodCount?: any; perPeriod?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, OrmlVestingVestingSchedule]>;
1197 /**1022 /**
1198 * Generic tx1023 * Generic tx
1199 **/1024 **/
modifiedtests/src/interfaces/augment-types.tsdiffbeforeafterboth
2/* eslint-disable */2/* eslint-disable */
33
4import type { EthereumBlock, EthereumLog, EthereumReceipt, EthereumTransactionLegacyTransaction, EvmCoreErrorExitReason, FpRpcTransactionStatus } from './ethereum';4import type { EthereumBlock, EthereumLog, EthereumReceipt, EthereumTransactionLegacyTransaction, EvmCoreErrorExitReason, FpRpcTransactionStatus } from './ethereum';
5import type { NftDataStructsAccessMode, NftDataStructsCollection, NftDataStructsCollectionId, NftDataStructsCollectionLimits, NftDataStructsCollectionMode, NftDataStructsCollectionStats, NftDataStructsCreateItemData, NftDataStructsMetaUpdatePermission, NftDataStructsSchemaVersion, NftDataStructsSponsorshipState, NftDataStructsTokenId, PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2 } from './nft';
6import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';5import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundStatus, CumulusPalletXcmpQueueOutboundStatus, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData } from './polkadot';
6import type { PalletCommonAccountBasicCrossAccountIdRepr, PalletNonfungibleItemData, PalletRefungibleItemData, PalletUnqSchedulerCallSpec, PalletUnqSchedulerReleases, PalletUnqSchedulerScheduledV2, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionId, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateItemData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsorshipState, UpDataStructsTokenId } from './unique';
7import type { BitVec, Bool, Bytes, Data, I128, I16, I256, I32, I64, I8, Json, Null, Raw, StorageKey, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types';7import type { BitVec, Bool, Bytes, Data, I128, I16, I256, I32, I64, I8, Json, Null, Raw, StorageKey, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types';
8import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';8import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
9import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';9import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
622 NextAuthority: NextAuthority;622 NextAuthority: NextAuthority;
623 NextConfigDescriptor: NextConfigDescriptor;623 NextConfigDescriptor: NextConfigDescriptor;
624 NextConfigDescriptorV1: NextConfigDescriptorV1;624 NextConfigDescriptorV1: NextConfigDescriptorV1;
625 NftDataStructsAccessMode: NftDataStructsAccessMode;
626 NftDataStructsCollection: NftDataStructsCollection;
627 NftDataStructsCollectionId: NftDataStructsCollectionId;
628 NftDataStructsCollectionLimits: NftDataStructsCollectionLimits;
629 NftDataStructsCollectionMode: NftDataStructsCollectionMode;
630 NftDataStructsCollectionStats: NftDataStructsCollectionStats;
631 NftDataStructsCreateItemData: NftDataStructsCreateItemData;
632 NftDataStructsMetaUpdatePermission: NftDataStructsMetaUpdatePermission;
633 NftDataStructsSchemaVersion: NftDataStructsSchemaVersion;
634 NftDataStructsSponsorshipState: NftDataStructsSponsorshipState;
635 NftDataStructsTokenId: NftDataStructsTokenId;
636 NodeRole: NodeRole;625 NodeRole: NodeRole;
637 Nominations: Nominations;626 Nominations: Nominations;
638 NominatorIndex: NominatorIndex;627 NominatorIndex: NominatorIndex;
1026 UnlockChunk: UnlockChunk;1015 UnlockChunk: UnlockChunk;
1027 UnrewardedRelayer: UnrewardedRelayer;1016 UnrewardedRelayer: UnrewardedRelayer;
1028 UnrewardedRelayersState: UnrewardedRelayersState;1017 UnrewardedRelayersState: UnrewardedRelayersState;
1018 UpDataStructsAccessMode: UpDataStructsAccessMode;
1019 UpDataStructsCollection: UpDataStructsCollection;
1020 UpDataStructsCollectionId: UpDataStructsCollectionId;
1021 UpDataStructsCollectionLimits: UpDataStructsCollectionLimits;
1022 UpDataStructsCollectionMode: UpDataStructsCollectionMode;
1023 UpDataStructsCollectionStats: UpDataStructsCollectionStats;
1024 UpDataStructsCreateItemData: UpDataStructsCreateItemData;
1025 UpDataStructsMetaUpdatePermission: UpDataStructsMetaUpdatePermission;
1026 UpDataStructsSchemaVersion: UpDataStructsSchemaVersion;
1027 UpDataStructsSponsorshipState: UpDataStructsSponsorshipState;
1028 UpDataStructsTokenId: UpDataStructsTokenId;
1029 UpgradeGoAhead: UpgradeGoAhead;1029 UpgradeGoAhead: UpgradeGoAhead;
1030 UpgradeRestriction: UpgradeRestriction;1030 UpgradeRestriction: UpgradeRestriction;
1031 UpwardMessage: UpwardMessage;1031 UpwardMessage: UpwardMessage;
modifiedtests/src/interfaces/definitions.tsdiffbeforeafterboth
1export {default as nft} from './nft/definitions';1export {default as unique} from './unique/definitions';
2export {default as ethereum} from './ethereum/definitions';2export {default as ethereum} from './ethereum/definitions';
3export {default as polkadot} from './polkadot/definitions';3export {default as polkadot} from './polkadot/definitions';
44
deletedtests/src/interfaces/nft/definitions.tsdiffbeforeafterboth

no changes

deletedtests/src/interfaces/nft/index.tsdiffbeforeafterboth

no changes

deletedtests/src/interfaces/nft/types.tsdiffbeforeafterboth

no changes

modifiedtests/src/interfaces/types.tsdiffbeforeafterboth
1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit1// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
2/* eslint-disable */2/* eslint-disable */
33
4export * from './nft/types';4export * from './unique/types';
5export * from './ethereum/types';5export * from './ethereum/types';
6export * from './polkadot/types';6export * from './polkadot/types';
77
addedtests/src/interfaces/unique/definitions.tsdiffbeforeafterboth

no changes

addedtests/src/interfaces/unique/index.tsdiffbeforeafterboth

no changes

addedtests/src/interfaces/unique/types.tsdiffbeforeafterboth

no changes

modifiedtests/src/util/helpers.tsdiffbeforeafterboth
11import chai from 'chai';11import chai from 'chai';
12import chaiAsPromised from 'chai-as-promised';12import chaiAsPromised from 'chai-as-promised';
13import {alicesPublicKey} from '../accounts';13import {alicesPublicKey} from '../accounts';
14import {NftDataStructsCollection} from '../interfaces';14import {UpDataStructsCollection} from '../interfaces';
15import privateKey from '../substrate/privateKey';15import privateKey from '../substrate/privateKey';
16import {default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync} from '../substrate/substrate-api';16import {default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync} from '../substrate/substrate-api';
17import {hexToStr, strToUTF16, utf16ToStr} from './util';17import {hexToStr, strToUTF16, utf16ToStr} from './util';
105}105}
106106
107interface IGetMessage {107interface IGetMessage {
108 checkMsgNftMethod: string;108 checkMsgUnqMethod: string;
109 checkMsgTrsMethod: string;109 checkMsgTrsMethod: string;
110 checkMsgSysMethod: string;110 checkMsgSysMethod: string;
111}111}
133 variableData: number[];133 variableData: number[];
134}134}
135135
136export function nftEventMessage(events: EventRecord[]): IGetMessage {136export function uniqueEventMessage(events: EventRecord[]): IGetMessage {
137 let checkMsgNftMethod = '';137 let checkMsgUnqMethod = '';
138 let checkMsgTrsMethod = '';138 let checkMsgTrsMethod = '';
139 let checkMsgSysMethod = '';139 let checkMsgSysMethod = '';
140 events.forEach(({event: {method, section}}) => {140 events.forEach(({event: {method, section}}) => {
141 if (section === 'common') {141 if (section === 'common') {
142 checkMsgNftMethod = method;142 checkMsgUnqMethod = method;
143 } else if (section === 'treasury') {143 } else if (section === 'treasury') {
144 checkMsgTrsMethod = method;144 checkMsgTrsMethod = method;
145 } else if (section === 'system') {145 } else if (section === 'system') {
146 checkMsgSysMethod = method;146 checkMsgSysMethod = method;
147 } else { return null; }147 } else { return null; }
148 });148 });
149 const result: IGetMessage = {149 const result: IGetMessage = {
150 checkMsgNftMethod,150 checkMsgUnqMethod,
151 checkMsgTrsMethod,151 checkMsgTrsMethod,
152 checkMsgSysMethod,152 checkMsgSysMethod,
153 };153 };
716 tokenId: number, owner: IKeyringPair, approved: CrossAccountId | string, amount: number | bigint = 1,716 tokenId: number, owner: IKeyringPair, approved: CrossAccountId | string, amount: number | bigint = 1,
717) {717) {
718 await usingApi(async (api: ApiPromise) => {718 await usingApi(async (api: ApiPromise) => {
719 const approveNftTx = api.tx.unique.approve(normalizeAccountId(approved), collectionId, tokenId, amount);719 const approveUniqueTx = api.tx.unique.approve(normalizeAccountId(approved), collectionId, tokenId, amount);
720 const events = await submitTransactionAsync(owner, approveNftTx);720 const events = await submitTransactionAsync(owner, approveUniqueTx);
721 const result = getGenericResult(events);721 const result = getGenericResult(events);
722 expect(result.success).to.be.true;722 expect(result.success).to.be.true;
723723
730 tokenId: number, admin: IKeyringPair, owner: CrossAccountId | string, approved: CrossAccountId | string, amount: number | bigint = 1,730 tokenId: number, admin: IKeyringPair, owner: CrossAccountId | string, approved: CrossAccountId | string, amount: number | bigint = 1,
731) {731) {
732 await usingApi(async (api: ApiPromise) => {732 await usingApi(async (api: ApiPromise) => {
733 const approveNftTx = api.tx.unique.approve(normalizeAccountId(approved), collectionId, tokenId, amount);733 const approveUniqueTx = api.tx.unique.approve(normalizeAccountId(approved), collectionId, tokenId, amount);
734 const events = await submitTransactionAsync(admin, approveNftTx);734 const events = await submitTransactionAsync(admin, approveUniqueTx);
735 const result = getGenericResult(events);735 const result = getGenericResult(events);
736 expect(result.success).to.be.true;736 expect(result.success).to.be.true;
737737
920 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number | bigint = 1,920 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number | bigint = 1,
921) {921) {
922 await usingApi(async (api: ApiPromise) => {922 await usingApi(async (api: ApiPromise) => {
923 const approveNftTx = api.tx.unique.approve(normalizeAccountId(approved.address), collectionId, tokenId, amount);923 const approveUniqueTx = api.tx.unique.approve(normalizeAccountId(approved.address), collectionId, tokenId, amount);
924 const events = await expect(submitTransactionExpectFailAsync(owner, approveNftTx)).to.be.rejected;924 const events = await expect(submitTransactionExpectFailAsync(owner, approveUniqueTx)).to.be.rejected;
925 const result = getCreateCollectionResult(events);925 const result = getCreateCollectionResult(events);
926 // tslint:disable-next-line:no-unused-expression926 // tslint:disable-next-line:no-unused-expression
927 expect(result.success).to.be.false;927 expect(result.success).to.be.false;
1212}1212}
12131213
1214export const getDetailedCollectionInfo = async (api: ApiPromise, collectionId: number)1214export const getDetailedCollectionInfo = async (api: ApiPromise, collectionId: number)
1215 : Promise<NftDataStructsCollection | null> => {1215 : Promise<UpDataStructsCollection | null> => {
1216 return (await api.rpc.unique.collectionById(collectionId)).unwrapOr(null);1216 return (await api.rpc.unique.collectionById(collectionId)).unwrapOr(null);
1217};1217};
12181218
1221 return (await api.rpc.unique.collectionStats()).created.toNumber();1221 return (await api.rpc.unique.collectionStats()).created.toNumber();
1222};1222};
12231223
1224export async function queryCollectionExpectSuccess(api: ApiPromise, collectionId: number): Promise<NftDataStructsCollection> {1224export async function queryCollectionExpectSuccess(api: ApiPromise, collectionId: number): Promise<UpDataStructsCollection> {
1225 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1225 return (await api.rpc.unique.collectionById(collectionId)).unwrap();
1226}1226}
12271227