Catalog npm
Back to packageRELEASE DETAILS

1.2.0-alpha1

npm

@0xcert/ethereum-utils-contracts

General utility module with helper smart contracts.

0xcertassetblockchaincurrencyerc-20erc-721ethereumframeworkfungiblejavascriptlibrariesnodejsnon-fungiblenpmnuxtjsprotocol
All keywords (23)
smart-contracttokentypescriptvaluevaluesvuejszxc
Published11 Apr 2019
Direct dependencies8
Transitive dependenciesNot calculated

README

Current package documentation

General utility module with helper smart contracts.

The 0xcert Framework is a free and open-source JavaScript library that provides tools for building powerful decentralized applications. Please refer to the official documentation for more details.

This module is one of the bricks of the 0xcert Framework. It's written with TypeScript and it's actively maintained. The source code is available on GitHub where you can also find our issue tracker.

Ethereum Utility Contracts

This module includes Solidity contracts which should be useful for any smart contract project.

Safe math -- safe-math.sol

This library includes basic arithmetic operations for unsigned 256-bit integers. This is a modern, gas-efficient implementation which also includes error reporting.

This implementation is based on the openzeppelin-solidity however the documentation and readability of the code is much improved. We hope this will help you to write more error-free code.

Example usage:

pragma solidity ^0.5.6;
import "https://github.com/0xcert/framework/packages/0xcert-ethereum-utils-contracts/src/contracts/math/safe-math.sol";

contract MilitaryStrengthAdder
{
  using SafeMath for uint256;
    
  function add(
    uint256 _addend1,
    uint256 _addend2
  )
    external
    pure
    returns (uint256 sum)
  {
    return _addend1.add(_addend2);
  }
}

Abilities -- abilitable.sol

This is a permissions model where you may assign different forms of permission on your contract to any address. Typically these permissions will be used to allow administrative tasks on a smart contract.

Ownership -- ownable.sol and claimable.sol

These are two ownership models that you can use for any smart contract. Ownable uses a single owner model that can be transferred unilaterally to a new owner. Claimable extends this model to a two-step transfer process, first the existing must send and the new owner must receive, the ownership privilege.

Address utilities -- address-utils.sol

This allows you to check whether any address is a normal account or if it is a smart contract. Please note that a normal account can become a smart contract (CREATE) and a smart contract can become a normal account (SELFDESTRUCT).

ERC-165 -- erc165.sol and supports-interface.sol

ERC-165 is a standard for publishing interfaces that your smart contract supports. If you are implementing a standard interface then it is best practice for your contract to identify this with ERC-165. This makes it simple for other contracts to detect how it works so they can cooperate as expected.

Build

By default, the contracts in this package are built for Constantinople EVM. If you would like to use these smart contracts for Wanchain or other blockchains using EVM for a different version, you will need to rebuild them for the desired version.

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 8

Native requirements
8 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@specron/cli
Environment
{
  "local_name": "@specron/cli",
  "alias": false,
  "peer_metadata": null
}
^0.5.6development
@specron/spec
Environment
{
  "local_name": "@specron/spec",
  "alias": false,
  "peer_metadata": null
}
^0.5.6development
solc
Environment
{
  "local_name": "solc",
  "alias": false,
  "peer_metadata": null
}
0.5.6development
solhint
Environment
{
  "local_name": "solhint",
  "alias": false,
  "peer_metadata": null
}
2.0.0development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
^7.0.1development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
^5.12.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^3.1.1development
web3
Environment
{
  "local_name": "web3",
  "alias": false,
  "peer_metadata": null
}
1.0.0-beta.37development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-YkLiXy8ItdIBntqgE3pyqk2Z7k1KeJOkX4gq98MGj4uUEuSU3+Z/UAjeWhsaqZ3Y9JEH/Xhq0ddQwZ1Qa6e1dA==",
  "shasum": "1d47b496d0a09ac2802c6c19e18c061a51256070",
  "tarball": "https://registry.npmjs.org/@0xcert/ethereum-utils-contracts/-/ethereum-utils-contracts-1.2.0-alpha1.tgz",
  "fileCount": 48,
  "unpackedSize": 955885,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrx5aCRA9TVsSAnZWagAA7E0P/R99+t0CVggDN1jJ6Vzi\nbR2eWoqtzxbZ/rL4b2SgLZEPGE1RSwrH2OJcudROQVOpupldIFQgyscl4Vp2\nfIPmPxTPawGbQGweA9HYidKj/iKEE200idTZMjQhvpo87KnKz1jLoVw9wCC8\nbY0MC2VTVuwihU2/Il+kQn5ScrK7YwcSiqnGrU84Xg5GTNUqkJOjz5C959Xe\nq3i2LWjE00hHia5gLiKncghi/IJZLcX96jkyP8i9GPD6yPJCVq3ZyM3h8kNU\nAEWH+OR2WuUB8QYTvAIWGOoOy8Fs1PdV9+Lv6DphLYm5u+aESENHqTfHu2Jj\nm0BinwJ3dki6xZQg4e7VbZuu5bLCov36+0YT1CZU1IOPnLpp4BPE3t2BK5/0\nWpG7yQoIO5aZSjZr/9tqDBbp9ewKeHOP2EV7cpf1HQRIDhDfelXvNMBQPL/b\norWjRffqLK5YspmJ8DgbEhq/vBlQFvOISpPGgvp8UdA5BJ4GSfBwHosayGm/\nnZUiNFEGifcdjWvkyW3Op7Ko7233jzn9pyJ7L15PjjDPa+F0alA89JvNLua2\nNF8C340moSsyALQS1LciiFEmPJ5e6nQwIrlW9B9UzYcjg3fBl7lHSUy0jZJW\nStMbdr/J0Zb9+4UyRVLlAshMU27q6JZBr9sLVtGtPwe8lnqU6WtWdD2ly3cF\nYgHm\r\n=Uclb\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCICq2C7gukGQmij0LKd2xcF1wFOF8XZxuxYK9Cuwkb1JvAiBTn7pvcPWL2pA0vZkjw6vM43ndLgoe35ymyUbSfpn2gQ=="
    }
  ]
}

Repository

PENDING
0xcert/framework

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:48 UTC

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

Record identity

package_version:fa19f9bd15e710ae5db4a672164fb61d6f4fc4376bba23d5a804e9e1be35ea2b

Other collected versions

2.1.115 Mar2.1.014 Jan2.0.312 Aug2.0.24 May2.0.16 Mar2.0.1-beta05 MarView all collected versions →