Docs
Submit an issue
Appchains on Polkadot
Appchains on Polkadot
  • WELCOME
    • Polkadot Appchains
    • Installing Pop CLI
    • How to contribute
  • GUIDES
    • Set up your development environment
    • Create a new parachain
      • Create an Assets parachain
      • Create a Contracts parachain
      • Create an EVM parachain
    • Benchmarking
    • Build your parachain
      • Build your runtime deterministically
    • Call a chain
    • Launch a Chain
      • Launch a Chain in Development
      • Launch a Chain to Paseo
        • Launch Paseo
        • Set up keys
        • Acquire Coretime
      • Deploy a chain with Polkadot Deployment Portal
      • Running a post-startup command
    • Securely Sign Transactions from CLI
    • Test runtime upgrades
  • POP CLI
    • welcome
    • install
    • new
    • bench
    • build
    • build spec
    • call
    • up
    • clean
    • test
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. GUIDES

Securely Sign Transactions from CLI

PreviousRunning a post-startup commandNextTest runtime upgrades

Last updated 5 months ago

Was this helpful?

Pop CLI provides an option to securely sign transactions from the CLI. It does this by opening a signing portal allowing you to sign the transactions using your browser extension wallet.

Example Usage

For a full guide on calling a chain from Pop CLI, see the guide.

Normally, you would provide --suri=<private-key> to interact with the chain. However, this implies a potentially insecure way of handling private keys and should only be used for development accounts. For production accounts and more secure signing, Pop CLI provides the --use-wallet option that you can use.

Here is an example of calling a chain using --use-wallet:

pop call chain --pallet System --function remark --args "0x11" --url ws://localhost:9944/ --use-wallet --skip-confirm

This will open a signing portal in your browser. Pop CLI will display the following:

◇  Wallet signing portal started at http://127.0.0.1:9090.
│
◒  Waiting for signature... Press Ctrl+C to terminate early.

Your browser will open a new tab with the following screen at http://127.0.0.1:9090 (or similar if the port is already in use);

Click on the Connect Wallet button to connect your browser extension wallet.

After connecting your wallet, you will have the option to choose your account and sign the transaction, and finally see the transaction details for signing.

Once ready to sign, pressing the Submit button will open your wallet for signature.

⚠️ It is important to verify transaction details in your wallet before signing.

Signing the transaction will show a success message in the portal. You may close the portal after signing.

After the signed transaction is received, the portal will send the transaction payload to Pop CLI, which will then submit the transaction to the chain.

◆  Signed payload received.
│
◇  Extrinsic submitted with hash: "0x039076e2760eb1a4d41bf4daf009a0376ba128bd8c51cf365e4a5c5dee07a414"
│
◆  Do you want to perform another call?
│  ○ Yes  / ● No
└
Call a Chain
Signing Portal Initial Open
Connect Wallet
Transaction Details
Opened Wallet for Signing