Erc20TokenBalanceFactory
Factory generates information for an ERC20 Token Balance
Hierarchy
Factory‹Erc20TokenBalance, Params, UniqueIdentifiers›
↳ Erc20TokenBalanceFactory
Index
Constructors
constructor
Properties
Entity
cache
context
Methods
create
fetch
refresh
update
Constructors
constructor
+ new Erc20TokenBalanceFactory(context
: Context): Erc20TokenBalanceFactory
Overrides Factory.constructor
Defined in src/entities/factories/Erc20TokenBalanceFactory.ts:28
Create an instance of the ERC20 Token Balance Factory
Parameters:
Name | Type |
| Context |
Returns: Erc20TokenBalanceFactory
Properties
Entity
• Entity: EntityClass‹Params, UniqueIdentifiers›
Inherited from Factory.Entity
Defined in src/entities/factories/Factory.ts:37
entity class that this Factory is in charge of generating and caching
cache
• cache: object
Inherited from Factory.cache
Defined in src/entities/factories/Factory.ts:28
Type declaration:
[ key: string]: Erc20TokenBalance | undefined
context
• context: Context
Inherited from Factory.context
Defined in src/entities/factories/Factory.ts:32
Methods
create
▸ create(uid
: string, params
: Params): EntityType
Inherited from Factory.create
Defined in src/entities/factories/Factory.ts:87
Get an entity from the cache. Creates it if it isn't cached, updates it if it is
Parameters:
Name | Type | Description |
| string | unique identifier for the entity |
| Params | constructor data for the entity |
Returns: EntityType
fetch
▸ fetch(uid
: string): Promise‹EntityType›
Inherited from Factory.fetch
Defined in src/entities/factories/Factory.ts:57
Get an entity from the cache. Fetches the necessary data to create it if it isn't cached, refreshes it if it is
Parameters:
Name | Type | Description |
| string | unique identifier for the entity |
Returns: Promise‹EntityType›
refresh
▸ refresh(uid
: string): Promise‹void›
Inherited from Factory.refresh
Defined in src/entities/factories/Factory.ts:108
Fetch the data for an entity and updates its properties
Parameters:
Name | Type | Description |
| string | unique identifier for the entity |
Returns: Promise‹void›
update
▸ update(uid
: string, params
: Partial‹Params›): Promise‹void›
Inherited from Factory.update
Defined in src/entities/factories/Factory.ts:126
Update an entity's properties in place
Parameters:
Name | Type | Description |
| string | unique identifier for the entity |
| Partial‹Params› | properties that should be updated |
Returns: Promise‹void›
Last updated