> For the complete documentation index, see [llms.txt](https://docs.seismic.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seismic.systems/clients/python/guides/src20-workflow.md).

# SRC20 Workflow

End-to-end example using the SRC20 token standard — Seismic's privacy-preserving ERC20.

```python
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)

# 1) Read token metadata (transparent reads — no auth needed)
name = decode(["string"], bytes(token.tread.name()))[0]
symbol = decode(["string"], bytes(token.tread.symbol()))[0]
decimals = decode(["uint8"], bytes(token.tread.decimals()))[0]
print(name, symbol, decimals)

# 2) Read your balance (signed read — proves identity)
balance = decode(["uint256"], bytes(token.read.balanceOf()))[0]
print("balance", balance)

# 3) Approve and transfer (shielded writes)
approve_tx = token.write.approve("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", 500)
w3.eth.wait_for_transaction_receipt(approve_tx)

transfer_tx = token.write.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", 100)
receipt = w3.eth.wait_for_transaction_receipt(transfer_tx)
print("transfer status", receipt["status"])
```

## Notes

* `balanceOf()` takes no arguments — it uses `msg.sender`, so you must use `.read` (signed read), not `.tread`
* `approve` and `transfer` amounts use shielded types (`suint256`) — encrypted in the transaction calldata
* Transparent metadata like `name()`, `symbol()`, and `decimals()` can use `.tread` since they don't depend on the caller

## See Also

* [SRC20 Documentation](/clients/python/src20.md) — Full token standard reference
* [Signed Reads](/clients/python/guides/signed-reads.md) — Why `.read` is needed for `balanceOf()`
* [Shielded Write](/clients/python/guides/shielded-write.md) — How `.write` encrypts calldata


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.seismic.systems/clients/python/guides/src20-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
