Skip to content

Commit

Permalink
small cleanup (#249)
Browse files Browse the repository at this point in the history
* cleanup hardhat config

* update forking file

* remove whitespace

* update workflow
  • Loading branch information
sentilesdal committed Mar 29, 2022
1 parent 2c22fff commit 10e4370
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env.sample
@@ -0,0 +1 @@
ALCHEMY_MAINNET_API_KEY=<ALCHEMY_KEY>
2 changes: 1 addition & 1 deletion .github/workflows/cov.yaml
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install dependencies
run: npm ci && npm run load-contracts
- name: Coverage
run: npm run build && npm run coverage
run: export ALCHEMY_MAINNET_API_KEY=${{secrets.ALCHEMY_MAINNET_API_KEY}} && npm run build && npm run coverage
- name: Edit lcov.info
run: cat coverage/lcov.info | sed '/.*\/balancer-core-v2\/.*/,/TN:/d' | sed '/.*\/test\/.*/,/TN:/d' | sed '/.*\/zaps\/.*/,/TN:/d' > coverage/tmp.info && mv coverage/tmp.info coverage/lcov.info
- name: Coveralls
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yaml
Expand Up @@ -18,7 +18,9 @@ jobs:
- name: compile
run: npx hardhat compile
- name: test
run: npm run test
run:
export ALCHEMY_MAINNET_API_KEY=${{secrets.ALCHEMY_MAINNET_API_KEY}}
npm run test
sim:
runs-on: ubuntu-latest
steps:
Expand All @@ -28,7 +30,9 @@ jobs:
- name: compile
run: npx hardhat compile
- name: simulation
run: npm run sim
run:
export ALCHEMY_MAINNET_API_KEY=${{secrets.ALCHEMY_MAINNET_API_KEY}}
npm run sim
typecheck:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,3 +11,4 @@ coverage/
contracts/balancer-core-v2
balancer-core-v2
test/simulation/analysis/
.env
2 changes: 1 addition & 1 deletion hardhat.config.ts
Expand Up @@ -73,7 +73,7 @@ const config: HardhatUserConfig = {
networks: {
hardhat: {
forking: {
url: "https://eth-mainnet.alchemyapi.io/v2/kwjMP-X-Vajdk1ItCfU-56Uaq1wwhamK",
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_MAINNET_API_KEY}`,
blockNumber: 11853372,
},
accounts: {
Expand Down
3 changes: 1 addition & 2 deletions test/helpers/forking.ts
Expand Up @@ -6,8 +6,7 @@ export const setBlock = async (block: number) => {
params: [
{
forking: {
jsonRpcUrl:
"https://eth-mainnet.alchemyapi.io/v2/kwjMP-X-Vajdk1ItCfU-56Uaq1wwhamK",
jsonRpcUrl: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_MAINNET_API_KEY}`,
blockNumber: block,
},
},
Expand Down

0 comments on commit 10e4370

Please sign in to comment.