From b9d1bbee40109562f13084bb42c2df80c151129b Mon Sep 17 00:00:00 2001 From: orionstardust Date: Sat, 18 May 2024 09:26:32 -0400 Subject: [PATCH] add amoy-deployments --- .github/workflows/deploy-tags-test.yml | 33 ++++++++ .github/workflows/deploy-tags.yml | 2 +- package.json | 4 +- subgraph.testnet.yaml | 104 +++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-tags-test.yml create mode 100644 subgraph.testnet.yaml diff --git a/.github/workflows/deploy-tags-test.yml b/.github/workflows/deploy-tags-test.yml new file mode 100644 index 0000000..761820b --- /dev/null +++ b/.github/workflows/deploy-tags-test.yml @@ -0,0 +1,33 @@ +name: Deploy to Satsuma Service on testnet + +on: + push: + tags: + - "test-*" + +jobs: + buildAndDeploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install node + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install Yarn + run: npm i -g yarn + - name: Install Libs + run: yarn --frozen-lockfile + - name: Codegen + run: yarn codegen:testnet + - name: Build + run: yarn build:testnet + - name: Deploy to Satsuma on test + run: | + npx graph deploy aavegotchi-alchemica-amoy \ + --deploy-key ${{secrets.SATSUMA_ACCESS_TOKEN}} \ + --node https://subgraphs.alchemy.com/api/subgraphs/deploy \ + --ipfs https://ipfs.satsuma.xyz \ + --version-label ${GITHUB_REF#refs/*/} \ + subgraph.testnet.yaml + shell: bash diff --git a/.github/workflows/deploy-tags.yml b/.github/workflows/deploy-tags.yml index e1076fe..b8d6bbc 100644 --- a/.github/workflows/deploy-tags.yml +++ b/.github/workflows/deploy-tags.yml @@ -3,7 +3,7 @@ name: Deploy to Satsuma Service on: push: tags: - - "*" + - "prod-*" jobs: buildAndDeploy: diff --git a/package.json b/package.json index 1937858..c2374c4 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "main": "index.js", "scripts": { "codegen": "graph codegen", - "build": "graph build" + "build": "graph build", + "codegen:testnet": "graph codegen subgraph.testnet.yaml", + "build:testnet": "graph build subgraph.testnet.yaml" }, "keywords": [], "author": "", diff --git a/subgraph.testnet.yaml b/subgraph.testnet.yaml new file mode 100644 index 0000000..dbcb9f2 --- /dev/null +++ b/subgraph.testnet.yaml @@ -0,0 +1,104 @@ +specVersion: 0.0.4 +schema: + file: schema.graphql +dataSources: + - kind: ethereum/contract + name: kek + network: polygon-amoy + source: + address: "0x9b39452041aCe85C03D3Ae76D0D5ccFf3a86dEc9" + abi: IERC20 + startBlock: 5354182 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - ERC20Contract + abis: + - name: IERC20 + file: ./node_modules/@openzeppelin/contracts/build/contracts/IERC20Metadata.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/erc20.ts + - kind: ethereum/contract + name: alpha + network: polygon-amoy + source: + address: "0x44bca9B7C2C5F9f47D4da5B72deCdcF3a42535d8" + abi: IERC20 + startBlock: 5354181 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - ERC20Contract + abis: + - name: IERC20 + file: ./node_modules/@openzeppelin/contracts/build/contracts/IERC20Metadata.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/erc20.ts + - kind: ethereum/contract + name: fomo + network: polygon-amoy + source: + address: "0x616d6Df54A9754B81aa43971794D86B3C229fA8B" + abi: IERC20 + startBlock: 5354418 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - ERC20Contract + abis: + - name: IERC20 + file: ./node_modules/@openzeppelin/contracts/build/contracts/IERC20Metadata.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/erc20.ts + - kind: ethereum/contract + name: fud + network: polygon-amoy + source: + address: "0xaa1C59f2B45EF192B71De7d0CB5d95b664749d9c" + abi: IERC20 + startBlock: 5354179 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - ERC20Contract + abis: + - name: IERC20 + file: ./node_modules/@openzeppelin/contracts/build/contracts/IERC20Metadata.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/erc20.ts + - kind: ethereum/contract + name: GLTR + network: polygon-amoy + source: + address: "0x7E4CB2bc361898bB17C8D847032676A7Fd23D625" + abi: IERC20 + startBlock: 5975751 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - ERC20Contract + abis: + - name: IERC20 + file: ./node_modules/@openzeppelin/contracts/build/contracts/IERC20Metadata.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/erc20.ts