diff --git a/.circleci/config.yml b/.circleci/config.yml
index b957decfc..40011d7e3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -40,11 +40,11 @@ workflows:
services/ipfs/.* run-build-ipfs true
services/s3sync/.* run-build-s3 true
h5ai-nginx run-build-repository true
- src/monitor/.* run-build-monitor true
- src/server/.* run-build-server true
- services/core/.* run-build-core true
- services/verification/.* run-build-verification true
- services/validation/.* run-build-validation true
+ src/.* run-build-server true
+ packages/.* run-build-server true
+ environments/.* run-build-server true
+ scripts/.* run-build-server true
+ package.json run-build-server true
ui/.* run-build-ui true
# Compare against the last build of the branch not the default "main" branch
base-revision: << pipeline.git.base_revision >>
diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml
index ef06672de..34b7b5fd1 100644
--- a/.circleci/continue_config.yml
+++ b/.circleci/continue_config.yml
@@ -13,24 +13,12 @@ parameters:
run-build-repository:
type: boolean
default: false
- run-build-monitor:
- type: boolean
- default: false
run-build-ui:
type: boolean
default: false
run-build-server:
type: boolean
default: false
- run-build-core:
- type: boolean
- default: false
- run-build-verification:
- type: boolean
- default: false
- run-build-validation:
- type: boolean
- default: false
################
### ALIASES ####
@@ -43,26 +31,9 @@ aliases:
run-build:
type: boolean
default: false
- # Workaround: Since we can't set run-build parameter with a logic or: [run-build-server, run-build-core, run-build-verification, run-build-validation] under workflows.jobs, add three more parameters only for the server build, and OR them here. If any of one-two-three (core-verification-validation respectively) change, a server build is triggered. Other builds uneffected since default is false.
- run-build-one:
- type: boolean
- default: false
- run-build-two:
- type: boolean
- default: false
- run-build-three:
- type: boolean
- default: false
steps:
- when:
- condition:
- or:
- [
- << parameters.run-build >>,
- << parameters.run-build-one >>,
- << parameters.run-build-two >>,
- << parameters.run-build-three >>,
- ]
+ condition: << parameters.run-build >>
steps:
- checkout
- run:
@@ -124,29 +95,31 @@ workflows:
- or:
[
<< pipeline.parameters.run-build-ipfs >>,
- << pipeline.parameters.run-build-monitor >>,
<< pipeline.parameters.run-build-repository >>,
<< pipeline.parameters.run-build-s3 >>,
<< pipeline.parameters.run-build-server >>,
- << pipeline.parameters.run-build-core >>,
- << pipeline.parameters.run-build-verification >>,
- << pipeline.parameters.run-build-validation >>,
<< pipeline.parameters.run-build-ui >>,
]
jobs:
+ - tests-node-v16
+ - npm-publish:
+ filters:
+ branches:
+ only:
+ - master
+ requires:
+ - tests-node-v16
- build-push-ipfs:
run-build: << pipeline.parameters.run-build-ipfs >>
+ # Always build monitor if there's a change in the server
- build-push-monitor:
- run-build: << pipeline.parameters.run-build-monitor >>
+ run-build: << pipeline.parameters.run-build-server >>
- build-push-repository:
run-build: << pipeline.parameters.run-build-repository >>
- build-push-s3:
run-build: << pipeline.parameters.run-build-s3 >>
- build-push-server:
run-build: << pipeline.parameters.run-build-server >>
- run-build-one: << pipeline.parameters.run-build-core >>
- run-build-two: << pipeline.parameters.run-build-verification >>
- run-build-three: << pipeline.parameters.run-build-validation >>
- build-push-ui:
run-build: << pipeline.parameters.run-build-ui >>
- deploy:
@@ -157,35 +130,30 @@ workflows:
- build-push-s3
- build-push-server
- build-push-ui
- - monitor-e2e-rinkeby:
- requires:
- - deploy
- monitor-e2e-goerli:
requires:
- deploy
- monitor-e2e-sepolia:
requires:
- deploy
- - verification-e2e-rinkeby:
- requires:
- - deploy
- verification-e2e-goerli:
requires:
- deploy
- verification-e2e-sepolia:
requires:
- deploy
- # Always run
- node-build:
+
+ # Tests workflow for not staging or master
+ tests:
+ when:
+ and:
+ - not:
+ equal: [ master, << pipeline.git.branch >> ]
+ - not:
+ equal: [ staging, << pipeline.git.branch >> ]
jobs:
- - node-v16
- - npm-publish:
- filters:
- branches:
- only:
- - master
- requires:
- - node-v16
+ - tests-node-v16
+
# Has to run always. Can't regex filter on add-chain-{chainId} branch names see: https://stackoverflow.com/questions/55839004/circleci-regex-filtering-match-within-string
test-new-chain:
jobs:
@@ -235,7 +203,7 @@ jobs:
no_output_timeout: 30m
command: |
./scripts/deploy.sh
- node-v16:
+ tests-node-v16:
docker:
- image: cimg/node:16.15
working_directory: ~/source-verify
@@ -250,13 +218,19 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
+ - run:
+ name: install puppeteer dependencies
+ command: sudo apt-get update && sudo apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- run:
name: lint
command: npm run lint
- run:
name: tsc and test
command: npx lerna run build && npx lerna run test --stream
+ - run:
+ name: coverage
+ command: npm run cov:send
test-new-chain:
docker:
- image: cimg/node:16.15
@@ -265,18 +239,13 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
- run:
name: build
command: npx lerna run build
- run:
name: test new chain PR
command: ./scripts/test_new_chain_support.sh
- monitor-e2e-rinkeby:
- <<: *monitor-e2e-base
- environment:
- CHAIN_ID: 4
- CHAIN_NAME: rinkeby
monitor-e2e-goerli:
<<: *monitor-e2e-base
environment:
@@ -287,11 +256,6 @@ jobs:
environment:
CHAIN_ID: '11155111'
CHAIN_NAME: sepolia
- verification-e2e-rinkeby:
- <<: *verification-e2e-base
- environment:
- CHAIN_ID: 4
- CHAIN_NAME: rinkeby
verification-e2e-goerli:
<<: *verification-e2e-base
environment:
@@ -310,7 +274,7 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
- run:
name: build everything
command: npx lerna run build
diff --git a/.circleci/new_branch.yml b/.circleci/new_branch.yml
index 98687cc48..fcb1fc7d9 100644
--- a/.circleci/new_branch.yml
+++ b/.circleci/new_branch.yml
@@ -26,13 +26,20 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
+ - run:
+ name: install puppeteer dependencies
+ command: sudo apt-get update && sudo apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
+
- run:
name: lint
command: npm run lint
- run:
name: tsc and test
command: npx lerna run build && npx lerna run test --stream
+ - run:
+ name: coverage
+ command: npx lerna run cov:send
test-new-chain:
docker:
- image: cimg/node:16.15
@@ -41,10 +48,10 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
- run:
name: build
command: npx lerna run build
- run:
name: test new chain PR
- command: ./scripts/test_new_chain_support.sh
\ No newline at end of file
+ command: ./scripts/test_new_chain_support.sh
diff --git a/.circleci/nightly.yml b/.circleci/nightly.yml
index e57c5726b..e13123085 100644
--- a/.circleci/nightly.yml
+++ b/.circleci/nightly.yml
@@ -38,20 +38,18 @@ aliases:
workflows:
e2e-tests:
jobs:
- - monitor-e2e-rinkeby
- monitor-e2e-goerli
- monitor-e2e-sepolia
- - verification-e2e-rinkeby
- verification-e2e-goerli
- verification-e2e-sepolia
+ s3-backup-check:
+ jobs:
- check-s3-backup
+ etherscan-instances:
+ jobs:
+ - check-etherscan-instances
jobs:
- monitor-e2e-rinkeby:
- <<: *monitor-e2e-base
- environment:
- CHAIN_ID: 4
- CHAIN_NAME: rinkeby
monitor-e2e-goerli:
<<: *monitor-e2e-base
environment:
@@ -62,11 +60,6 @@ jobs:
environment:
CHAIN_ID: '11155111'
CHAIN_NAME: sepolia
- verification-e2e-rinkeby:
- <<: *verification-e2e-base
- environment:
- CHAIN_ID: 4
- CHAIN_NAME: rinkeby
verification-e2e-goerli:
<<: *verification-e2e-base
environment:
@@ -89,3 +82,18 @@ jobs:
command: node --experimental-fetch ./scripts/check-s3-backup.mjs
docker:
- image: cimg/node:16.15
+ check-etherscan-instances:
+ working_directory: ~/source-verify
+ steps:
+ - checkout
+ - run:
+ name: install dependencies
+ command: npm install && npx lerna bootstrap
+ - run:
+ name: build
+ command: npx lerna run build
+ - run:
+ name: test
+ command: npx mocha test/etherscan/etherscanInstances.js --exit
+ docker:
+ - image: cimg/node:16.15
\ No newline at end of file
diff --git a/.circleci/test-chains-regularly.yml b/.circleci/test-chains-regularly.yml
index a886a5faa..f3181a08b 100644
--- a/.circleci/test-chains-regularly.yml
+++ b/.circleci/test-chains-regularly.yml
@@ -18,7 +18,7 @@ jobs:
- checkout
- run:
name: install dependencies
- command: npx lerna bootstrap
+ command: npm install && npx lerna bootstrap
- run:
name: build and test
command: npx lerna run build && npx lerna run test:chains
diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md
new file mode 100644
index 000000000..542bcbfbd
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/release.md
@@ -0,0 +1,25 @@
+# Release
Sourcify is multi-chain and works on all EVM based networks.
+ {sourcifyChains.length > 0 && ( ++ {" "} + Currently we support{" "} + {sourcifyChains.filter((c) => c.supported).length} different + chains{" "} +
+ )}+ This contract was verified with the{" "} + + create2 verification + + , it may not yet be deployed. +
+ )} ); -const Found = ({ response }: FoundProp) => { + +const Create2Info = (response: CheckAllByAddressResult) => { + const isCreate2Verified = + response?.chainIds.findIndex((chain) => chain.chainId === "0") >= 0; + let deployerAddress: string | undefined; + let salt: string | undefined; + let constructorArgs: any[] | undefined; + if (isCreate2Verified) { + deployerAddress = response?.create2Args?.deployerAddress; + salt = response?.create2Args?.salt; + constructorArgs = response?.create2Args?.constructorArgs; + } + return ( +
The contract at address{" "}
- {response?.address} is{" "}
+ {response?.address} is{" "}
- verified
+ {isCreate2Verified && <>create2>} verified
{chains.length > 0 && on the following networks:}
Not verified on the chain you are looking for?
+The contract at address {address}{" "} is not verified on Sourcify. @@ -238,6 +358,9 @@ const NotFound = ({ address }: NotFoundProp) => { +
- {status === "perfect" && "Fully"}
- {status === "partial" && "Partially"} verified at{" "}
+ {status === "perfect" && !overrideLabel && (
+ <>
+ Fully verified at{" "}
+ >
+ )}
+ {status === "partial" && !overrideLabel && (
+ <>
+ Partially verified at{" "}
+ >
+ )}
{chainIds.map((chainId, i) => {
return (
@@ -35,8 +49,10 @@ const RepoLinks = ({ chainIds, status, address }: RepoLinkProps) => {
className="underline"
key={`${address}-${chainId}-repo-link`}
>
- {sourcifyChainMap[parseInt(chainId)].title ||
- sourcifyChainMap[parseInt(chainId)].name}
+ {overrideLabel ||
+ sourcifyChainMap[parseInt(chainId)].title ||
+ sourcifyChainMap[parseInt(chainId)].name}{" "}
+ (#{chainId})
);
@@ -75,6 +91,34 @@ const Message = ({
{" "}
verified at {chain.title || chain.name}:
{checkedContract.address}
+ {checkedContract?.address && (
+
+
Please provide contract address and network
; } // Show existing matches of the address after checkAllByAddress if (foundMatches?.chainIds) { @@ -102,8 +145,12 @@ const Message = ({ .filter((idMatch) => idMatch.status === "partial") .map((idMatch) => idMatch.chainId); return ( -Contract {foundMatches.address} is already verified:
++ Contract {foundMatches.address} is already verified: +
{perfectMatchChainIds.length > 0 && (+ Powered by {sourcifyChainMap[parseInt(chainId)]?.etherscanAPI} APIs +
++ Import from contract's metadata (files should be avaiable on + IPFS) +
++ Import contracts from Solidity's Standard JSON Input +
+