Addr
A Dango account or contract address. NewType("Addr", str) — at runtime it is a plain str.
Definition
Addr = NewType("Addr", str)Construction
from dango.utils.types import Addr
addr = Addr("0x90bc84df68d1aa59a857e04ed529e9a26edbea4f")Notes
- The
NewTypeexists for type-checker enforcement. At runtime there is no class —isinstance(addr, Addr)does NOT work; useisinstance(addr, str). - Always wrap raw strings in
Addr(...)at call sites to keep the type checker happy.