Constructor
# new Allowance(mopt) → {void}
Captures an approval relationship where an owner allows a spender to transfer up to a certain value from the owner's wallet.
ERC20 allowance model
sequenceDiagram
participant App
App->>App: new Allowance({ owner, spender, value })
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
m |
ModelArg.<Allowance>
|
<optional> |
Optional partial data or another instance to initialize the model |
void
Example
const allowance = new Allowance({ owner: "acct1", spender: "acct2", value: 50 });