Call
What Can You Do?
The pop call chain command supports three types of operations:
1. Execute Extrinsics
Submit transactions to the chain by calling dispatchable functions. These require signing and will modify chain state.
2. Query Storage
Read storage items from the chain's state. Storage queries don't require signing and can read:
Plain storage values (e.g., System::Number - the current block number)
Storage maps (e.g., System::Account - account information by address)
3. Read Constants
Access constant values defined in the runtime metadata (e.g., System::Version, System::BlockHashCount).
Interactive Guidance (Recommended)
Interact with a chain using Pop CLI's interactive guidance by simply entering:
pop call chainFirst, you will be prompted to select which chain you want to interact with from a list of available chains. You can type to filter the list and quickly find your desired chain. If you want to connect to a custom RPC endpoint, select the "Custom" option, which allows you to manually type the chain URL.
After selecting your chain, you will be prompted to select a pallet, then choose what you want to do with that pallet:
Execute an extrinsic (function that modifies state, e.g. balance transfer)
Query storage
Read constants
After making your selection, you'll be guided through providing any required arguments and (for extrinsics) the account to sign the transaction.
Manual (non-interactive)
If you prefer not to use interactive prompts, you can call the chain by specifying all the required arguments directly:
Executing an Extrinsic
You can execute an extrinsic by specifying the pallet and function (dispatchable function name) and any arguments.
[!TIP] If you receive "Pallet not found" or "Function not found" errors, double-check the case of your pallet and function names. Common examples: use "Balances" (not "balances"), "transfer_keep_alive" (not "transferKeepAlive").
Querying Storage
You can query storage items by specifying the pallet and function (storage item name). Storage queries return the current value immediately without requiring transaction signing.
Reading Constants
Query constant values from the runtime. Constants are read directly from metadata and don't require signing or keys.
Additional Options
Sudo Calls
To dispatch a call with Root origin when the chain's runtime includes pallet-sudo, you can wrap the call in a sudo.sudo() call by using the --sudo flag:
Using Wallet for Signing
You can use a browser extension wallet to sign extrinsics instead of providing a secret URI:
Or use the shorthand -w:
Direct Call Data Submission
If you already have the SCALE-encoded call data and want to directly submit the extrinsic:
Skip Confirmation
Use the --skip-confirm or -y flag to automatically submit extrinsics without prompting for confirmation. This also prevents the prompt to perform another call:
This is particularly useful for scripting and automation.
Quick URL Entry
When prompted for a chain, you can select "Custom" to quickly type the chain URL manually, accelerating the process when you already know the endpoint.
Examples
Example 1: Query Current Block Number
Example 2: Check an Account Balance
Example 3: Read Runtime Version
Example 4: Transfer with Wallet
Example 5: Sudo Call with Auto-confirm
Need help?
Ask on Polkadot Stack Exchange (tag it pop) or drop by our Telegram. We're here to help!
Last updated
Was this helpful?