Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Claimable Vesting Schedule feature #17

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ad74e9b
added optimism sepolia
mmd-afegbua Apr 29, 2024
36f0e48
updated tests
mmd-afegbua Apr 29, 2024
f8cc085
add wrap scheduler too
kasparkallas Apr 30, 2024
7be256b
Merge pull request #7 from superfluid-finance/optimism-sepolia
kasparkallas Apr 30, 2024
a1abc8f
modernize and clean-up deps && ci
kasparkallas Apr 30, 2024
4175442
Merge pull request #8 from superfluid-finance/modernize-clean-up-deps…
kasparkallas Apr 30, 2024
13cc641
explicitly login to goldsky
kasparkallas Apr 30, 2024
56e7049
Merge pull request #9 from superfluid-finance/goldsky-login
kasparkallas Apr 30, 2024
3d413ef
use correct op-sepolia name
kasparkallas Apr 30, 2024
1627a40
Merge pull request #10 from superfluid-finance/use-correct-op-sepolia…
kasparkallas Apr 30, 2024
e54b1d4
add base
kasparkallas Apr 30, 2024
ef6214d
Merge pull request #11 from superfluid-finance/add-base-mainnet
kasparkallas Apr 30, 2024
d7f3960
add base to ci scripts
kasparkallas Apr 30, 2024
a37f80c
fix sepolia auto-wrap deploy config
kasparkallas Apr 30, 2024
a4cad47
map gas used to execution events
kasparkallas May 21, 2024
13343fb
bump versions
kasparkallas May 21, 2024
a066c41
Merge pull request #12 from superfluid-finance/add-gas-used-to-events
kasparkallas May 21, 2024
9778812
bump version in root?
kasparkallas May 21, 2024
b6ac767
use xdai cliname
kasparkallas May 21, 2024
5925142
fix addresses mapping for wrap schedules
kasparkallas May 22, 2024
8b1d928
Merge pull request #13 from superfluid-finance/fix-addresses-mapping-…
kasparkallas May 22, 2024
b69fa2b
tag only when healthy
kasparkallas May 22, 2024
a35e579
Merge pull request #14 from superfluid-finance/deploy-cleanup
kasparkallas May 22, 2024
ff6568c
fix mapping & fix script
kasparkallas May 22, 2024
8711c02
Merge pull request #15 from superfluid-finance/follow-up-fixes
kasparkallas May 22, 2024
92c22dd
use safer function
kasparkallas May 22, 2024
eb987dc
Merge pull request #16 from superfluid-finance/follow-up-fixes-2
kasparkallas May 22, 2024
860783c
updated Vesting Scheduler ABI
0xPilou May 29, 2024
4573774
added `claimValidityDate` field to VestingSchedule entity
0xPilou May 29, 2024
1febbb3
update mapping to index claimValidityDate
0xPilou May 29, 2024
2ca4d38
updated OP sepolia config
0xPilou May 31, 2024
52c6a8b
added claimValidityDate field to VestingScheduleCreatedEvent mapping
0xPilou May 31, 2024
137d7d5
fix: map vesting schedule created compatibly
kasparkallas Jun 6, 2024
d4173fe
merge master
kasparkallas Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/aw-subgraph-ci-goldsky.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Superfluid WrapScheduler Subgraphs
name: Deploy WrapScheduler Subgraphs (Goldsky)

on:
workflow_dispatch:
Expand All @@ -15,6 +15,7 @@ jobs:
run:
working-directory: subgraphs/wrap-scheduler
strategy:
fail-fast: false
matrix:
networks:
[
Expand All @@ -25,14 +26,16 @@ jobs:
"xdai-mainnet",
"optimism-mainnet",
"polygon-mainnet",
"optimism-sepolia",
"base-mainnet"
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v2
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install
Expand All @@ -52,7 +55,20 @@ jobs:
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
return packageJson.version;
- name: Goldsky Login
run: pnpm exec goldsky login --token ${{secrets.GOLDSKY_API_KEY}}
- name: Goldsky Deploy
run: pnpm exec goldsky subgraph deploy ${{format('auto-wrap-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build --token ${{secrets.GOLDSKY_API_KEY}}
run: pnpm exec goldsky subgraph deploy ${{format('auto-wrap-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build
continue-on-error: true # We still want to tag the latest deployment if it was already deployed.
- name: Check Subgraph Sync Status
id: check-sync
run: |
SYNC=$(pnpm exec goldsky subgraph list ${{format('auto-wrap-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} | grep "Synced:" | awk '{print $2}' | cut -d'%' -f1)
if (( $(echo "$SYNC > 98" | bc -l) )); then
echo "::set-output name=sync::true"
else
echo "::set-output name=sync::false"
fi
- name: Goldsky Tag
run: pnpm exec goldsky subgraph tag ${{format('auto-wrap-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag latest --token ${{secrets.GOLDSKY_API_KEY}}
if: steps.check-sync.outputs.sync == 'true'
run: pnpm exec goldsky subgraph tag create ${{format('auto-wrap-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag prod
40 changes: 0 additions & 40 deletions .github/workflows/aw-subgraph-ci.yml

This file was deleted.

30 changes: 23 additions & 7 deletions .github/workflows/fs-subgraph-ci-goldsky.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Superfluid FlowScheduler Subgraphs (Goldsky)
name: Deploy FlowScheduler Subgraphs (Goldsky)

on:
workflow_dispatch:
Expand All @@ -15,6 +15,7 @@ jobs:
run:
working-directory: subgraphs/flow-scheduler
strategy:
fail-fast: false
matrix:
networks:
[
Expand All @@ -25,14 +26,16 @@ jobs:
"xdai-mainnet",
"optimism-mainnet",
"polygon-mainnet",
"optimism-sepolia",
"base-mainnet"
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v2
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install
Expand All @@ -52,7 +55,20 @@ jobs:
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
return packageJson.version;
- name: Goldsky Login
run: pnpm exec goldsky login --token ${{secrets.GOLDSKY_API_KEY}}
- name: Goldsky Deploy
run: pnpm exec goldsky subgraph deploy ${{format('scheduling-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build --token ${{secrets.GOLDSKY_API_KEY}}
run: pnpm exec goldsky subgraph deploy ${{format('scheduling-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build
continue-on-error: true # We still want to tag the latest deployment if it was already deployed.
- name: Check Subgraph Sync Status
id: check-sync
run: |
SYNC=$(pnpm exec goldsky subgraph list ${{format('scheduling-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} | grep "Synced:" | awk '{print $2}' | cut -d'%' -f1)
if (( $(echo "$SYNC > 98" | bc -l) )); then
echo "::set-output name=sync::true"
else
echo "::set-output name=sync::false"
fi
- name: Goldsky Tag
run: pnpm exec goldsky subgraph tag ${{format('scheduling-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag latest --token ${{secrets.GOLDSKY_API_KEY}}
if: steps.check-sync.outputs.sync == 'true'
run: pnpm exec goldsky subgraph tag create ${{format('scheduling-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag prod
40 changes: 0 additions & 40 deletions .github/workflows/fs-subgraph-ci.yml

This file was deleted.

28 changes: 22 additions & 6 deletions .github/workflows/vs-subgraph-ci-goldsky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
run:
working-directory: subgraphs/vesting-scheduler
strategy:
fail-fast: false
matrix:
networks:
[
Expand All @@ -25,14 +26,16 @@ jobs:
"xdai-mainnet",
"optimism-mainnet",
"polygon-mainnet",
"optimism-sepolia",
"base-mainnet"
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v2
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install
Expand All @@ -52,7 +55,20 @@ jobs:
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
return packageJson.version;
- name: Goldsky Login
run: pnpm exec goldsky login --token ${{secrets.GOLDSKY_API_KEY}}
- name: Goldsky Deploy
run: pnpm exec goldsky subgraph deploy ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build --token ${{secrets.GOLDSKY_API_KEY}}
run: pnpm exec goldsky subgraph deploy ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build
continue-on-error: true # We still want to tag the latest deployment if it was already deployed.
- name: Check Subgraph Sync Status
id: check-sync
run: |
SYNC=$(pnpm exec goldsky subgraph list ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} | grep "Synced:" | awk '{print $2}' | cut -d'%' -f1)
if (( $(echo "$SYNC > 98" | bc -l) )); then
echo "::set-output name=sync::true"
else
echo "::set-output name=sync::false"
fi
- name: Goldsky Tag
run: pnpm exec goldsky subgraph tag ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag latest --token ${{secrets.GOLDSKY_API_KEY}}
if: steps.check-sync.outputs.sync == 'true'
run: pnpm exec goldsky subgraph tag create ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag prod
40 changes: 0 additions & 40 deletions .github/workflows/vs-subgraph-ci.yml

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ Superfluid Automation Subgraphs index the [peripheral Superfluid automation cont
- Inspect the source code in the [protocol-monorepo](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/automation-contracts)
- Find the deployment addresses programmatically from [@superfluid-finance/metadata](https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata)

## Other
The Graph Supported Networks CLI names: https://thegraph.com/docs/en/developing/supported-networks/

## License
The Superfluid Automation Subgraphs are [MIT licensed](./LICENSE).
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superfluid-finance/automation-subgraphs",
"version": "1.0.0",
"version": "1.0.2",
"description": "",
"keywords": [],
"license": "MIT",
Expand All @@ -11,6 +11,6 @@
"test": "pnpm -r test"
},
"devDependencies": {
"@goldskycom/cli": "^8.5.1"
"@goldskycom/cli": "^8.7.0"
}
}
52 changes: 31 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions subgraphs/flow-scheduler/config/base-mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"network": "base",
"flowSchedulerAddress": "0xC72CEd15204d02183c83fEbb918b183E400811Ee",
"flowSchedulerStartBlock": 13848318
}
Loading