Making Payments
This tutorial walks you through transferring native VSL tokens between accounts using the vsl-cli
tool.
If you haven’t already created and funded accounts, check out the Creating Accounts tutorial first.
Step 1: Enter REPL Mode
Start the interactive CLI with a temporary configuration:
vsl-cli repl --tmp-config
Step 2: Connect to a Network
Choose either a local or remote network.
Option A: Local Node
Ensure you’ve launched your local VSL node (in another terminal) with a genesis.json
file:
vsl-cli server:launch --db tmp --genesis-file "genesis.json"
Option B: Remote Devnet
Add and use the remote public Devnet:
vsl> network:add remote --url https://rpc.vsl.pi2.network
vsl> network:use remote
Check that the network is responsive:
vsl> health:check
Step 3: Use the Payer Account
Switch to the account that will send the funds (e.g., alice
):
vsl> account:use alice
Check the current balance:
vsl> account:balance
Step 4: Make the Payment
To send native tokens (VSL) to another account (e.g., bob
):
vsl> pay --to bob --amount 0x20
This sends 0x20
(32 in decimal) tokens from Alice to Bob.
Step 5: Verify the Transfer
Switch to the recipient account:
vsl> account:use bob
vsl> account:balance
You should now see the updated balance that includes the received tokens.
Optional: View Current Account
If you’re unsure which account is active:
vsl> account:current
Cleanup (Optional)
To stop your local setup and remove demo accounts:
vsl> server:stop
vsl> account:remove alice
vsl> account:remove bob
vsl> network:remove remote
Next Steps
You’ve successfully made a native token transfer using the VSL CLI. From here, you can experiment with custom assets, claim submissions, and verifications, etc.
For more advanced workflows, check out the Submitting and Verifying Claims tutorial.
Last updated
Was this helpful?