0.0.10 • Published 5 years ago
@archanova/solidity v0.0.10
Archanova Solidity
Archanova solidity contracts
Installation
$ npm i @archanova/solidity -S
Usage
import {
ContractNames,
getContractAddress,
getContractAbi,
getContractByteCodeHash,
} from '@archanova/solidity';
console.log(
'AccountProvider rinkeby address:',
getContractAddress(ContractNames.AccountProvider, '4'),
);
console.log(
'Account abi:',
getContractAbi(ContractNames.Account),
);
console.log(
'Account byteCodeHash:',
getContractByteCodeHash(ContractNames.Account),
);
Exported fields:
Contract name | abi | byteCodeHash | addresses |
---|---|---|---|
Account | ✅ | ✅ | |
AccountProvider | ✅ | ✅ | |
AccountProxy | ✅ | ✅ | |
ENSRegistry | ✅ | ✅ | |
ENSResolver | ✅ | ||
Guardian | ✅ | ||
VirtualPaymentManager | ✅ | ✅ |
Development
Setup
$ git clone git@github.com:archanova/solidity.git
$ cd ./solidity
$ npm i
Migration
Configure env
variables:
Name | Default Value |
---|---|
PROVIDER_MNEMONIC | - |
PROVIDER_ENDPOINT | http://localhost:8545 |
ENS_TOP_LABELS | archanova,smartsafe |
VIRTUAL_PAYMENT_LOCK_PERIOD | 30 * 24 * 60 * 60 |
Start Migration:
# Rinkeby TestNet
$ npm run migrate:rinkeby
# Kovan TestNet
$ npm run migrate:kovan
Building ./dist
$ npm run build
Running Tests
$ npm test
License
The MIT License