Socket
Socket
Sign inDemoInstall

@solidstate/contracts

Package Overview
Dependencies
0
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @solidstate/contracts

Solidity library for flexible smart contract development


Version published
Weekly downloads
1.2K
decreased by-24.98%
Maintainers
1
Install size
294 kB
Created
Weekly downloads
 

Readme

Source

SolidState Contracts

SolidState contract library. Part of the SolidState Solidity monorepo.

Note: An old version of this library has been audited by Hacken. More details are available in the report.

Installation

Install the package as a development dependency:

npm install --save-dev @solidstate/contracts
# or
yarn add --dev @solidstate/contracts

Layout

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". Visibility layers are subject to a consistent naming convention so that their purposes may be easily identified.

For example, the SolidStateERC20 contract contains ERC20Base, ERC20Extended and ERC20Metadata modules. The ERC20Base module is composed of the external functions specified by the IERC20 interface, ERC20BaseInternal, and ERC20BaseStorage.

An overview of the uses of each visibility layer is as follows:

layercontentsdescriptionexample
externalexternal and public functionsset of functions that constitute a module's external interface; useful for most common situationsERC20Base.sol
internalinternal functions, eventsset of internal functions that define a module's core logic; may be called by inheriting contractsERC20BaseInternal.sol
storageinternal library functions, structslibrary 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

Keywords

FAQs

Last updated on 04 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc