You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trying to batch two extrsinics together but i keep getting this error with both utility.batchAll and utility.batch.
2022-05-09 03:09:42 API/INIT: RPC methods not decorated
Waiting on cryptoWaitReady...
Crypto is ready!
file:///home/examples/mintAsset.js:19
const ext = api.tx.utility.batchAll([ext1,ext2]);
^
TypeError: Cannot read properties of undefined (reading 'batchAll')
at file:///home/examples/mintAsset.js:19:28
at processTicksAndRejections (node:internal/process/task_queues:96:5)
here is my code
import{cryptoWaitReady}from'@polkadot/util-crypto';import{Keyring}from'@polkadot/keyring';import{api}from'./api.js';import{signAndSendExt}from'./signAndSendExt.js';import{UNIT}from'./constants.js';console.log("Waiting on cryptoWaitReady...");awaitcryptoWaitReady();console.log("Crypto is ready!");// create a keyring with some non-default values specifiedconstkeyring=newKeyring({type: 'sr25519',ss58Format: 88});constmain=keyring.addFromUri('//Alice');constext1=api.tx.assets.create({asset: 2},main.address,1000*UNIT)constext2=api.tx.assets.mint({asset: 2},main.address,1000*UNIT);constext=api.tx.utility.batchAll([ext1,ext2]);signAndSendExt(api,ext,main);
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
trying to batch two extrsinics together but i keep getting this error with both utility.batchAll and utility.batch.
here is my code
The text was updated successfully, but these errors were encountered: