-
Notifications
You must be signed in to change notification settings - Fork 156
migrate to hardhat #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
migrate to hardhat #176
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,3 +72,10 @@ scDebugLog | |
coverage.json | ||
coverage/ | ||
coverageEnv/ | ||
|
||
node_modules | ||
|
||
#Buidler files | ||
cache | ||
artifacts | ||
.openzeppelin | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"semi": false, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
"printWidth": 80, | ||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"printWidth": 100, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": false, | ||
"explicitTypes": "always" | ||
} | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
const _require = require('app-root-path').require; | ||
const config = _require('/truffle.js').networks.testrpcCoverage; | ||
|
||
module.exports = { | ||
host: config.host, | ||
network_id: config.network_id, | ||
port: config.port, | ||
gas: config.gas, | ||
gasPrice: config.gasPrice, | ||
norpc: true, | ||
testCommand: 'npx truffle test ./test/unit/*.js', | ||
compileCommand: 'npx truffle compile', | ||
skipFiles: ['mocks'], | ||
copyPackages: ['openzeppelin-eth'], | ||
}; | ||
skipFiles: ['mocks'], | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"extends": "default", | ||
"rules": { | ||
"not-rely-on-time": [false], | ||
"no-simple-event-func-name": [false], | ||
"indent": ["warn", 4], | ||
"max-line-length": ["error", 100] | ||
} | ||
"extends": "solhint:default", | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"not-rely-on-time": "off", | ||
"max-line-length": ["error", 100] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,13 @@ dist: trusty | |
sudo: required | ||
language: node_js | ||
node_js: | ||
- "8" | ||
- '12' | ||
cache: | ||
directories: | ||
- node_modules | ||
- $(npm config get prefix)/bin/ganache-cli | ||
before_install: | ||
- npm install -g [email protected] # Locking npm to 6.4.1 | ||
- npm install -g npx | ||
script: | ||
- ./scripts/setup-ci.sh | ||
- npm run lint | ||
- npm run test | ||
- npm run coverage | ||
- yarn test | ||
- yarn coverage | ||
after_success: | ||
- cat coverage/lcov.info | npx coveralls | ||
notifications: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ Ampleforth (code name uFragments) is a decentralized elastic supply protocol. It | |
This repository is a collection of [smart contracts](http://ampleforth.org/docs) that implement the Ampleforth protocol on the Ethereum blockchain. | ||
|
||
The official mainnet addresses are: | ||
|
||
- ERC-20 Token: [0xD46bA6D942050d489DBd938a2C909A5d5039A161](https://etherscan.io/token/0xd46ba6d942050d489dbd938a2c909a5d5039a161) | ||
- Supply Policy: [0x1B228a749077b8e307C5856cE62Ef35d96Dca2ea](https://etherscan.io/address/0x1b228a749077b8e307c5856ce62ef35d96dca2ea) | ||
- Orchestrator: [0x6fb00a180781e75f87e2b690af0196baa77c7e7c](https://etherscan.io/address/0x6fb00a180781e75f87e2b690af0196baa77c7e7c) | ||
|
@@ -21,32 +22,24 @@ The official mainnet addresses are: | |
- [Contribute](#contribute) | ||
- [License](#license) | ||
|
||
|
||
## Install | ||
|
||
```bash | ||
# Install project dependencies | ||
npm install | ||
|
||
# Install ethereum local blockchain(s) and associated dependencies | ||
npx setup-local-chains | ||
yarn | ||
``` | ||
|
||
## Testing | ||
|
||
``` bash | ||
# You can use the following command to start a local blockchain instance | ||
npx start-chain [ganacheUnitTest|gethUnitTest] | ||
|
||
# Run all unit tests | ||
npm test | ||
|
||
# Run unit tests in isolation | ||
npx truffle --network ganacheUnitTest test test/unit/uFragments.js | ||
```bash | ||
# Run all unit tests (compatible with node v12+) | ||
yarn test | ||
``` | ||
|
||
## Testnets | ||
|
||
There is a testnet deployment on Rinkeby. It rebases hourly using real market data. | ||
|
||
- ERC-20 Token: [0x027dbcA046ca156De9622cD1e2D907d375e53aa7](https://rinkeby.etherscan.io/token/0x027dbcA046ca156De9622cD1e2D907d375e53aa7) | ||
- Supply Policy: [0x1D2771AFC894107c4edc072e3bd15Cb7F1BCC007](https://rinkeby.etherscan.io/address/0x1D2771AFC894107c4edc072e3bd15Cb7F1BCC007) | ||
- Orchestrator: [0xF473604Be74A69a6bB4ebED33A91a291f6C5b5DE](https://rinkeby.etherscan.io/address/0xF473604Be74A69a6bB4ebED33A91a291f6C5b5DE) | ||
|
@@ -59,12 +52,15 @@ To report bugs within this package, create an issue in this repository. | |
For security issues, please contact [email protected]. | ||
When submitting code ensure that it is free of lint errors and has 100% test coverage. | ||
|
||
``` bash | ||
```bash | ||
# Lint code | ||
npm run lint | ||
yarn lint | ||
|
||
# Format code | ||
yarn format | ||
|
||
# View code coverage | ||
npm run coverage | ||
# Run solidity coverage report (compatible with node v12) | ||
yarn coverage | ||
``` | ||
|
||
## License | ||
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { HardhatUserConfig } from 'hardhat/config' | ||
|
||
import '@nomiclabs/hardhat-ethers' | ||
import '@nomiclabs/hardhat-waffle' | ||
import '@openzeppelin/hardhat-upgrades' | ||
import 'solidity-coverage' | ||
|
||
require('./scripts/deploy') | ||
|
||
export default { | ||
solidity: { | ||
version: '0.4.24', | ||
}, | ||
mocha: { | ||
timeout: 100000, | ||
}, | ||
} as HardhatUserConfig |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newlines at EOF -- I have this configured in my editor settings