From 66503d98270f52de5dd73e1a20119ef90ee36c70 Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Tue, 29 Mar 2022 08:58:22 +0000 Subject: [PATCH] CORE-324 Use CrossAccountId in Runner::call --- --- a/runtime/common/src/runtime_apis.rs +++ b/runtime/common/src/runtime_apis.rs @@ -181,7 +181,7 @@ }; ::Runner::call( - from, + CrossAccountId::from_eth(from), to, data, value, @@ -215,7 +215,7 @@ }; ::Runner::create( - from, + CrossAccountId::from_eth(from), data, value, gas_limit.low_u64(), --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -48,7 +48,7 @@ }; // A few exports that help ease life for downstream crates. pub use pallet_balances::Call as BalancesCall; -pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner}; +pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _}; pub use frame_support::{ construct_runtime, match_type, dispatch::DispatchResult, --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -48,7 +48,7 @@ }; // A few exports that help ease life for downstream crates. pub use pallet_balances::Call as BalancesCall; -pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner}; +pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _}; pub use frame_support::{ construct_runtime, match_type, dispatch::DispatchResult, --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -48,7 +48,7 @@ }; // A few exports that help ease life for downstream crates. pub use pallet_balances::Call as BalancesCall; -pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner}; +pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _}; pub use frame_support::{ construct_runtime, match_type, dispatch::DispatchResult, --- a/tests/src/eth/contractSponsoring.test.ts +++ b/tests/src/eth/contractSponsoring.test.ts @@ -27,10 +27,14 @@ collectionIdToAddress, GAS_ARGS, normalizeEvents, + subToEth, + executeEthTxOnSub, } from './util/helpers'; import { + addCollectionAdminExpectSuccess, createCollectionExpectSuccess, getCreateCollectionResult, + transferBalanceTo, } from '../util/helpers'; import nonFungibleAbi from './nonFungibleAbi.json'; import { @@ -293,4 +297,34 @@ const [alicesBalanceAfter] = await getBalance(api, [alicesPublicKey]); expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true; }); + + + itWeb3('Check that transaction via EVM spend money from substrate address', async ({api, web3}) => { + const owner = privateKey('//Alice'); + const user = privateKey(`//User/${Date.now()}`); + const userEth = subToEth(user.address); + const collectionId = await createCollectionExpectSuccess(); + await addCollectionAdminExpectSuccess(owner, collectionId, {Ethereum: userEth}); + await transferBalanceTo(api, owner, user.address); + + const address = collectionIdToAddress(collectionId); + const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: userEth, ...GAS_ARGS}); + + const [userBalanceBefore] = await getBalance(api, [user.address]); + + { + const nextTokenId = await contract.methods.nextTokenId().call(); + expect(nextTokenId).to.be.equal('1'); + await executeEthTxOnSub(web3, api, user, contract, m => m.mintWithTokenURI( + userEth, + nextTokenId, + 'Test URI', + )); + + expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI'); + } + + const [userBalanceAfter] = await getBalance(api, [user.address]); + expect(userBalanceAfter < userBalanceBefore).to.be.true; + }); }); --- a/tests/src/eth/marketplace/marketplace.test.ts +++ b/tests/src/eth/marketplace/marketplace.test.ts @@ -15,18 +15,29 @@ // along with Unique Network. If not, see . import {readFile} from 'fs/promises'; -import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance'; +import {getBalanceSingle} from '../../substrate/get-balance'; import privateKey from '../../substrate/privateKey'; -import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionLimitsExpectSuccess, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers'; +import { + addToAllowListExpectSuccess, + confirmSponsorshipExpectSuccess, + createCollectionExpectSuccess, + createItemExpectSuccess, + getTokenOwner, + setCollectionLimitsExpectSuccess, + setCollectionSponsorExpectSuccess, + transferExpectSuccess, + transferFromExpectSuccess, + transferBalanceTo, +} from '../../util/helpers'; import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, SponsoringMode, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers'; import {evmToAddress} from '@polkadot/util-crypto'; import nonFungibleAbi from '../nonFungibleAbi.json'; -import fungibleAbi from '../fungibleAbi.json'; + import {expect} from 'chai'; const PRICE = 2000n; -describe('Matcher contract usage', () => { +describe.only('Matcher contract usage', () => { itWeb3('With UNQ', async ({api, web3}) => { const alice = privateKey('//Alice'); const matcherOwner = await createEthAccountWithBalance(api, web3); @@ -87,32 +98,39 @@ expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address}); }); - // selling for custom tokens excluded from release - itWeb3.skip('With custom ERC20', async ({api, web3}) => { + + itWeb3('With escrow', async ({api, web3}) => { const alice = privateKey('//Alice'); const matcherOwner = await createEthAccountWithBalance(api, web3); + const escrow = await createEthAccountWithBalance(api, web3); const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, { from: matcherOwner, ...GAS_ARGS, }); - const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner}); + const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000}); + await matcher.methods.setEscrow(escrow).send({from: matcherOwner}); + const helpers = contractHelpers(web3, matcherOwner); + await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner}); + await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner}); + await transferBalanceToEth(api, alice, matcher.options.address); const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}}); + await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1}); const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner}); + await setCollectionSponsorExpectSuccess(collectionId, alice.address); + await transferBalanceToEth(api, alice, subToEth(alice.address)); + await confirmSponsorshipExpectSuccess(collectionId); - const fungibleId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}}); - const evmFungible = new web3.eth.Contract(fungibleAbi as any, collectionIdToAddress(fungibleId), {from: matcherOwner, ...GAS_ARGS}); - await createFungibleItemExpectSuccess(alice, fungibleId, {Value: PRICE}, {Ethereum: subToEth(alice.address)}); + await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner}); + await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address))); - const seller = privateKey('//Bob'); + const seller = privateKey(`//Seller/${Date.now()}`); + await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner}); const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address); // To transfer item to matcher it first needs to be transfered to EVM account of bob await transferExpectSuccess(collectionId, tokenId, seller, {Ethereum: subToEth(seller.address)}); - // Fees will be paid from EVM account, so we should have some balance here - await transferBalanceExpectSuccess(api, seller, evmToAddress(subToEth(seller.address)), 10n ** 18n); - await transferBalanceExpectSuccess(api, alice, evmToAddress(subToEth(alice.address)), 10n ** 18n); // Token is owned by seller initially expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(seller.address)}); @@ -120,66 +138,55 @@ // Ask { await executeEthTxOnSub(web3, api, seller, evmCollection, m => m.approve(matcher.options.address, tokenId)); - await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, evmFungible.options.address, evmCollection.options.address, tokenId, 1)); + await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, '0x0000000000000000000000000000000000000001', evmCollection.options.address, tokenId)); } // Token is transferred to matcher expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()}); + // Give buyer KSM + await matcher.methods.depositKSM(PRICE, subToEth(alice.address)).send({from: escrow}); + // Buy { - const sellerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call()); - const buyerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call()); + expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal('0'); + expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal(PRICE.toString()); - await executeEthTxOnSub(web3, api, alice, evmFungible, m => m.approve(matcher.options.address, PRICE)); - // There is two functions named 'buy', so we should provide full signature - await executeEthTxOnSub(web3, api, alice, matcher, m => - m['buy(address,uint256,address,uint256)'](evmCollection.options.address, tokenId, evmFungible.options.address, PRICE)); + await executeEthTxOnSub(web3, api, alice, matcher, m => m.buyKSM(evmCollection.options.address, tokenId, subToEth(alice.address), subToEth(alice.address))); - // Approved price is removed from buyer balance, and added to seller - expect(BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call()) - sellerBalanceBeforePurchase === PRICE); - expect(buyerBalanceBeforePurchase - BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call()) === PRICE); + // Price is removed from buyer balance, and added to seller + expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal('0'); + expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal(PRICE.toString()); } // Token is transferred to evm account of alice expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(alice.address)}); - // Transfer token to substrate side of alice await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: subToEth(alice.address)}, {Substrate: alice.address}); - // Token is transferred to substrate account of alice + // Token is transferred to substrate account of alice, seller received funds expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address}); }); - itWeb3('With escrow', async ({api, web3}) => { + + itWeb3('Sell tokens from substrate user via EVM contract', async ({api, web3}) => { const alice = privateKey('//Alice'); const matcherOwner = await createEthAccountWithBalance(api, web3); - const escrow = await createEthAccountWithBalance(api, web3); const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, { from: matcherOwner, ...GAS_ARGS, }); - const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000}); - await matcher.methods.setEscrow(escrow).send({from: matcherOwner}); - const helpers = contractHelpers(web3, matcherOwner); - await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner}); - await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner}); + const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner}); await transferBalanceToEth(api, alice, matcher.options.address); const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}}); await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1}); const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner}); - await setCollectionSponsorExpectSuccess(collectionId, alice.address); - await transferBalanceToEth(api, alice, subToEth(alice.address)); - await confirmSponsorshipExpectSuccess(collectionId); - - await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner}); - await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address))); const seller = privateKey(`//Seller/${Date.now()}`); - await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner}); - + await transferBalanceTo(api, alice, seller.address); + const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address); // To transfer item to matcher it first needs to be transfered to EVM account of bob @@ -197,19 +204,11 @@ // Token is transferred to matcher expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()}); - // Give buyer KSM - await matcher.methods.depositKSM(PRICE, subToEth(alice.address)).send({from: escrow}); - // Buy { - expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal('0'); - expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal(PRICE.toString()); - - await executeEthTxOnSub(web3, api, alice, matcher, m => m.buyKSM(evmCollection.options.address, tokenId, subToEth(alice.address), subToEth(alice.address))); - - // Price is removed from buyer balance, and added to seller - expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal('0'); - expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal(PRICE.toString()); + const sellerBalanceBeforePurchase = await getBalanceSingle(api, seller.address); + await executeEthTxOnSub(web3, api, alice, matcher, m => m.buy(evmCollection.options.address, tokenId), {value: PRICE}); + expect(await getBalanceSingle(api, seller.address) - sellerBalanceBeforePurchase === PRICE); } // Token is transferred to evm account of alice --- a/tests/src/interfaces/augment-api-errors.ts +++ b/tests/src/interfaces/augment-api-errors.ts @@ -105,6 +105,10 @@ **/ NoPermission: AugmentedError; /** + * Not sufficient founds to perform action + **/ + NotSufficientFounds: AugmentedError; + /** * Tried to enable permissions which are only permitted to be disabled **/ OwnerPermissionsCantBeReverted: AugmentedError; --- a/tests/src/interfaces/augment-api-events.ts +++ b/tests/src/interfaces/augment-api-events.ts @@ -4,7 +4,7 @@ import type { ApiTypes } from '@polkadot/api-base/types'; import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types-codec'; import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime'; -import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; +import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; declare module '@polkadot/api-base/types/events' { export interface AugmentedEvents { @@ -68,7 +68,7 @@ * * * amount **/ - Approved: AugmentedEvent; + Approved: AugmentedEvent; /** * New collection was created * @@ -102,7 +102,7 @@ * * * amount: Always 1 for NFT **/ - ItemCreated: AugmentedEvent; + ItemCreated: AugmentedEvent; /** * Collection item was burned. * @@ -116,7 +116,7 @@ * * * amount: Always 1 for NFT **/ - ItemDestroyed: AugmentedEvent; + ItemDestroyed: AugmentedEvent; /** * Item was transferred * @@ -130,7 +130,7 @@ * * * amount: Always 1 for NFT **/ - Transfer: AugmentedEvent; + Transfer: AugmentedEvent; /** * Generic event **/ @@ -483,7 +483,7 @@ * * * user: Address. **/ - AllowListAddressAdded: AugmentedEvent; + AllowListAddressAdded: AugmentedEvent; /** * Address was remove from allow list * @@ -493,7 +493,7 @@ * * * user: Address. **/ - AllowListAddressRemoved: AugmentedEvent; + AllowListAddressRemoved: AugmentedEvent; /** * Collection admin was added * @@ -503,7 +503,7 @@ * * * admin: Admin address. **/ - CollectionAdminAdded: AugmentedEvent; + CollectionAdminAdded: AugmentedEvent; /** * Collection admin was removed * @@ -513,7 +513,7 @@ * * * admin: Admin address. **/ - CollectionAdminRemoved: AugmentedEvent; + CollectionAdminRemoved: AugmentedEvent; /** * Collection limits was set * --- a/tests/src/interfaces/augment-api-query.ts +++ b/tests/src/interfaces/augment-api-query.ts @@ -5,7 +5,7 @@ import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime'; -import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup'; +import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup'; import type { Observable } from '@polkadot/types/types'; declare module '@polkadot/api-base/types/storage' { @@ -73,7 +73,7 @@ /** * Allowlisted collection users **/ - allowlist: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + allowlist: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; /** * Collection info **/ @@ -87,7 +87,7 @@ /** * List of collection admins **/ - isAdmin: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + isAdmin: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; /** * Generic query **/ @@ -173,8 +173,8 @@ [key: string]: QueryableStorageEntry; }; fungible: { - allowance: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; - balance: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + allowance: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + balance: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; totalSupply: AugmentedQuery Observable, [u32]> & QueryableStorageEntry; /** * Generic query @@ -208,12 +208,12 @@ [key: string]: QueryableStorageEntry; }; nonfungible: { - accountBalance: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; - allowance: AugmentedQuery Observable>, [u32, u32]> & QueryableStorageEntry; + accountBalance: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + allowance: AugmentedQuery Observable>, [u32, u32]> & QueryableStorageEntry; /** * Used to enumerate tokens owned by account **/ - owned: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry; + owned: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry; tokenData: AugmentedQuery Observable>, [u32, u32]> & QueryableStorageEntry; tokensBurnt: AugmentedQuery Observable, [u32]> & QueryableStorageEntry; tokensMinted: AugmentedQuery Observable, [u32]> & QueryableStorageEntry; @@ -371,13 +371,13 @@ [key: string]: QueryableStorageEntry; }; refungible: { - accountBalance: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; - allowance: AugmentedQuery Observable, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; - balance: AugmentedQuery Observable, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + accountBalance: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + allowance: AugmentedQuery Observable, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; + balance: AugmentedQuery Observable, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry; /** * Used to enumerate tokens owned by account **/ - owned: AugmentedQuery Observable, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry; + owned: AugmentedQuery Observable, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry; tokenData: AugmentedQuery Observable, [u32, u32]> & QueryableStorageEntry; tokensBurnt: AugmentedQuery Observable, [u32]> & QueryableStorageEntry; tokensMinted: AugmentedQuery Observable, [u32]> & QueryableStorageEntry; --- a/tests/src/interfaces/augment-api-rpc.ts +++ b/tests/src/interfaces/augment-api-rpc.ts @@ -1,7 +1,7 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique'; +import type { PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique'; import type { AugmentedRpc } from '@polkadot/rpc-core/types'; import type { Metadata, StorageKey } from '@polkadot/types'; import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec'; @@ -562,31 +562,31 @@ /** * Get amount of different user tokens **/ - accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; /** * Get tokens owned by account **/ - accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; + accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; /** * Get admin list **/ - adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; + adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; /** * Get allowed amount **/ - allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; /** * Check if user is allowed to use collection **/ - allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; /** * Get allowlist **/ - allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; + allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>; /** * Get amount of specific account token **/ - balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; /** * Get collection by specified id **/ @@ -614,7 +614,7 @@ /** * Get token owner **/ - tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; + tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; /** * Get token variable metadata **/ --- a/tests/src/interfaces/augment-api-tx.ts +++ b/tests/src/interfaces/augment-api-tx.ts @@ -5,7 +5,7 @@ import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime'; -import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; +import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; declare module '@polkadot/api-base/types/submittable' { export interface AugmentedSubmittables { @@ -551,7 +551,7 @@ * * * new_admin_id: Address of new admin to add. **/ - addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>; /** * Add an address to allow list. * @@ -566,7 +566,7 @@ * * * address. **/ - addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>; /** * Set, change, or remove approved address to transfer the ownership of the NFT. * @@ -584,7 +584,7 @@ * * * item_id: ID of the item. **/ - approve: AugmentedSubmittable<(spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>; + approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>; /** * Destroys a concrete instance of NFT on behalf of the owner * See also: [`approve`] @@ -603,7 +603,7 @@ * * * from: owner of item **/ - burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32, u128]>; + burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32, u128]>; /** * Destroys a concrete instance of NFT. * @@ -688,7 +688,7 @@ * * * data: Token data to store on chain. **/ - 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, [u32, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>; + createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>; /** * This method creates multiple items in a collection created with CreateCollection method. * @@ -709,7 +709,7 @@ * * * owner: Address, initial owner of the NFT. **/ - createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr, Vec]>; + createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr, Vec]>; createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, UpDataStructsCreateItemExData]>; /** * **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money. @@ -737,7 +737,7 @@ * * * account_id: Address of admin to remove. **/ - removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>; /** * Switch back to pay-per-own-transaction model. * @@ -764,7 +764,7 @@ * * * address. **/ - removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>; 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, [u32, UpDataStructsCollectionLimits]>; /** * # Permissions @@ -938,7 +938,7 @@ * * Fungible Mode: Must specify transferred amount * * Re-Fungible Mode: Must specify transferred portion (between 0 and 1) **/ - transfer: AugmentedSubmittable<(recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>; + transfer: AugmentedSubmittable<(recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>; /** * 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. * @@ -960,7 +960,7 @@ * * * value: Amount to transfer. **/ - 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, [PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>; + transferFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>; /** * Generic tx **/ --- a/tests/src/interfaces/augment-types.ts +++ b/tests/src/interfaces/augment-types.ts @@ -1,7 +1,7 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UniqueRuntimeRuntime, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique'; +import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique'; import type { Data, StorageKey } from '@polkadot/types'; import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, 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-codec'; import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets'; @@ -18,7 +18,7 @@ import type { StatementKind } from '@polkadot/types/interfaces/claims'; import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective'; import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus'; -import type { AliveContractInfo, CodeHash, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts'; +import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts'; import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi'; import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan'; import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus'; @@ -198,6 +198,7 @@ ClassMetadata: ClassMetadata; CodecHash: CodecHash; CodeHash: CodeHash; + CodeSource: CodeSource; CodeUploadRequest: CodeUploadRequest; CodeUploadResult: CodeUploadResult; CodeUploadResultValue: CodeUploadResultValue; @@ -250,6 +251,7 @@ ContractInfo: ContractInfo; ContractInstantiateResult: ContractInstantiateResult; ContractInstantiateResultTo267: ContractInstantiateResultTo267; + ContractInstantiateResultTo299: ContractInstantiateResultTo299; ContractLayoutArray: ContractLayoutArray; ContractLayoutCell: ContractLayoutCell; ContractLayoutEnum: ContractLayoutEnum; @@ -591,7 +593,10 @@ InstanceId: InstanceId; InstanceMetadata: InstanceMetadata; InstantiateRequest: InstantiateRequest; + InstantiateRequestV1: InstantiateRequestV1; + InstantiateRequestV2: InstantiateRequestV2; InstantiateReturnValue: InstantiateReturnValue; + InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; InstructionWeights: InstructionWeights; @@ -707,6 +712,7 @@ OffchainAccuracyCompact: OffchainAccuracyCompact; OffenceDetails: OffenceDetails; Offender: Offender; + OpalRuntimeRuntime: OpalRuntimeRuntime; OpaqueCall: OpaqueCall; OpaqueMultiaddr: OpaqueMultiaddr; OpaqueNetworkState: OpaqueNetworkState; @@ -746,7 +752,6 @@ PalletBalancesReserveData: PalletBalancesReserveData; PalletCallMetadataLatest: PalletCallMetadataLatest; PalletCallMetadataV14: PalletCallMetadataV14; - PalletCommonAccountBasicCrossAccountIdRepr: PalletCommonAccountBasicCrossAccountIdRepr; PalletCommonError: PalletCommonError; PalletCommonEvent: PalletCommonEvent; PalletConstantMetadataLatest: PalletConstantMetadataLatest; @@ -758,6 +763,7 @@ PalletEthereumEvent: PalletEthereumEvent; PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; + PalletEvmAccountBasicCrossAccountIdRepr: PalletEvmAccountBasicCrossAccountIdRepr; PalletEvmCall: PalletEvmCall; PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError; PalletEvmContractHelpersError: PalletEvmContractHelpersError; @@ -1146,7 +1152,6 @@ UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; UncleEntryItem: UncleEntryItem; - UniqueRuntimeRuntime: UniqueRuntimeRuntime; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; UnrewardedRelayer: UnrewardedRelayer; --- a/tests/src/interfaces/lookup.ts +++ b/tests/src/interfaces/lookup.ts @@ -1254,11 +1254,11 @@ }, add_to_allow_list: { collectionId: 'u32', - address: 'PalletCommonAccountBasicCrossAccountIdRepr', + address: 'PalletEvmAccountBasicCrossAccountIdRepr', }, remove_from_allow_list: { collectionId: 'u32', - address: 'PalletCommonAccountBasicCrossAccountIdRepr', + address: 'PalletEvmAccountBasicCrossAccountIdRepr', }, set_public_access_mode: { collectionId: 'u32', @@ -1274,11 +1274,11 @@ }, add_collection_admin: { collectionId: 'u32', - newAdminId: 'PalletCommonAccountBasicCrossAccountIdRepr', + newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr', }, remove_collection_admin: { collectionId: 'u32', - accountId: 'PalletCommonAccountBasicCrossAccountIdRepr', + accountId: 'PalletEvmAccountBasicCrossAccountIdRepr', }, set_collection_sponsor: { collectionId: 'u32', @@ -1292,12 +1292,12 @@ }, create_item: { collectionId: 'u32', - owner: 'PalletCommonAccountBasicCrossAccountIdRepr', + owner: 'PalletEvmAccountBasicCrossAccountIdRepr', data: 'UpDataStructsCreateItemData', }, create_multiple_items: { collectionId: 'u32', - owner: 'PalletCommonAccountBasicCrossAccountIdRepr', + owner: 'PalletEvmAccountBasicCrossAccountIdRepr', itemsData: 'Vec', }, create_multiple_items_ex: { @@ -1315,25 +1315,25 @@ }, burn_from: { collectionId: 'u32', - from: 'PalletCommonAccountBasicCrossAccountIdRepr', + from: 'PalletEvmAccountBasicCrossAccountIdRepr', itemId: 'u32', value: 'u128', }, transfer: { - recipient: 'PalletCommonAccountBasicCrossAccountIdRepr', + recipient: 'PalletEvmAccountBasicCrossAccountIdRepr', collectionId: 'u32', itemId: 'u32', value: 'u128', }, approve: { - spender: 'PalletCommonAccountBasicCrossAccountIdRepr', + spender: 'PalletEvmAccountBasicCrossAccountIdRepr', collectionId: 'u32', itemId: 'u32', amount: 'u128', }, transfer_from: { - from: 'PalletCommonAccountBasicCrossAccountIdRepr', - recipient: 'PalletCommonAccountBasicCrossAccountIdRepr', + from: 'PalletEvmAccountBasicCrossAccountIdRepr', + recipient: 'PalletEvmAccountBasicCrossAccountIdRepr', collectionId: 'u32', itemId: 'u32', value: 'u128', @@ -1438,9 +1438,9 @@ _enum: ['ItemOwner', 'Admin', 'None'] }, /** - * Lookup172: pallet_common::account::BasicCrossAccountIdRepr + * Lookup172: pallet_evm::account::BasicCrossAccountIdRepr **/ - PalletCommonAccountBasicCrossAccountIdRepr: { + PalletEvmAccountBasicCrossAccountIdRepr: { _enum: { Substrate: 'AccountId32', Ethereum: 'H160' @@ -1478,31 +1478,31 @@ pieces: 'u128' }, /** - * Lookup180: up_data_structs::CreateItemExData> + * Lookup180: up_data_structs::CreateItemExData> **/ UpDataStructsCreateItemExData: { _enum: { NFT: 'Vec', - Fungible: 'BTreeMap', + Fungible: 'BTreeMap', RefungibleMultipleItems: 'Vec', RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData' } }, /** - * Lookup182: up_data_structs::CreateNftExData> + * Lookup182: up_data_structs::CreateNftExData> **/ UpDataStructsCreateNftExData: { constData: 'Bytes', variableData: 'Bytes', - owner: 'PalletCommonAccountBasicCrossAccountIdRepr' + owner: 'PalletEvmAccountBasicCrossAccountIdRepr' }, /** - * Lookup189: up_data_structs::CreateRefungibleExData> + * Lookup189: up_data_structs::CreateRefungibleExData> **/ UpDataStructsCreateRefungibleExData: { constData: 'Bytes', variableData: 'Bytes', - users: 'BTreeMap' + users: 'BTreeMap' }, /** * Lookup192: pallet_template_transaction_payment::Call @@ -1756,7 +1756,7 @@ } }, /** - * Lookup225: frame_system::EventRecord + * Lookup225: frame_system::EventRecord **/ FrameSystemEventRecord: { phase: 'FrameSystemPhase', @@ -1902,19 +1902,19 @@ } }, /** - * Lookup238: pallet_unique::RawEvent> + * Lookup238: pallet_unique::RawEvent> **/ PalletUniqueRawEvent: { _enum: { CollectionSponsorRemoved: 'u32', - CollectionAdminAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)', + CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)', CollectionOwnedChanged: '(u32,AccountId32)', CollectionSponsorSet: '(u32,AccountId32)', ConstOnChainSchemaSet: 'u32', SponsorshipConfirmed: '(u32,AccountId32)', - CollectionAdminRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)', - AllowListAddressRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)', - AllowListAddressAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)', + CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)', + AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)', + AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)', CollectionLimitSet: 'u32', MintPermissionSet: 'u32', OffchainSchemaSet: 'u32', @@ -1930,10 +1930,10 @@ _enum: { CollectionCreated: '(u32,u8,AccountId32)', CollectionDestroyed: 'u32', - ItemCreated: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)', - ItemDestroyed: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)', - Transfer: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)', - Approved: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)' + ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)', + ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)', + Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)', + Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)' } }, /** @@ -2240,7 +2240,7 @@ * Lookup297: pallet_common::pallet::Error **/ PalletCommonError: { - _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation'] + _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds'] }, /** * Lookup299: pallet_fungible::pallet::Error @@ -2262,12 +2262,12 @@ _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces'] }, /** - * Lookup305: pallet_nonfungible::ItemData> + * Lookup305: pallet_nonfungible::ItemData> **/ PalletNonfungibleItemData: { constData: 'Bytes', variableData: 'Bytes', - owner: 'PalletCommonAccountBasicCrossAccountIdRepr' + owner: 'PalletEvmAccountBasicCrossAccountIdRepr' }, /** * Lookup306: pallet_nonfungible::pallet::Error @@ -2417,11 +2417,11 @@ **/ FrameSystemExtensionsCheckWeight: 'Null', /** - * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment + * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment **/ PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact', /** - * Lookup346: unique_runtime::Runtime + * Lookup346: opal_runtime::Runtime **/ - UniqueRuntimeRuntime: 'Null' + OpalRuntimeRuntime: 'Null' }; --- a/tests/src/interfaces/types-lookup.ts +++ b/tests/src/interfaces/types-lookup.ts @@ -1364,12 +1364,12 @@ readonly isAddToAllowList: boolean; readonly asAddToAllowList: { readonly collectionId: u32; - readonly address: PalletCommonAccountBasicCrossAccountIdRepr; + readonly address: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isRemoveFromAllowList: boolean; readonly asRemoveFromAllowList: { readonly collectionId: u32; - readonly address: PalletCommonAccountBasicCrossAccountIdRepr; + readonly address: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isSetPublicAccessMode: boolean; readonly asSetPublicAccessMode: { @@ -1389,12 +1389,12 @@ readonly isAddCollectionAdmin: boolean; readonly asAddCollectionAdmin: { readonly collectionId: u32; - readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr; + readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isRemoveCollectionAdmin: boolean; readonly asRemoveCollectionAdmin: { readonly collectionId: u32; - readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr; + readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isSetCollectionSponsor: boolean; readonly asSetCollectionSponsor: { @@ -1412,13 +1412,13 @@ readonly isCreateItem: boolean; readonly asCreateItem: { readonly collectionId: u32; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; readonly data: UpDataStructsCreateItemData; } & Struct; readonly isCreateMultipleItems: boolean; readonly asCreateMultipleItems: { readonly collectionId: u32; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; readonly itemsData: Vec; } & Struct; readonly isCreateMultipleItemsEx: boolean; @@ -1440,28 +1440,28 @@ readonly isBurnFrom: boolean; readonly asBurnFrom: { readonly collectionId: u32; - readonly from: PalletCommonAccountBasicCrossAccountIdRepr; + readonly from: PalletEvmAccountBasicCrossAccountIdRepr; readonly itemId: u32; readonly value: u128; } & Struct; readonly isTransfer: boolean; readonly asTransfer: { - readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr; + readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly value: u128; } & Struct; readonly isApprove: boolean; readonly asApprove: { - readonly spender: PalletCommonAccountBasicCrossAccountIdRepr; + readonly spender: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly amount: u128; } & Struct; readonly isTransferFrom: boolean; readonly asTransferFrom: { - readonly from: PalletCommonAccountBasicCrossAccountIdRepr; - readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr; + readonly from: PalletEvmAccountBasicCrossAccountIdRepr; + readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly value: u128; @@ -1573,8 +1573,8 @@ readonly type: 'ItemOwner' | 'Admin' | 'None'; } - /** @name PalletCommonAccountBasicCrossAccountIdRepr (172) */ - export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum { + /** @name PalletEvmAccountBasicCrossAccountIdRepr (172) */ + export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum { readonly isSubstrate: boolean; readonly asSubstrate: AccountId32; readonly isEthereum: boolean; @@ -1616,7 +1616,7 @@ readonly isNft: boolean; readonly asNft: Vec; readonly isFungible: boolean; - readonly asFungible: BTreeMap; + readonly asFungible: BTreeMap; readonly isRefungibleMultipleItems: boolean; readonly asRefungibleMultipleItems: Vec; readonly isRefungibleMultipleOwners: boolean; @@ -1628,14 +1628,14 @@ export interface UpDataStructsCreateNftExData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; } /** @name UpDataStructsCreateRefungibleExData (189) */ export interface UpDataStructsCreateRefungibleExData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly users: BTreeMap; + readonly users: BTreeMap; } /** @name PalletTemplateTransactionPaymentCall (192) */ @@ -2068,7 +2068,7 @@ readonly isCollectionSponsorRemoved: boolean; readonly asCollectionSponsorRemoved: u32; readonly isCollectionAdminAdded: boolean; - readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isCollectionOwnedChanged: boolean; readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>; readonly isCollectionSponsorSet: boolean; @@ -2078,11 +2078,11 @@ readonly isSponsorshipConfirmed: boolean; readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>; readonly isCollectionAdminRemoved: boolean; - readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isAllowListAddressRemoved: boolean; - readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isAllowListAddressAdded: boolean; - readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isCollectionLimitSet: boolean; readonly asCollectionLimitSet: u32; readonly isMintPermissionSet: boolean; @@ -2105,13 +2105,13 @@ readonly isCollectionDestroyed: boolean; readonly asCollectionDestroyed: u32; readonly isItemCreated: boolean; - readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isItemDestroyed: boolean; - readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isTransfer: boolean; - readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isApproved: boolean; - readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved'; } @@ -2462,7 +2462,8 @@ readonly isCantApproveMoreThanOwned: boolean; readonly isAddressIsZero: boolean; readonly isUnsupportedOperation: boolean; - readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation'; + readonly isNotSufficientFounds: boolean; + readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds'; } /** @name PalletFungibleError (299) */ @@ -2490,7 +2491,7 @@ export interface PalletNonfungibleItemData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; } /** @name PalletNonfungibleError (306) */ @@ -2643,7 +2644,7 @@ /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (345) */ export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name UniqueRuntimeRuntime (346) */ - export type UniqueRuntimeRuntime = Null; + /** @name OpalRuntimeRuntime (346) */ + export type OpalRuntimeRuntime = Null; } // declare module --- a/tests/src/interfaces/unique/definitions.ts +++ b/tests/src/interfaces/unique/definitions.ts @@ -22,7 +22,7 @@ isOptional?: true; }; -const CROSS_ACCOUNT_ID_TYPE = 'PalletCommonAccountBasicCrossAccountIdRepr'; +const CROSS_ACCOUNT_ID_TYPE = 'PalletEvmAccountBasicCrossAccountIdRepr'; const collectionParam = {name: 'collection', type: 'u32'}; const tokenParam = {name: 'tokenId', type: 'u32'}; @@ -38,8 +38,8 @@ export default { types, rpc: { - adminlist: fun('Get admin list', [collectionParam], 'Vec'), - allowlist: fun('Get allowlist', [collectionParam], 'Vec'), + adminlist: fun('Get admin list', [collectionParam], 'Vec'), + allowlist: fun('Get allowlist', [collectionParam], 'Vec'), accountTokens: fun('Get tokens owned by account', [collectionParam, crossAccountParam()], 'Vec'), collectionTokens: fun('Get tokens contained in collection', [collectionParam], 'Vec'), --- a/tests/src/interfaces/unique/types.ts +++ b/tests/src/interfaces/unique/types.ts @@ -654,6 +654,9 @@ readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization'; } +/** @name OpalRuntimeRuntime */ +export interface OpalRuntimeRuntime extends Null {} + /** @name OrmlVestingModuleCall */ export interface OrmlVestingModuleCall extends Enum { readonly isClaim: boolean; @@ -858,15 +861,6 @@ readonly amount: u128; } -/** @name PalletCommonAccountBasicCrossAccountIdRepr */ -export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum { - readonly isSubstrate: boolean; - readonly asSubstrate: AccountId32; - readonly isEthereum: boolean; - readonly asEthereum: H160; - readonly type: 'Substrate' | 'Ethereum'; -} - /** @name PalletCommonError */ export interface PalletCommonError extends Enum { readonly isCollectionNotFound: boolean; @@ -892,7 +886,8 @@ readonly isCantApproveMoreThanOwned: boolean; readonly isAddressIsZero: boolean; readonly isUnsupportedOperation: boolean; - readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation'; + readonly isNotSufficientFounds: boolean; + readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds'; } /** @name PalletCommonEvent */ @@ -902,13 +897,13 @@ readonly isCollectionDestroyed: boolean; readonly asCollectionDestroyed: u32; readonly isItemCreated: boolean; - readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isItemDestroyed: boolean; - readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isTransfer: boolean; - readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly isApproved: boolean; - readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>; + readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>; readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved'; } @@ -935,6 +930,15 @@ readonly type: 'Executed'; } +/** @name PalletEvmAccountBasicCrossAccountIdRepr */ +export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum { + readonly isSubstrate: boolean; + readonly asSubstrate: AccountId32; + readonly isEthereum: boolean; + readonly asEthereum: H160; + readonly type: 'Substrate' | 'Ethereum'; +} + /** @name PalletEvmCall */ export interface PalletEvmCall extends Enum { readonly isWithdraw: boolean; @@ -1085,7 +1089,7 @@ export interface PalletNonfungibleItemData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; } /** @name PalletRefungibleError */ @@ -1259,12 +1263,12 @@ readonly isAddToAllowList: boolean; readonly asAddToAllowList: { readonly collectionId: u32; - readonly address: PalletCommonAccountBasicCrossAccountIdRepr; + readonly address: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isRemoveFromAllowList: boolean; readonly asRemoveFromAllowList: { readonly collectionId: u32; - readonly address: PalletCommonAccountBasicCrossAccountIdRepr; + readonly address: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isSetPublicAccessMode: boolean; readonly asSetPublicAccessMode: { @@ -1284,12 +1288,12 @@ readonly isAddCollectionAdmin: boolean; readonly asAddCollectionAdmin: { readonly collectionId: u32; - readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr; + readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isRemoveCollectionAdmin: boolean; readonly asRemoveCollectionAdmin: { readonly collectionId: u32; - readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr; + readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr; } & Struct; readonly isSetCollectionSponsor: boolean; readonly asSetCollectionSponsor: { @@ -1307,13 +1311,13 @@ readonly isCreateItem: boolean; readonly asCreateItem: { readonly collectionId: u32; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; readonly data: UpDataStructsCreateItemData; } & Struct; readonly isCreateMultipleItems: boolean; readonly asCreateMultipleItems: { readonly collectionId: u32; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; readonly itemsData: Vec; } & Struct; readonly isCreateMultipleItemsEx: boolean; @@ -1335,28 +1339,28 @@ readonly isBurnFrom: boolean; readonly asBurnFrom: { readonly collectionId: u32; - readonly from: PalletCommonAccountBasicCrossAccountIdRepr; + readonly from: PalletEvmAccountBasicCrossAccountIdRepr; readonly itemId: u32; readonly value: u128; } & Struct; readonly isTransfer: boolean; readonly asTransfer: { - readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr; + readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly value: u128; } & Struct; readonly isApprove: boolean; readonly asApprove: { - readonly spender: PalletCommonAccountBasicCrossAccountIdRepr; + readonly spender: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly amount: u128; } & Struct; readonly isTransferFrom: boolean; readonly asTransferFrom: { - readonly from: PalletCommonAccountBasicCrossAccountIdRepr; - readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr; + readonly from: PalletEvmAccountBasicCrossAccountIdRepr; + readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr; readonly collectionId: u32; readonly itemId: u32; readonly value: u128; @@ -1413,7 +1417,7 @@ readonly isCollectionSponsorRemoved: boolean; readonly asCollectionSponsorRemoved: u32; readonly isCollectionAdminAdded: boolean; - readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isCollectionOwnedChanged: boolean; readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>; readonly isCollectionSponsorSet: boolean; @@ -1423,11 +1427,11 @@ readonly isSponsorshipConfirmed: boolean; readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>; readonly isCollectionAdminRemoved: boolean; - readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isAllowListAddressRemoved: boolean; - readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isAllowListAddressAdded: boolean; - readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>; + readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>; readonly isCollectionLimitSet: boolean; readonly asCollectionLimitSet: u32; readonly isMintPermissionSet: boolean; @@ -1722,9 +1726,6 @@ readonly stateVersion: u8; } -/** @name UniqueRuntimeRuntime */ -export interface UniqueRuntimeRuntime extends Null {} - /** @name UpDataStructsAccessMode */ export interface UpDataStructsAccessMode extends Enum { readonly isNormal: boolean; @@ -1816,7 +1817,7 @@ readonly isNft: boolean; readonly asNft: Vec; readonly isFungible: boolean; - readonly asFungible: BTreeMap; + readonly asFungible: BTreeMap; readonly isRefungibleMultipleItems: boolean; readonly asRefungibleMultipleItems: Vec; readonly isRefungibleMultipleOwners: boolean; @@ -1834,7 +1835,7 @@ export interface UpDataStructsCreateNftExData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly owner: PalletCommonAccountBasicCrossAccountIdRepr; + readonly owner: PalletEvmAccountBasicCrossAccountIdRepr; } /** @name UpDataStructsCreateReFungibleData */ @@ -1848,7 +1849,7 @@ export interface UpDataStructsCreateRefungibleExData extends Struct { readonly constData: Bytes; readonly variableData: Bytes; - readonly users: BTreeMap; + readonly users: BTreeMap; } /** @name UpDataStructsMetaUpdatePermission */ --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -839,6 +839,13 @@ return balance; } +export async function transferBalanceTo(api: ApiPromise, source: IKeyringPair, target: string, amount = 1000n * UNIQUE) { + const tx = api.tx.balances.transfer(target, amount); + const events = await submitTransactionAsync(source, tx); + const result = getGenericResult(events); + expect(result.success).to.be.true; +} + export async function scheduleTransferExpectSuccess( collectionId: number, -- gitstuff