You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than rewrite the `ERC20Base` tests or assume that all core behavior remains untouched, one can import the included tests and run them against the custom implementation:
SolidState maintains "recommended" implementations of various EIP standards, which are suitable for most users. Internally, these implementations may be composed of several modules, which themselves may be composed of several visibility layers. Layers are subject to a consistent naming convention so that their purposes may be easily identified.
17
+
SolidState maintains "recommended" implementations of various EIP standards, which are suitable for most users. Internally, these implementations may be composed of several modules, which themselves may be composed of several visibility layers. Layers are subject to a consistent naming convention so that their purposes may be easily identified.
18
18
19
-
For example, the `ERC20` contract contains `ERC20Base`, `ERC20Extended` and `ERC20Metadata` modules. The `ERC20Base` module is composed of the external functions specified by the `IERC20` interface, `ERC20BaseInternal`, and `ERC20BaseStorage`.
19
+
For example, the `ERC20` contract contains `ERC20Base`, `ERC20Extended` and `ERC20Metadata` modules. The `ERC20Base` module is composed of the external functions specified by the `IERC20` interface, `ERC20BaseInternal`, and `ERC20BaseStorage`.
20
20
21
21
An overview of the uses of each visibility layer is as follows:
22
22
23
-
| layer | contents | description | example |
24
-
|-|-|-|-|
25
-
|`external`| external and public functions | set of functions that constitute a module's external interface; useful for most common situations |`ERC20Base.sol`|
26
-
|`internal`| internal functions, events | set of internal functions that define a module's core logic; may be called by inheriting contracts |`ERC20BaseInternal.sol`|
27
-
|`storage`| internal library functions, structs | library for accessing and modifying storage; useful when sharing access to storage between implementation contracts that will be deployed separately (such as in the "diamond" proxy architecture) |`ERC20BaseStorage.sol`|
|`external`| external and public functions | set of functions that constitute a module's external interface; useful for most common situations |`ERC20Base.sol`|
26
+
|`internal`| internal functions, events | set of internal functions that define a module's core logic; may be called by inheriting contracts|`ERC20BaseInternal.sol`|
27
+
|`storage`| internal library functions, structs | library for accessing and modifying storage; useful when sharing access to storage between implementation contracts that will be deployed separately (such as in the "diamond" proxy architecture) |`ERC20BaseStorage.sol`|
0 commit comments