2.1.0 • Published 5 years ago
@smartwallet/contracts v2.1.0
SmartWallet contracts
Installation
$ npm i @smartwallet/contracts -SUsage
import {
  ContractNames,
  getContractAddress,
  getContractAbi,
  getContractByteCodeHash,
} from '@smartwallet/contracts';
console.log(
  'AccountProviderV2 mainnet address:',
  getContractAddress(ContractNames.AccountProviderV2, '1'),
);
console.log(
  'AccountProviderV2 ropsten address:',
  getContractAddress(ContractNames.AccountProviderV2, '3'),
);
console.log(
  'Account abi:',
  getContractAbi(ContractNames.Account),
);
console.log(
  'Account byteCodeHash:',
  getContractByteCodeHash(ContractNames.Account),
);Contracts:
| Name | abi | byteCodeHash | addresses | 
|---|---|---|---|
Account | ✅ | ✅ | |
AccountProviderV1 | ✅ | ✅ | |
AccountProviderV2 | ✅ | ✅ | |
AccountProxyV1 | ✅ | ✅ | |
AccountProxyV2 | ✅ | ✅ | |
AccountFriendRecovery | ✅ | ✅ | |
ENSRegistry | ✅ | ✅ | |
ENSResolver | ✅ | ||
ExampleToken | ✅ | ||
ERC20Token | ✅ | ||
Guardian | ✅ | ||
VirtualPaymentManager | ✅ | ✅ | 
Development
Configure env variables:
| Name | Default Value | 
|---|---|
| PROVIDER_MNEMONIC | - | 
| PROVIDER_ENDPOINT | http://localhost:8545 | 
| VIRTUAL_PAYMENT_LOCK_PERIOD | 30 * 24 * 60 * 60 | 
Start Migration:
npm run migrate-<env>, for example:
$ npm run migrate-localBuilding ./dist
$ npm run distRunning Tests
$ npm test2.1.0
5 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.1.0
6 years ago
1.0.0-rc.4
6 years ago
1.0.0-rc.3
6 years ago
1.0.0-rc.2
6 years ago
1.0.0-rc.1
6 years ago