> 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/src20.md).

# SRC20

SRC20 token usage with shielded reads/writes

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.

## Example

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

# Transparent metadata reads
name = decode(["string"], bytes(token.tread.name()))[0]
symbol = decode(["string"], bytes(token.tread.symbol()))[0]
decimals = decode(["uint8"], bytes(token.tread.decimals()))[0]

# Shielded balance read (signed read — uses msg.sender)
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)
```

## Notes

* `balanceOf()` in `SRC20_ABI` takes **no address argument** — the contract uses `msg.sender` internally, so you must use `.read` (a signed read), not `.tread`
* Use `.read` for shielded reads and `.write` for shielded writes
* Use `.tread` for transparent metadata reads (`name`, `symbol`, `decimals`, `allowance`)

## See Also

* [Event Watching](/clients/python/src20/event-watching.md) — Watch and decrypt SRC20 Transfer/Approval events
* [Types](/clients/python/src20/types.md) — Decrypted event data structures
* [Intelligence Providers](/clients/python/src20/intelligence-providers.md) — Viewing key management


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
