Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@abridged/contracts

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abridged/contracts

Abridged contracts

  • 2.0.0-beta.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

Abridged contracts

NPM version GitHub actions MIT licensed

Installation

$ npm i @abridged/contracts -S

Usage

Javascript

import {
  ContractNames,
  getContractAddress,
  getContractAbiDefinition,
  getContractByteCodeHash,
} from '@abridged/contracts';

console.log(
  'AccountRegistry mainnet address:',
  getContractAddress(ContractNames.AccountRegistry),
);
console.log(
  'AccountRegistry kovan address:',
  getContractAddress(ContractNames.AccountRegistry, '42'),
);
console.log(
  'AccountFriendRecoveryExtension goerli address:',
  getContractAddress(ContractNames.AccountFriendRecoveryExtension, 5),
);
console.log(
  'ERC20Token abi definition:',
  getContractAbiDefinition(ContractNames.ERC20Token),
);
console.log(
  'Account byte code hash:',
  getContractByteCodeHash(ContractNames.Account),
);

Available contracts:

NameabibyteCodeHashaddresses
Account
AccountExternalDeposit
AccountRegistry
AccountFriendRecoveryExtension
ERC20Token

Solidity

pragma solidity ^0.5.12;

import {AccountRegistry} from "@abridged/contracts/contracts/account/AccountRegistry.sol";

// ...

Development

Test

$ npm run test

Compile

$ npm run compile

Migrate

Config via env vars:

NameDefault value
PROVIDER_MNEMONIC(empty)
PROVIDER_PRIVATE_KEY(empty)
PROVIDER_ENDPOINThttp://localhost:8545
INFURA_PROJECT_ID(empty)

Scripts:

$ npm run migrate:main
$ npm run migrate:ropsten
$ npm run migrate:rinkeby
$ npm run migrate:goerli
$ npm run migrate:kovan
$ npm run migrate:local

Build dist

$ npm run dist

Initialize

Config via env vars:

NameDefault value
PROVIDER_MNEMONIC(empty)
PROVIDER_PRIVATE_KEY(empty)
PROVIDER_ENDPOINThttp://localhost:8545
INFURA_PROJECT_ID(empty)
PAYMENT_GUARDIAN_ADDRESS(empty)

Scripts:

$ npm run initialize:main
$ npm run initialize:ropsten
$ npm run initialize:rinkeby
$ npm run initialize:goerli
$ npm run initialize:kovan
$ npm run initialize:local

License

MIT

FAQs

Package last updated on 08 Jul 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc