Appearance
Solidity API
ERC20MetadataStorage
Library for managing storage of ERC20 token metadata in a diamond pattern implementation. This library uses the diamond storage pattern to maintain upgrade safety by storing metadata in a specific storage slot determined by a unique hash.
Layout
Storage layout structure for ERC20 metadata
Parameters
| Name | Type | Description |
|---|
solidity
struct Layout {
string name;
string symbol;
uint8 decimals;
}STORAGE_SLOT
solidity
bytes32 STORAGE_SLOTUnique storage slot for ERC20 metadata The slot is determined by hashing a unique string to prevent storage collision with other diamond facets. This follows the diamond storage pattern.
layout
solidity
function layout() internal pure returns (struct ERC20MetadataStorage.Layout l)Provides access to the storage layout
Return Values
| Name | Type | Description |
|---|---|---|
| l | struct ERC20MetadataStorage.Layout | The storage layout struct pointing to the correct storage slot |