Class

ERC20Wallet

ERC20Wallet(mopt) → {void}

Constructor

# new ERC20Wallet(mopt) → {void}

Represents a holder account for an ERC20 token within the Fabric network, tracking balance and token association.

ERC20 wallet model

sequenceDiagram participant App participant Repo App->>Repo: read("acct1", ctx) Repo-->>App: ERC20Wallet
Parameters:
Name Type Attributes Description
m ModelArg.<ERC20Wallet> <optional>

Optional partial data or another instance to initialize the model

View Source contracts/erc20/models.ts, line 90

void
Example
const wallet = new ERC20Wallet({ id: "acct1", token: "MyToken", balance: 1000 });
// Update balance via repository: await repo.update(wallet, ctx)

Members

# balance

Current amount of the associated token held by this wallet

Token balance for this wallet

View Source contracts/erc20/models.ts, line 121

# captive

Optional field used by some flows to mark non-transferable funds or managed custody

Captive flag or identifier

View Source contracts/erc20/models.ts, line 126

# id

Primary key for the wallet; commonly references an account or identity

Wallet unique identifier

View Source contracts/erc20/models.ts, line 111

# token

References the ERC20Token this wallet holds; maintained as a relationship for cascading updates/deletes

Associated token name

View Source contracts/erc20/models.ts, line 116