Skip to content

Commit

Permalink
Merge pull request #108 from gnosisguild/v-testnets
Browse files Browse the repository at this point in the history
create wrapping worker for tenderly's new vnet api
  • Loading branch information
jfschwarz authored May 15, 2024
2 parents 597ec0a + 9d42d02 commit 0e98a15
Show file tree
Hide file tree
Showing 14 changed files with 3,644 additions and 0 deletions.
File renamed without changes.
34 changes: 34 additions & 0 deletions .github/workflows/vnet-api-release.yaml
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
1 change: 1 addition & 0 deletions vnet-api/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CLOUDFLARE_API_TOKEN=
2 changes: 2 additions & 0 deletions vnet-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
7 changes: 7 additions & 0 deletions vnet-api/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 80
}
3 changes: 3 additions & 0 deletions vnet-api/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
12 changes: 12 additions & 0 deletions vnet-api/README.md
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.
Loading

0 comments on commit 0e98a15

Please sign in to comment.