SRC20_ABI
SRC20 token interface ABI constant
Last updated
function balanceOf(address account) external view returns (uint256);function balanceOf() external view returns (uint256);import os
from eth_abi import decode
from seismic_web3 import PrivateKey, SEISMIC_TESTNET, SRC20_ABI
pk = PrivateKey.from_hex_str(os.environ["PRIVATE_KEY"])
w3 = SEISMIC_TESTNET.wallet_client(pk)
token = w3.seismic.contract("0xYourTokenAddress", SRC20_ABI)
# Transparent metadata (no auth needed)
name = decode(["string"], bytes(token.tread.name()))[0]
symbol = decode(["string"], bytes(token.tread.symbol()))[0]
# Shielded balance (signed read)
balance = decode(["uint256"], bytes(token.read.balanceOf()))[0]
# Shielded transfer
tx_hash = token.write.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", 100)
w3.eth.wait_for_transaction_receipt(tx_hash)