From 109f174d2bb9ea8ccc4f01d4979773c62ac609ff Mon Sep 17 00:00:00 2001 From: Alec Ananian <1013230+alecananian@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:37:38 -0800 Subject: [PATCH] magicswap: add dev deployment to base sepolia --- .github/workflows/deploy.yaml | 6 ++++++ packages/config/src/base-sepolia.json | 15 +++++++++++++++ packages/constants/package.json | 3 ++- subgraphs/magicswap/package.json | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 packages/config/src/base-sepolia.json diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0e7748b1..778354a3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -45,6 +45,9 @@ jobs: - name: Generate code for DEV (Sepolia) if: inputs.environment == 'Development (Sepolia)' run: npm run generate:dev-sepolia --if-present + - name: Generate code for DEV (Base Sepolia) + if: inputs.environment == 'Development (Base Sepolia)' + run: npm run generate:dev-base-sepolia --if-present - name: Generate code for PROD if: inputs.environment == 'Production' run: npm run generate:prod --if-present @@ -61,6 +64,9 @@ jobs: - name: Deploy to DEV (Sepolia) if: inputs.environment == 'Development (Sepolia)' run: npx goldsky subgraph deploy ${{ inputs.subgraph }}-dev-sepolia/${{ inputs.version }} --token ${{ secrets.GOLDSKY_DEPLOY_KEY }} + - name: Deploy to DEV (Base Sepolia) + if: inputs.environment == 'Development (Base Sepolia)' + run: npx goldsky subgraph deploy ${{ inputs.subgraph }}-dev-base-sepolia/${{ inputs.version }} --token ${{ secrets.GOLDSKY_DEPLOY_KEY }} - name: Deploy to PROD if: inputs.environment == 'Production' run: npx goldsky subgraph deploy ${{ inputs.subgraph }}/${{ inputs.version }} --token ${{ secrets.GOLDSKY_DEPLOY_KEY }} diff --git a/packages/config/src/base-sepolia.json b/packages/config/src/base-sepolia.json new file mode 100644 index 00000000..c1075bf3 --- /dev/null +++ b/packages/config/src/base-sepolia.json @@ -0,0 +1,15 @@ +{ + "network": "base-sepolia", + "burner_address": "0x0000000000000000000000000000000000000000", + + "magicswapv1_start_block": 19260859, + "magicswapv1_uniswapv2_factory_address": "0x0000000000000000000000000000000000000000", + "magicswapv2_start_block": 19260859, + "magicswapv2_nft_vault_factory_address": "0x0000000000000000000000000000000000000000", + "magicswapv2_nft_vault_factory_v2_address": "0xa0ca75c44138c7fe07ce5d1405193c9d0a31e91a", + "magicswapv2_uniswapv2_factory_address": "0xce649351edee697f28f380345211ea7467af9e02", + "magicswapv2_router_address": "0x4043b1c99838945555341c0d5e101e75f143a660", + "magicswapv2_staking_address": "0x0000000000000000000000000000000000000000", + "magic_usd_price_feed_address": "0x0000000000000000000000000000000000000000", + "weth_address": "0x74158ec2ad19Df364430C6404B7dA6E5284645BA" +} diff --git a/packages/constants/package.json b/packages/constants/package.json index ad706c5a..dbdc1df2 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -9,6 +9,7 @@ "prepare:arbitrum": "mustache ../../node_modules/@treasure/subgraph-config/src/arbitrum.json src/index.template.ts > index.ts", "prepare:arbitrum-sepolia": "mustache ../../node_modules/@treasure/subgraph-config/src/arbitrum-sepolia.json src/index.template.ts > index.ts", "prepare:treasure-topaz": "mustache ../../node_modules/@treasure/subgraph-config/src/treasure-topaz.json src/index.template.ts > index.ts", - "prepare:sepolia": "mustache ../../node_modules/@treasure/subgraph-config/src/sepolia.json src/index.template.ts > index.ts" + "prepare:sepolia": "mustache ../../node_modules/@treasure/subgraph-config/src/sepolia.json src/index.template.ts > index.ts", + "prepare:base-sepolia": "mustache ../../node_modules/@treasure/subgraph-config/src/base-sepolia.json src/index.template.ts > index.ts" } } diff --git a/subgraphs/magicswap/package.json b/subgraphs/magicswap/package.json index 14eec74d..d7e7f475 100644 --- a/subgraphs/magicswap/package.json +++ b/subgraphs/magicswap/package.json @@ -7,6 +7,7 @@ "generate:dev": "npm run prepare:arbitrum-sepolia --prefix=../../packages/constants && mustache ../../node_modules/@treasure/subgraph-config/src/arbitrum-sepolia.json template.yaml > subgraph.yaml && graph codegen", "generate:dev-topaz": "npm run prepare:treasure-topaz --prefix=../../packages/constants && mustache ../../node_modules/@treasure/subgraph-config/src/treasure-topaz.json template.yaml > subgraph.yaml && graph codegen", "generate:dev-sepolia": "npm run prepare:sepolia --prefix=../../packages/constants && mustache ../../node_modules/@treasure/subgraph-config/src/sepolia.json template.yaml > subgraph.yaml && graph codegen", + "generate:dev-base-sepolia": "npm run prepare:base-sepolia --prefix=../../packages/constants && mustache ../../node_modules/@treasure/subgraph-config/src/base-sepolia.json template.yaml > subgraph.yaml && graph codegen", "generate:prod": "npm run prepare:arbitrum --prefix=../../packages/constants && mustache ../../node_modules/@treasure/subgraph-config/src/arbitrum.json template.yaml > subgraph.yaml && graph codegen" } }