-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
8,516 additions
and
2,587 deletions.
There are no files selected for viewing
This file contains 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,6 +1,8 @@ | ||
# DO NOT EDIT MANUALLY! instead run `npm run build:ci` | ||
# autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files | ||
version: 2.1 | ||
orbs: | ||
rust: circleci/[email protected] | ||
commands: | ||
{{> commands}} | ||
jobs: | ||
|
This file contains 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,6 +1,8 @@ | ||
# DO NOT EDIT MANUALLY! instead run `npm run build:ci` | ||
# autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files | ||
version: 2.1 | ||
orbs: | ||
rust: circleci/[email protected] | ||
commands: | ||
cmd-wait-for-port: | ||
parameters: | ||
|
@@ -30,18 +32,31 @@ jobs: | |
name: Lint lockfile | ||
command: | | ||
lockfile-lint -p package-lock.json --type npm --allowed-hosts npm --validate-https --empty-hostname false | ||
job-compile: | ||
job-cannon: | ||
working_directory: ~/repo | ||
docker: | ||
- image: synthetixio/docker-node:16.15-ubuntu | ||
auth: | ||
username: $DOCKERHUB_USERNAME | ||
password: $DOCKERHUB_TOKEN | ||
machine: | ||
image: ubuntu-2204:2022.04.1 | ||
docker_layer_caching: true | ||
steps: | ||
- run: | | ||
mkdir -p ~/.foundry/bin | ||
curl https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/foundryup | ||
chmod +x ~/.foundry/foundryup | ||
~/.foundry/foundryup | ||
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: npx hardhat compile --optimizer --fail-oversize | ||
- run: node publish build --test-helpers | ||
- run: npx hardhat cannon:build --file cannonfile.aggregator.toml | ||
- run: npx hardhat cannon:build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- build | ||
- cannon | ||
- publish/deployed | ||
job-fork-tests-ovm: | ||
working_directory: ~/repo | ||
docker: | ||
|
@@ -63,9 +78,9 @@ jobs: | |
command: | | ||
NEW_CONTRACTS=$(node bin.js sips --layer=ovm --unreleased --with-sources) | ||
if [ -z "$NEW_CONTRACTS" ]; then | ||
npx hardhat test:integration:l2 --compile --use-fork | ||
npx hardhat test:integration:l2 --use-fork | ||
else | ||
npx hardhat test:integration:l2 --compile --deploy --use-sips --use-fork | ||
npx hardhat test:integration:l2 --deploy --use-sips --use-fork | ||
fi; | ||
- store_test_results: | ||
path: /tmp/junit/ | ||
|
@@ -92,9 +107,9 @@ jobs: | |
command: | | ||
NEW_CONTRACTS=$(node bin.js sips --layer=base --unreleased --with-sources) | ||
if [ -z "$NEW_CONTRACTS" ]; then | ||
npx hardhat test:integration:l1 --compile --use-fork --provider-port 9545 | ||
npx hardhat test:integration:l1 --use-fork --provider-port 9545 | ||
else | ||
npx hardhat test:integration:l1 --compile --deploy --use-sips --use-fork --provider-port 9545 | ||
npx hardhat test:integration:l1 --deploy --use-sips --use-fork --provider-port 9545 | ||
fi; | ||
- store_test_results: | ||
path: /tmp/junit/ | ||
|
@@ -107,6 +122,12 @@ jobs: | |
docker_layer_caching: true | ||
resource_class: large | ||
steps: | ||
- run: | | ||
mkdir -p ~/.foundry/bin | ||
curl https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/foundryup | ||
chmod +x ~/.foundry/foundryup | ||
~/.foundry/foundryup | ||
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
|
@@ -123,6 +144,14 @@ jobs: | |
key: v6-optimism-build-{{ checksum "package-lock.json" }} | ||
paths: | ||
- ./optimism | ||
- run: | ||
name: Run isolated layer 1 integration tests | ||
command: | | ||
npx hardhat test:integration:l1 --deploy | ||
- run: | ||
name: Run isolated layer 2 integration tests | ||
command: | | ||
npx hardhat test:integration:l2 --deploy | ||
- run: | ||
name: Start docker chains | ||
background: true | ||
|
@@ -133,14 +162,6 @@ jobs: | |
port: 8545 | ||
- cmd-wait-for-port: | ||
port: 9545 | ||
- run: | ||
name: Run isolated layer 1 integration tests | ||
command: | | ||
npx hardhat test:integration:l1 --compile --deploy --provider-port 9545 | ||
- run: | ||
name: Run isolated layer 2 integration tests | ||
command: | | ||
npx hardhat test:integration:l2 --compile --deploy | ||
- run: | ||
name: Run dual layer 1 and layer 2 integration tests | ||
command: | | ||
|
@@ -254,13 +275,17 @@ jobs: | |
destination: slitherReport.txt | ||
job-test-deploy-script: | ||
working_directory: ~/repo | ||
docker: | ||
- image: synthetixio/docker-node:16.15-ubuntu | ||
auth: | ||
username: $DOCKERHUB_USERNAME | ||
password: $DOCKERHUB_TOKEN | ||
machine: | ||
image: ubuntu-2204:2022.04.1 | ||
docker_layer_caching: true | ||
resource_class: large | ||
steps: | ||
- run: | | ||
mkdir -p ~/.foundry/bin | ||
curl https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/foundryup | ||
chmod +x ~/.foundry/foundryup | ||
~/.foundry/foundryup | ||
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
|
@@ -425,7 +450,7 @@ workflows: | |
- job-lint: | ||
requires: | ||
- job-prepare | ||
- job-compile: | ||
- job-cannon: | ||
requires: | ||
- job-prepare | ||
- job-static-analysis: | ||
|
@@ -450,17 +475,17 @@ workflows: | |
- job-prepare | ||
- job-fork-tests: | ||
requires: | ||
- job-prepare | ||
- job-cannon | ||
- job-fork-tests-ovm: | ||
requires: | ||
- job-prepare | ||
- job-cannon | ||
- job-simulate-release: | ||
requires: | ||
- job-prepare | ||
- job-integration-tests: | ||
name: job-integration-tests | ||
requires: | ||
- job-prepare | ||
- job-cannon | ||
- job-pack-browser: | ||
requires: | ||
- job-prepare | ||
|
This file contains 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,22 @@ | ||
# Builds a testing chain which is used for integration tests and downstream projects | ||
{{> job-header-machine.yml}} | ||
steps: | ||
- run: | | ||
mkdir -p ~/.foundry/bin | ||
curl https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/foundryup | ||
chmod +x ~/.foundry/foundryup | ||
~/.foundry/foundryup | ||
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: npx hardhat compile --optimizer --fail-oversize | ||
- run: node publish build --test-helpers | ||
- run: npx hardhat cannon:build --file cannonfile.aggregator.toml | ||
- run: npx hardhat cannon:build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- build | ||
- cannon | ||
- publish/deployed |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,2 @@ | ||
requires: | ||
- job-cannon |
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -50,3 +50,6 @@ optimism | |
slither.sarif | ||
|
||
.npm-cache | ||
|
||
# cannon build files | ||
cannon/ |
This file contains 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,34 @@ | ||
name = "chainlink" | ||
version = "0.7-mock" | ||
description = "Deploys a testing aggregator with a given rate dated into the future" | ||
|
||
[setting.rate] | ||
defaultValue = "1000000000000000000" | ||
|
||
[setting.timestamp] | ||
# by default, its dated into the future | ||
defaultValue = "10000000000000" | ||
|
||
[setting.decimals] | ||
defaultValue = "6" | ||
|
||
[setting.salt] | ||
defaultValue = "default" | ||
|
||
[contract.aggregator] | ||
artifact = "MockAggregatorV2V3" | ||
salt = "<%= settings.salt %>" | ||
|
||
[invoke.set_decimals] | ||
target = ["aggregator"] | ||
func = "setDecimals" | ||
args = ["<%= settings.decimals %>"] | ||
depends = ["contract.aggregator"] | ||
|
||
[invoke.set_answer] | ||
target = ["aggregator"] | ||
|
||
func = "setLatestAnswer" | ||
args = ["<%= settings.rate %>", "<%= settings.timestamp %>"] | ||
|
||
depends = ["contract.aggregator"] |
Oops, something went wrong.