JSPM

  • Created
  • Published
  • Downloads 500
  • Score
    100M100P100Q103450F
  • License MIT

EtherSpot contracts

Package Exports

  • @etherspot/contracts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@etherspot/contracts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

EtherSpot contracts

NPM version MIT licensed

Installation

$ npm i @etherspot/contracts -S

Usage

Javascript

import { 
  ContractNames, 
  getContractAddress, 
  getContractAbi, 
  getContractByteCodeHash, 
} from '@etherspot/contracts'; 

console.log(
  'AccountRegistry mainnet address:', 
  getContractAddress(ContractNames.AccountRegistry),
);
console.log(
  'AccountRegistry görli address:', 
  getContractAddress(ContractNames.AccountRegistry, '5'),
);
console.log(
  'SignatureValidator abi:', 
  getContractAbi(ContractNames.SignatureValidator),
);
console.log(
  'ControlledAccount byte code hash:',
  getContractByteCodeHash(ContractNames.ControlledAccount),
);

Solidity

pragma solidity 0.5.12;

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

// ...

Test

# unit tests
$ npm run test

# unit tests (log gas usage)
$ npm run test:log-gas-usage

License

MIT