-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from gnosisguild/v-testnets
create wrapping worker for tenderly's new vnet api
- Loading branch information
Showing
14 changed files
with
3,644 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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: Deploy Vnet API | ||
|
||
on: | ||
push: | ||
branches: main | ||
paths: "vnet-api/**" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./vnet-api | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "npm" | ||
cache-dependency-path: "vnet-api/package-lock.json" | ||
- run: npm install | ||
- name: Publish | ||
uses: cloudflare/[email protected] | ||
with: | ||
workingDirectory: vnet-api | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
secrets: | | ||
TENDERLY_ACCESS_KEY | ||
env: | ||
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} | ||
TENDERLY_USER: gnosisguild | ||
TENDERLY_PROJECT: zodiac-pilot |
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 @@ | ||
CLOUDFLARE_API_TOKEN= |
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 @@ | ||
node_modules | ||
.env |
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,7 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": false, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"printWidth": 80 | ||
} |
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,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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,12 @@ | ||
# Fork API | ||
|
||
This is a simple wrapper around Tenderly's Simulation API, so we can keep our Tenderly access token private. | ||
|
||
## Env Vars | ||
This worker requires three vars to connect to the Tenderly Api: | ||
- `TENDERLY_USER` | ||
- set in `wrangler.toml` | ||
- `TENDERLY_PROJECT` | ||
- set in `wrangler.toml` | ||
- `TENDERLY_ACCESS_KEY` | ||
- this is should be kept secret. We add it to the [Cloudflare worker via api in a Github Action](https://github.com/gnosis/zodiac-pilot/blob/3bfd17dd05e97d18315c142afe9f24e5e46885e2/.github/workflows/api-release.yaml#L31), but you could also add this using the Cloudflare Dashboard. |
Oops, something went wrong.