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
Installation
$ npm i @etherspot/contracts -SUsage
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";
// ...