-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
396 additions
and
8 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 |
---|---|---|
|
@@ -8,5 +8,6 @@ node_modules | |
|
||
subgraph.yaml | ||
src/config.ts | ||
src/random.ts | ||
|
||
tests/.latest.json |
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,69 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# config | ||
valid_chains=($(ls config | sed 's/\.json//g')) | ||
valid_providers=("goldsky" "0xgraph") | ||
|
||
function exit_help { | ||
echo "Usage: $0 <version> <provider> <deploy_key>" | ||
echo " Example: $0 0.1.4 goldsky ABCDEA123" | ||
echo " chains: " ${valid_chains[@]} | ||
echo " providers: " ${valid_providers[@]} | ||
exit 1 | ||
} | ||
|
||
|
||
function delete_goldsky { | ||
SUBGRAPH=$1 | ||
VERSION=$2 | ||
DEPLOY_KEY=$3 | ||
echo "deleting $SUBGRAPH to goldsky" | ||
goldsky subgraph delete $SUBGRAPH/$VERSION --token $DEPLOY_KEY | ||
} | ||
|
||
function delete_subgraph { | ||
VERSION=$1 | ||
CHAIN=$2 | ||
PROVIDER=$3 | ||
DEPLOY_KEY=$4 | ||
case $PROVIDER in | ||
"goldsky") | ||
delete_goldsky beefy-balances-$CHAIN $VERSION $DEPLOY_KEY | ||
;; | ||
esac | ||
} | ||
|
||
|
||
version=$1 | ||
if [ -z "$version" ]; then | ||
echo "version is required" | ||
exit_help | ||
fi | ||
# allow only x.y.z and x.y.z-n versions | ||
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then | ||
echo "invalid version ""$version""" | ||
exit_help | ||
fi | ||
|
||
|
||
provider=$2 | ||
if [ -z "$provider" ]; then | ||
echo "provider is required" | ||
exit_help | ||
fi | ||
if [[ ! " ${valid_providers[@]} " =~ " ${provider} " ]]; then | ||
echo "invalid provider $provider" | ||
exit_help | ||
fi | ||
|
||
deploy_key=$3 | ||
if [ -z "$deploy_key" ]; then | ||
echo "deploy key is required" | ||
exit_help | ||
fi | ||
|
||
for chain in ${valid_chains[@]}; do | ||
delete_subgraph $version $chain $provider $deploy_key | ||
done |
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,72 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# config | ||
valid_chains=($(ls config | sed 's/\.json//g')) | ||
valid_providers=("goldsky" "0xgraph") | ||
|
||
function exit_help { | ||
echo "Usage: $0 <version> <chain> <provider> <deploy_key>" | ||
echo " Example: $0 0.1.4 goldsky ABCDEA123" | ||
echo " chains: " ${valid_chains[@]} | ||
echo " providers: " ${valid_providers[@]} | ||
exit 1 | ||
} | ||
|
||
|
||
function delete_goldsky { | ||
SUBGRAPH=$1 | ||
VERSION=$2 | ||
DEPLOY_KEY=$3 | ||
echo "deleting $SUBGRAPH to goldsky" | ||
goldsky subgraph delete $SUBGRAPH/$VERSION --token $DEPLOY_KEY | ||
} | ||
|
||
function delete_subgraph { | ||
VERSION=$1 | ||
CHAIN=$2 | ||
PROVIDER=$3 | ||
DEPLOY_KEY=$4 | ||
case $PROVIDER in | ||
"goldsky") | ||
delete_goldsky beefy-balances-$CHAIN $VERSION $DEPLOY_KEY | ||
;; | ||
esac | ||
} | ||
|
||
|
||
version=$1 | ||
if [ -z "$version" ]; then | ||
echo "version is required" | ||
exit_help | ||
fi | ||
# allow only x.y.z and x.y.z-n versions | ||
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then | ||
echo "invalid version ""$version""" | ||
exit_help | ||
fi | ||
|
||
chain=$2 | ||
if [ -z "$chain" ]; then | ||
echo "chain is required" | ||
exit_help | ||
fi | ||
|
||
provider=$3 | ||
if [ -z "$provider" ]; then | ||
echo "provider is required" | ||
exit_help | ||
fi | ||
if [[ ! " ${valid_providers[@]} " =~ " ${provider} " ]]; then | ||
echo "invalid provider $provider" | ||
exit_help | ||
fi | ||
|
||
deploy_key=$4 | ||
if [ -z "$deploy_key" ]; then | ||
echo "deploy key is required" | ||
exit_help | ||
fi | ||
|
||
delete_subgraph $version $chain $provider $deploy_key |
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
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,77 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# config | ||
valid_chains=($(ls config | sed 's/\.json//g')) | ||
valid_providers=("goldsky") | ||
|
||
function exit_help { | ||
echo "Usage: $0 <version> <tag> <provider> <deploy_key>" | ||
echo " Example: $0 0.1.4 latest goldsky ABCDEA123" | ||
echo " chains: " ${valid_chains[@]} | ||
echo " providers: " ${valid_providers[@]} | ||
exit 1 | ||
} | ||
|
||
|
||
function tag_one_goldsky { | ||
SUBGRAPH=$1 | ||
VERSION=$2 | ||
TAG=$3 | ||
DEPLOY_KEY=$4 | ||
echo "Tagging $SUBGRAPH/$VERSION to $TAG" | ||
goldsky subgraph tag create $SUBGRAPH/$VERSION --token $DEPLOY_KEY --tag $TAG | ||
} | ||
|
||
function tag_one { | ||
VERSION=$1 | ||
CHAIN=$2 | ||
TAG=$3 | ||
PROVIDER=$4 | ||
DEPLOY_KEY=$5 | ||
case $PROVIDER in | ||
"goldsky") | ||
tag_one_goldsky beefy-balances-$CHAIN $VERSION $TAG $DEPLOY_KEY | ||
;; | ||
esac | ||
} | ||
|
||
|
||
version=$1 | ||
if [ -z "$version" ]; then | ||
echo "version is required" | ||
exit_help | ||
fi | ||
# allow only x.y.z and x.y.z-n versions | ||
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then | ||
echo "invalid version ""$version""" | ||
exit_help | ||
fi | ||
|
||
|
||
tag=$2 | ||
if [ -z "$tag" ]; then | ||
echo "tag is required" | ||
exit_help | ||
fi | ||
|
||
provider=$3 | ||
if [ -z "$provider" ]; then | ||
echo "provider is required" | ||
exit_help | ||
fi | ||
if [[ ! " ${valid_providers[@]} " =~ " ${provider} " ]]; then | ||
echo "invalid provider $provider" | ||
exit_help | ||
fi | ||
|
||
deploy_key=$4 | ||
if [ -z "$deploy_key" ]; then | ||
echo "deploy key is required" | ||
exit_help | ||
fi | ||
|
||
for chain in ${valid_chains[@]}; do | ||
tag_one $version $chain $tag $provider $deploy_key | ||
done |
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,81 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# config | ||
valid_chains=($(ls config | sed 's/\.json//g')) | ||
valid_providers=("goldsky") | ||
|
||
function exit_help { | ||
echo "Usage: $0 <version> <tag> <chain> <provider> <deploy_key>" | ||
echo " Example: $0 0.1.4 latest manta goldsky ABCDEA123" | ||
echo " chains: " ${valid_chains[@]} | ||
echo " providers: " ${valid_providers[@]} | ||
exit 1 | ||
} | ||
|
||
|
||
function tag_one_goldsky { | ||
SUBGRAPH=$1 | ||
VERSION=$2 | ||
TAG=$3 | ||
DEPLOY_KEY=$4 | ||
echo "Tagging $SUBGRAPH/$VERSION to $TAG" | ||
goldsky subgraph tag create $SUBGRAPH/$VERSION --token $DEPLOY_KEY --tag $TAG | ||
} | ||
|
||
function tag_one { | ||
VERSION=$1 | ||
CHAIN=$2 | ||
TAG=$3 | ||
PROVIDER=$4 | ||
DEPLOY_KEY=$5 | ||
case $PROVIDER in | ||
"goldsky") | ||
tag_one_goldsky beefy-balances-$CHAIN $VERSION $TAG $DEPLOY_KEY | ||
;; | ||
esac | ||
} | ||
|
||
|
||
version=$1 | ||
if [ -z "$version" ]; then | ||
echo "version is required" | ||
exit_help | ||
fi | ||
# allow only x.y.z and x.y.z-n versions | ||
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then | ||
echo "invalid version ""$version""" | ||
exit_help | ||
fi | ||
|
||
|
||
tag=$2 | ||
if [ -z "$tag" ]; then | ||
echo "tag is required" | ||
exit_help | ||
fi | ||
|
||
chain=$3 | ||
if [ -z "$chain" ]; then | ||
echo "chain is required" | ||
exit_help | ||
fi | ||
|
||
provider=$4 | ||
if [ -z "$provider" ]; then | ||
echo "provider is required" | ||
exit_help | ||
fi | ||
if [[ ! " ${valid_providers[@]} " =~ " ${provider} " ]]; then | ||
echo "invalid provider $provider" | ||
exit_help | ||
fi | ||
|
||
deploy_key=$5 | ||
if [ -z "$deploy_key" ]; then | ||
echo "deploy key is required" | ||
exit_help | ||
fi | ||
|
||
tag_one $version $chain $tag $provider $deploy_key |
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,18 @@ | ||
{ | ||
"network": "arbitrum-one", | ||
"shareTokenMintAddress": "0x0000000000000000000000000000000000000000", | ||
"burnAddress": "0x000000000000000000000000000000000000dead", | ||
|
||
"clmManagerFactoryAddress": "0xD41Ce2c0a0596635FC09BDe2C35946a984b8cB7A", | ||
"clmManagerFactoryStartBlock": 219696027, | ||
"clmStrategyFactoryAddress": "0xa5E8574a0BE6A7379611D2Fa0eA228c3a1778162", | ||
"clmStrategyFactoryStartBlock": 219696126, | ||
"rewardPoolFactoryAddress": "0x512b1A12200338F46a844E224d37B303a21D0224", | ||
"rewardPoolFactoryStartBlock": 219696076, | ||
"beefyClassicVaultFactoryAddress": "0x8396f3d25d07531a80770Ce3DEA025932C4953f7", | ||
"beefyClassicVaultFactoryStartBlock": 39125375, | ||
"beefyClassicBoostFactoryAddress": "0x2951c806a75b19954ce0bed477676a54f3c1c200", | ||
"beefyClassicBoostFactoryStartBlock": 131261823, | ||
|
||
"vaultInitializedEvent": "Initialized(uint8)" | ||
} |
Oops, something went wrong.