2.1.0 • Published 4 years ago
@smartwallet/contracts v2.1.0
SmartWallet contracts
Installation
$ npm i @smartwallet/contracts -S
Usage
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-local
Building ./dist
$ npm run dist
Running Tests
$ npm test
2.1.0
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.1.0
4 years ago
1.0.0-rc.4
5 years ago
1.0.0-rc.3
5 years ago
1.0.0-rc.2
5 years ago
1.0.0-rc.1
5 years ago