-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [prevent running create2 tests for external PRs](ae2903c) - For solcjs compiler, use Nodejs Worker for earlier versions [#1130](1882079) - For platform binaries, Async compiler process [#1135](239ce7a) - New chains: - Edgeware EdgeEVM (2021) - Filecoin Testnet (314159) - Fantom Opera Mainnet (250) - Arbitrum Nova (42170) - Taiko L3 (167006) - Beam Testnet (13337) - Updated chain: Stratos Testnet (2047)
- Loading branch information
Showing
28 changed files
with
2,648 additions
and
270 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
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,44 @@ | ||
# Runs the server in a linux-amd64 container with debug port exposed | ||
# Used in debugging solidity linux-amd64 binary executables | ||
version: "3.7" | ||
x-project-repository-mount: &project-repository-mount | ||
type: bind | ||
source: $REPOSITORY_PATH | ||
|
||
x-project-base: &project-base | ||
env_file: | ||
- .env | ||
restart: always | ||
networks: | ||
- source-verify | ||
|
||
networks: | ||
source-verify: | ||
|
||
services: | ||
server: | ||
<<: *project-base | ||
# image: ethereum/source-verify:server-${TAG} | ||
build: | ||
context: ../ | ||
dockerfile: src/Dockerfile.server.debug | ||
container_name: server-${TAG} | ||
platform: linux/amd64 | ||
ports: | ||
- "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}" | ||
- "9229:9229" # Debug port | ||
volumes: | ||
- ../:/home/app | ||
- <<: *project-repository-mount | ||
target: /home/data/repository | ||
- type: bind | ||
source: $SOLC_REPO_HOST | ||
target: $SOLC_REPO | ||
- type: bind | ||
source: $SOLJSON_REPO_HOST | ||
target: $SOLJSON_REPO | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT}/health"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 10 |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { workerData, parentPort } from 'worker_threads'; | ||
import { getSolcJs } from './solidityCompiler'; | ||
|
||
async function runUseCompiler(version: string, inputStringified: string) { | ||
const solJson = await getSolcJs(version); | ||
const result = solJson.compile(inputStringified); | ||
if (parentPort === null) { | ||
throw new Error('Parent port is null; cannot send compilation result'); | ||
} | ||
parentPort.postMessage(result); | ||
} | ||
|
||
runUseCompiler(workerData.version, workerData.inputStringified); |
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
20 changes: 20 additions & 0 deletions
20
packages/lib-sourcify/test/sources/json-input/pre-v0.4.0/input.json
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
BASE_URL="https://api.estuary.tech" # Replace with your API base URL | ||
DAYS_BACK=2 | ||
LIMIT=1000 | ||
# ESTUARY_PINNING_SECRET should be already set in your environment | ||
|
||
# Header for authorization | ||
AUTH_HEADER="Authorization: Bearer $ESTUARY_PINNING_SECRET" | ||
|
||
# Calculate the date in the required format | ||
calculate_date() { | ||
# date -u -d "${DAYS_BACK} days ago" +"%Y-%m-%dT00:00:%SZ" | ||
# MacOS has a different date command | ||
date -v-${DAYS_BACK}d +"%Y-%m-%dT00:00:%SZ" | ||
} | ||
|
||
# Fetch pins before a certain date | ||
fetch_pins_before_date() { | ||
local before_date="$1" | ||
curl -s -H "$AUTH_HEADER" "${BASE_URL}/pinning/pins?before=${before_date}&limit=${LIMIT}" | ||
} | ||
|
||
# Delete a pin by pinid | ||
delete_pin() { | ||
local pinid="$1" | ||
curl -s -H "$AUTH_HEADER" -X DELETE "${BASE_URL}/pinning/pins/${pinid}" | ||
echo "Deleted pin with ID: ${pinid}" | ||
} | ||
|
||
# Main function to cleanup old pins | ||
cleanup_old_pins() { | ||
local before_date | ||
before_date=$(calculate_date) | ||
|
||
local pins | ||
pins=$(fetch_pins_before_date "$before_date") | ||
|
||
# Assuming the response is a JSON array and you only need pinid to delete them. | ||
local pinids | ||
pinids=$(echo "$pins" | jq -r '.results[] | .requestid') | ||
|
||
# Loop through the pins and delete them | ||
while IFS= read -r pinid; do | ||
if [ -n "$pinid" ]; then | ||
delete_pin $pinid | ||
fi | ||
done <<< "$pinids" | ||
} | ||
|
||
# Execute the main function | ||
cleanup_old_pins |
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,9 @@ | ||
# Runs the server in a linux-amd64 container with debug port exposed | ||
# Used in debugging solidity linux-amd64 binary executables | ||
FROM node:16 | ||
WORKDIR /home/app | ||
|
||
# Install puppeteer dependencies. | ||
RUN apt-get update && 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 | ||
|
||
CMD ["node", "--inspect=0.0.0.0:9229", "./dist/server/server.js"] |
Oops, something went wrong.