JSPM

  • Created
  • Published
  • Downloads 500
  • Score
    100M100P100Q100918F
  • 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 GitHub actions 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, '1'),
);
console.log(
  'AccountRegistry kovan address:', 
  getContractAddress(ContractNames.AccountRegistry, '42'),
);
console.log(
  'Account abi:', 
  getContractAbi(ContractNames.Account),
);
console.log(
  'Account byteCodeHash:',
  getContractByteCodeHash(ContractNames.Account),
);

Available contracts:

Name abi byteCodeHash addresses
Account
AccountExternalDeposit
AccountRegistry
AccountFriendRecoveryExtension
ENSRegistrar
ENSRegistry
ERC20Token
ExampleToken

Solidity

pragma solidity ^0.5.11;

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

// ...

License

MIT