Catalog npm
Back to packageRELEASE DETAILS

2.0.38

npm

@0x/contracts-staking

Staking contracts used by 0x protocol

Published21 May 2021
Direct dependencies38
Transitive dependenciesNot calculated

README

Current package documentation

Staking Contracts

This package implements the stake-based liquidity incentives defined by ZEIP-31.

See the specification here.

Contracts Directory Structure

The contracts can be found in contracts/src.

* Staking.sol        | This is a stateless contract that encapsulates all the staking logic.
* StakingProxy.sol   | This is a stateful contract that proxies into the Staking contract.
* ReadOnlyProxy.sol  | This is a stateless contract the makes read-only calls from the Staking Proxy to the Staking Contract.
* fees/              | This contains mixins that implement the logic for 0x Protocol fees.
* immutable/         | This contains mixins that are generally immutable. Changing these files can result in catastrophic failures. Exercise extreme caution.
* interfaces/        | This contains interfaces used throughout the entire staking system.
* libs/              | This contains libraries used by the staking contract; for example, math and signature validation.
* stake/             | This contains mixins that implement the core staking logic.
* staking_pools/     | This contains mixins that implement logic for creating and managing staking pools.
* sys/               | This contains mixins that implement system-level functionality, like scheduling and finalization.
* vaults/            | This contains the vaults (like the Zrx Token Vault).

Installation

Install

npm install @0x/contracts-staking --save

Contributing

We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the 0x Improvement Proposals (ZEIPs) repository and follow the contribution guidelines provided therein.

Please read our contribution guidelines before getting started.

Install Dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0x/contracts-staking yarn build

Or continuously rebuild on change:

PKG=@0x/contracts-staking yarn watch

Clean

yarn clean

Lint

yarn lint

Run Tests

yarn test

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 38

Native requirements
38 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^6.4.3runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^3.5.0runtime
ethereumjs-util
Environment
{
  "local_name": "ethereumjs-util",
  "alias": false,
  "peer_metadata": null
}
^7.0.10runtime
@0x/base-contract
Environment
{
  "local_name": "@0x/base-contract",
  "alias": false,
  "peer_metadata": null
}
^6.4.0runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^5.2.0runtime
@0x/contracts-test-utils
Environment
{
  "local_name": "@0x/contracts-test-utils",
  "alias": false,
  "peer_metadata": null
}
^5.4.1runtime
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^4.1.0development
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
solhint
Environment
{
  "local_name": "solhint",
  "alias": false,
  "peer_metadata": null
}
^1.4.1development
truffle
Environment
{
  "local_name": "truffle",
  "alias": false,
  "peer_metadata": null
}
^5.0.32development
typedoc
Environment
{
  "local_name": "typedoc",
  "alias": false,
  "peer_metadata": null
}
~0.16.11development
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^3.3.3development
decimal.js
Environment
{
  "local_name": "decimal.js",
  "alias": false,
  "peer_metadata": null
}
^10.2.0development
dirty-chai
Environment
{
  "local_name": "dirty-chai",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
4.2.2development
@0x/abi-gen
Environment
{
  "local_name": "@0x/abi-gen",
  "alias": false,
  "peer_metadata": null
}
^5.6.0development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
12.12.54development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
@0x/dev-utils
Environment
{
  "local_name": "@0x/dev-utils",
  "alias": false,
  "peer_metadata": null
}
^4.2.7development
@types/lodash
Environment
{
  "local_name": "@types/lodash",
  "alias": false,
  "peer_metadata": null
}
4.14.104development
@0x/ts-doc-gen
Environment
{
  "local_name": "@0x/ts-doc-gen",
  "alias": false,
  "peer_metadata": null
}
^0.0.28development
chai-bignumber
Environment
{
  "local_name": "chai-bignumber",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
@0x/order-utils
Environment
{
  "local_name": "@0x/order-utils",
  "alias": false,
  "peer_metadata": null
}
^10.4.22development
@0x/sol-compiler
Environment
{
  "local_name": "@0x/sol-compiler",
  "alias": false,
  "peer_metadata": null
}
^4.7.3development
@0x/web3-wrapper
Environment
{
  "local_name": "@0x/web3-wrapper",
  "alias": false,
  "peer_metadata": null
}
^7.5.3development
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
js-combinatorics
Environment
{
  "local_name": "js-combinatorics",
  "alias": false,
  "peer_metadata": null
}
^0.5.3development
@0x/contracts-gen
Environment
{
  "local_name": "@0x/contracts-gen",
  "alias": false,
  "peer_metadata": null
}
^2.0.38development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^4.1.4development
make-promises-safe
Environment
{
  "local_name": "make-promises-safe",
  "alias": false,
  "peer_metadata": null
}
^1.1.0development
@0x/contracts-erc20
Environment
{
  "local_name": "@0x/contracts-erc20",
  "alias": false,
  "peer_metadata": null
}
^3.3.9development
@0x/contracts-utils
Environment
{
  "local_name": "@0x/contracts-utils",
  "alias": false,
  "peer_metadata": null
}
^4.7.9development
@0x/contracts-dev-utils
Environment
{
  "local_name": "@0x/contracts-dev-utils",
  "alias": false,
  "peer_metadata": null
}
^1.3.29development
@0x/contracts-asset-proxy
Environment
{
  "local_name": "@0x/contracts-asset-proxy",
  "alias": false,
  "peer_metadata": null
}
^3.7.12development
@0x/contracts-exchange-libs
Environment
{
  "local_name": "@0x/contracts-exchange-libs",
  "alias": false,
  "peer_metadata": null
}
^4.3.30development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "d7266f2451b415ead0aa5e00f4cd0652166354ba",
  "tarball": "https://registry.npmjs.org/@0x/contracts-staking/-/contracts-staking-2.0.38.tgz",
  "fileCount": 101,
  "integrity": "sha512-dgkOw5gCuqNAs3AA23R+mwA8sh3evY5DOcFPQAOlRm36K9DNvpJLqCgES5P2BhMyN9qSql6uz05h/2p9oJC1Cw==",
  "signatures": [
    {
      "sig": "MEYCIQDA3Oz/hNUEbKsGpo6YWqXPVefitMAIC3oOwrYn2qyWmwIhAMSSeXHHuH/k/tM6aMEo+l7CVJAPP3pVA2bTCeyvbpsz",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 3501327,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgp6m6CRA9TVsSAnZWagAALtQP/31z8NJ4zH8hhY7vy/EM\nT69rPG5kD7NvRWeQCNjfPaARkNGENatcRSttht3usdU+g5yq4kW+ZTmdlOZR\nZg8SAbTLek7S7QzoLqb7qKD8ZOFQPQS66+52rJm6GtwKQqv7NsmzYRjqDIaQ\ng9Jqq6J70WSr8NXIIDOdADpQZGVbv7jRn4EWgDMkzF60bjBJ8uA0VfO8uKrR\n8rZcA9+8BIkiDFzpfJwY6qdJYlX/G4hYF+gKuu41bESXLb1BXiFew8fXIivM\nDasWmPR3yCiP7m8SSbpu6t2/f5yUaWMpM6dOwJhXbEjh346u8Fa5ZslCGDWx\niv151/uypY9NHneBmjVUm6WLi1u/aqYtHNEFOJLTc1kdk6A/9Rnu7zR/T7tU\nQPns0p9n/Y27GmbjDYrWWs/AOOHOeftsOg4SKA/sYDH7tQj9OVsVOazIBE4P\n+iKOnnt6UgA+yCkY17Zyr0BG5VBSnjTZzdQV4wkcU+zhja3hnYhmgTVVAe8B\nXnF/tDgs5Mm1004sf5o1uxS2OVQJyNx/EqEe93pHte7cv76ndX5/zlON6c5C\nNLTyJMd/lOG+b00awUrmZAEMxn2FY0PLUt4PnQ0oIBhQ7CalSqKzmSqJ1oy6\nN/lNdek2WMNsfYAxcivkUeV+MucsQoQ6lAKzazTox12er3P3tzqrYBVWpwfM\nCQBc\r\n=UQ7q\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
0xproject/protocol

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xproject/0x-monorepo

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:223a31a0e28ecbfafbcd8f2dce1c4339996907c1903e5cf6385d068b304ff7ed

Other collected versions

2.0.4516 Aug2.0.4411 Aug2.0.436 Aug2.0.4222 Jun2.0.4111 Jun2.0.402 JunView all collected versions →