coinsSRC20

Privacy-preserving ERC20 tokens with shielded balances

SRC20 is Seismic's privacy-preserving ERC20. Balances and transfer amounts use shielded types (suint256), so they're hidden from external observers. The SDK ships with SRC20_ABI built in.

from seismic_web3 import create_wallet_client, SRC20_ABI, PrivateKey

w3 = create_wallet_client("http://127.0.0.1:8545", private_key=PrivateKey(...))

token = w3.seismic.contract(address="0x...", abi=SRC20_ABI)

Metadata

Token metadata isn't shielded, so you can use plain transparent reads:

name = token.tread.name()         # b"TestToken"
symbol = token.tread.symbol()     # b"TEST"
decimals = token.tread.decimals() # b'\x12' (18)

Balances

raw = token.read.balanceOf()
balance = int.from_bytes(raw, "big")
circle-exclamation

Approvals

Approve a spender to transfer tokens on your behalf, then have them call transferFrom:


Transfers

Last updated