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 |
void
Example
const wallet = new ERC20Wallet({ id: "acct1", token: "MyToken", balance: 1000 });
// Update balance via repository: await repo.update(wallet, ctx)
Members
# captive
Optional field used by some flows to mark non-transferable funds or managed custody
Captive flag or identifier
# id
Primary key for the wallet; commonly references an account or identity
Wallet unique identifier
# token
References the ERC20Token this wallet holds; maintained as a relationship for cascading updates/deletes
Associated token name