RPC Methods
Account Methods
Testnet 122606
Section
RPC Methods
Documentation category
Type
Guide
Technical reference
Summary
Query account balances, nonces, contract code, and storage.
Article Content
eth_getBalance
Returns the SWSS Coin balance of an address.
Params:
ADDRESS— 20-byte account addressBLOCK— block tag or number (use"latest")
{
"method": "eth_getBalance",
"params": ["0xAbCd...1234", "latest"]
}
Result: string — balance in wei (hex). Convert: parseInt(result, 16) / 1e18 for SWSS Coin.
eth_getTransactionCount
Returns the number of transactions sent from an address (the account nonce).
Params:
ADDRESSBLOCK— use"latest"for confirmed nonce,"pending"to include mempool transactions
{
"method": "eth_getTransactionCount",
"params": ["0xAbCd...1234", "latest"]
}
Result: string — hex-encoded nonce
eth_accounts
Returns a list of addresses owned by the node. On public RPC nodes, this returns an empty array — use a local signer instead.
Result: []
eth_getCode
Returns the compiled bytecode of a smart contract at a given address.
Params:
ADDRESS— contract addressBLOCK
Result: string — hex-encoded bytecode, or "0x" if the address is an EOA.
eth_getStorageAt
Returns the value from a storage slot of an address.
Params:
ADDRESSSLOT— hex-encoded storage positionBLOCK
