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

Sync Mainnet-staging FDS refactor changes #250

Merged
merged 17 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 0 additions & 20 deletions .github/workflows/deploy-goerli-arbitrum-subgraph-no-ipfs.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/deploy-goerli-subgraph-no-ipfs.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/deploy-production-arbitrum-subgraph-no-ipfs.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/deploy-production-subgraph-no-ipfs.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/template-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,26 @@ jobs:
if: ${{ inputs.ENVIRONMENT == 'staging-arbitrum' }}
run: |
echo "ENV_SUFFIX=graph-network-arbitrum-staging" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set mainnet staging environment variables
if: ${{ inputs.ENVIRONMENT == 'staging-mainnet' }}
run: |
echo "ENV_SUFFIX=graph-network-mainnet-staging" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set mainnet environment variables
if: ${{ inputs.ENVIRONMENT == 'production' }}
run: |
echo "ENV_SUFFIX=graph-network-mainnet" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set arbitrum environment variables
if: ${{ inputs.ENVIRONMENT == 'production-arbitrum' }}
run: |
echo "ENV_SUFFIX=graph-network-arbitrum" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set goerli production environment variables
if: ${{ inputs.ENVIRONMENT == 'production-goerli' }}
run: |
echo "ENV_SUFFIX=graph-network-goerli" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set arbitrum goerli production environment variables
if: ${{ inputs.ENVIRONMENT == 'production-arbitrum-goerli' }}
Expand All @@ -70,30 +65,6 @@ jobs:
echo "ENV_SUFFIX=graph-network-arbitrum-sepolia" >> $GITHUB_ENV
echo "IPFS_SUFFIX=" >> $GITHUB_ENV

- name: Set mainnet environment variables no ipfs
if: ${{ inputs.ENVIRONMENT == 'production-no-ipfs' }}
run: |
echo "ENV_SUFFIX=no-ipfs-network-ethereum" >> $GITHUB_ENV
echo "IPFS_SUFFIX=no-" >> $GITHUB_ENV

- name: Set arbitrum environment variables no ipfs
if: ${{ inputs.ENVIRONMENT == 'production-arbitrum-no-ipfs' }}
run: |
echo "ENV_SUFFIX=no-ipfs-network-arbitrum" >> $GITHUB_ENV
echo "IPFS_SUFFIX=no-" >> $GITHUB_ENV

- name: Set goerli production environment variables no ipfs
if: ${{ inputs.ENVIRONMENT == 'production-goerli-no-ipfs' }}
run: |
echo "ENV_SUFFIX=no-ipfs-network-goerli" >> $GITHUB_ENV
echo "IPFS_SUFFIX=no-" >> $GITHUB_ENV

- name: Set arbitrum goerli production environment variables no ipfs
if: ${{ inputs.ENVIRONMENT == 'production-arbitrum-goerli-no-ipfs' }}
run: |
echo "ENV_SUFFIX=no-ipfs-network-arb-goerli" >> $GITHUB_ENV
echo "IPFS_SUFFIX=no-" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -111,9 +82,6 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

# Run scripts
- name: Prepare IPFS enabled/disabled files
run: ./node_modules/.bin/mustache ./config/${{ env.IPFS_SUFFIX }}ipfs.json ./src/mappings/helpers/metadata.template.ts > ./src/mappings/helpers/metadata.ts

- name: Prepare addresses ${{ inputs.ENVIRONMENT }}
run: ./node_modules/.bin/ts-node config/${{ inputs.CONFIG }} && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests-l1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
run: yarn install

# Run scripts
- name: Prep NO IPFS
run: ./node_modules/.bin/mustache ./config/no-ipfs.json ./src/mappings/helpers/metadata.template.ts > ./src/mappings/helpers/metadata.ts
- name: Prep addressess
run: ./node_modules/.bin/ts-node config/testAddressesL1.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts
- name: Prep test L1
Expand Down
23 changes: 9 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@
"scripts": {
"prepublishOnly": "yarn & yarn build:ipfs",
"build": "graph build",
"build:ipfs:mainnet": "yarn && yarn prep:ipfs && yarn prepare:mainnet && graph build --ipfs https://ipfs.network.thegraph.com",
"build:ipfs:mainnet-no-ipfs": "yarn && yarn prep:no-ipfs && yarn prepare:mainnet && graph build --ipfs https://ipfs.network.thegraph.com",
"deploy-mainnet-staging": "yarn && yarn prep:ipfs && yarn prepare:mainnet && graph deploy graphprotocol/graph-network-mainnet-staging --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-mainnet": "yarn && yarn prep:ipfs && yarn prepare:mainnet && graph deploy graphprotocol/graph-network-mainnet --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-mainnet-no-ipfs": "yarn && yarn prep:no-ipfs && yarn prepare:mainnet && graph deploy graphprotocol/no-ipfs-network-ethereum --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum": "yarn && yarn prep:ipfs && yarn prepare:arbitrum && graph deploy graphprotocol/graph-network-arbitrum --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum-no-ipfs": "yarn && yarn prep:no-ipfs && yarn prepare:arbitrum && graph deploy graphprotocol/no-ipfs-network-arbitrum --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-goerli": "yarn && yarn prep:ipfs && yarn prepare:goerli && graph deploy graphprotocol/graph-network-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-goerli-no-ipfs": "yarn && yarn prep:no-ipfs && yarn prepare:goerli && graph deploy graphprotocol/no-ipfs-network-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum-goerli": "yarn && yarn prep:ipfs && yarn prepare:arbitrum-goerli && graph deploy graphprotocol/graph-network-arbitrum-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum-goerli-no-ipfs": "yarn && yarn prep:no-ipfs && yarn prepare:arbitrum-goerli && graph deploy graphprotocol/no-ipfs-network-arb-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-testing": "yarn && yarn prep:<ipfs/no-ipfs> && yarn prepare:<mainnet/arbitrum/goerli/arbitrum-goerli/sepolia/arbitrum-sepolia> && graph deploy <subgraph name> --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"build:ipfs:mainnet": "yarn && yarn prepare:mainnet && graph build --ipfs https://ipfs.network.thegraph.com",
"deploy-mainnet-staging": "yarn && yarn prepare:mainnet && graph deploy graphprotocol/graph-network-mainnet-staging --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-mainnet": "yarn && yarn prepare:mainnet && graph deploy graphprotocol/graph-network-mainnet --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum": "yarn && yarn prepare:arbitrum && graph deploy graphprotocol/graph-network-arbitrum --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-goerli": "yarn && yarn prepare:goerli && graph deploy graphprotocol/graph-network-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-arbitrum-goerli": "yarn && yarn prepare:arbitrum-goerli && graph deploy graphprotocol/graph-network-arbitrum-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy-testing": "yarn && yarn prepare:<mainnet/arbitrum/goerli/arbitrum-goerli> && graph deploy <subgraph name> --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"prep:addresses:goerli": "ts-node config/goerliAddressScript.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts",
"prepare:goerli": "yarn prep:addresses:goerli && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/",
"prep:addresses:sepolia": "ts-node config/sepoliaAddressScript.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts",
Expand All @@ -47,8 +42,8 @@
"test-l2": "yarn prepare:test-l2 && yarn test",
"prep:addresses:test:l1": "ts-node config/testAddressesL1.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts",
"prep:addresses:test:l2": "ts-node config/testAddressesL2.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts",
"prepare:test-l1": "yarn prep:no-ipfs && yarn prep:addresses:test:l1 && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/",
"prepare:test-l2": "yarn prep:no-ipfs && yarn prep:addresses:test:l2 && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/"
"prepare:test-l1": "yarn && yarn prep:addresses:test:l1 && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/",
"prepare:test-l2": "yarn && yarn prep:addresses:test:l2 && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/"
},
"devDependencies": {
"@graphprotocol/contracts": "5.3.3",
Expand Down
Loading
Loading