platon-cli

Use Foundry `cast` to query PlatON on-chain data from mainnet or devnet over RPC. Use when a user asks to inspect blocks, transactions, receipts, balances, code, storage, logs, contract calls, gas price, nonce, or other direct chain data from PlatON. Accept network aliases `mainnet` and `main`, plus `dev`, `testnet`, and `devnet`.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "platon-cli" with this command: npx skills add platonnetwork/platon-dev-skills/platonnetwork-platon-dev-skills-platon-cli

PlatON CLI

Overview

Use Foundry cast to query PlatON chain data from mainnet or devnet. Prefer explicit --rpc-url usage so every command is reproducible and does not depend on ambient shell state.

Setup

Install Foundry (includes cast):

curl -L https://foundry.paradigm.xyz | bash foundryup --install  v1.6.0-rc1

Set RPC (optional):

export ETH_RPC_URL="https://openapi2.platon.network/rpc"

When the user needs the latest validated PlatON endpoints, first use $platon-chainlist.

Check Balance

cast balance <ADDRESS> --rpc-url https://openapi2.platon.network/rpc

In LAT (human readable):

cast balance <ADDRESS> --ether --rpc-url https://openapi2.platon.network/rpc

Transaction Info

cast tx <TX_HASH> --rpc-url https://openapi2.platon.network/rpc

Transaction receipt:

cast receipt <TX_HASH> --rpc-url https://openapi2.platon.network/rpc

Gas Price

cast gas-price --rpc-url https://openapi2.platon.network/rpc

In gwei:

cast --to-unit $(cast gas-price --rpc-url https://openapi2.platon.network/rpc) gwei

Block Info

Latest block:

cast block latest --rpc-url https://openapi2.platon.network/rpc

Specific block:

cast block <BLOCK_NUMBER> --rpc-url https://openapi2.platon.network/rpc

Contract Call

cast call <CONTRACT> "balanceOf(address)(uint256)" <ADDRESS> --rpc-url https://openapi2.platon.network/rpc

Read another view function:

cast call <CONTRACT> "<FUNCTION_SIGNATURE>" <ARGS...> --rpc-url https://openapi2.platon.network/rpc

Publish Transaction

Broadcast a raw signed transaction:

cast publish <SIGNED_TX_HEX> --rpc-url https://openapi2.platon.network/rpc

Send Transaction

Send a state-changing transaction with a private key:

cast send <CONTRACT> "transfer(address,uint256)" <TO> <AMOUNT> \
  --private-key <PRIVATE_KEY> \
  --rpc-url https://openapi2.platon.network/rpc

Send native LAT:

cast send <TO> --value 1ether \
  --private-key <PRIVATE_KEY> \
  --rpc-url https://openapi2.platon.network/rpc

Estimate Gas

Estimate gas for a contract write:

cast estimate <CONTRACT> "transfer(address,uint256)" <TO> <AMOUNT> --rpc-url https://openapi2.platon.network/rpc

Estimate gas for native transfer:

cast estimate <TO> --value 1ether --rpc-url https://openapi2.platon.network/rpc

Contract Code

cast code <ADDRESS> --rpc-url https://openapi2.platon.network/rpc

Storage

cast storage <ADDRESS> <SLOT> --rpc-url https://openapi2.platon.network/rpc

Logs

cast logs --rpc-url https://openapi2.platon.network/rpc --address <ADDRESS> --from-block <START> --to-block <END>

Account Nonce

cast nonce <ADDRESS> --rpc-url https://openapi2.platon.network/rpc

Chain Info

cast chain-id --rpc-url https://openapi2.platon.network/rpc

Public RPC Endpoints

NetworkProtocolURL
MainnetHTTPhttps://openapi2.platon.network/rpc
MainnetWSwss://openapi2.platon.network/ws
DevnetHTTPhttps://devnet3openapi.platon.network/rpc
DevnetWSwss://devnet3openapi.platon.network/ws

Network aliases:

  • mainnet, main
  • dev, testnet, devnet

Notes

  • Addresses are 0x-prefixed hex (42 characters)
  • Gas prices fluctuate; check before transactions
  • Rate limits apply on public RPCs
  • Use --rpc-url or set ETH_RPC_URL environment variable

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

WAIaaS Wallet

Self-hosted crypto wallet daemon for AI agents. Send transactions, manage DeFi positions, enforce spending limits — without exposing private keys to agents....

Registry SourceRecently Updated
Web3

Idiom Dictionary

成语词典。成语查询、典故故事、成语接龙、成语猜谜、造句示例、分类浏览。Chinese idiom dictionary with stories, chain game, quiz. 成语、典故、国学。

Registry SourceRecently Updated
1521Profile unavailable
Web3

Wallet Tracker

Multi-chain wallet asset tracker — monitor EVM and Solana wallets, aggregate portfolio, and detect holding changes. Use when you need wallet tracker capabili...

Registry SourceRecently Updated
2050Profile unavailable
Web3

Moses Roles

MO§ES™ Role Hierarchy — Defines Primary, Secondary, Observer agents with enforced sequencing. Primary leads, Secondary validates, Observer flags. Enforces Pr...

Registry SourceRecently Updated
550Profile unavailable