-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: core subgraph deployment (#77)
Co-authored-by: Alexandre ABRIOUX <[email protected]>
- Loading branch information
1 parent
2a835ea
commit 8c12e11
Showing
7 changed files
with
218 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: deploy-base | ||
description: Subgraph base deployment actions | ||
inputs: | ||
chain: | ||
description: The chain to deploy the subgraph for | ||
required: true | ||
token: | ||
description: Authentication token | ||
required: false | ||
default: "" | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn | ||
- uses: ./.github/actions/short-sha | ||
id: short-sha | ||
- run: yarn subgraph deploy ${{ input.chain }} | ||
env: | ||
TOKEN: ${{ input.token }} | ||
VERSION: ${{ steps.short-sha.outputs.hash }} |
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 |
---|---|---|
@@ -1,37 +1,53 @@ | ||
type GraphNodeInfo = { | ||
queryBase: string | ||
deploy: string | ||
index: string | ||
ipfs: string | ||
} | ||
queryBase: string; | ||
deploy: string; | ||
index: string; | ||
ipfs: string; | ||
}; | ||
|
||
type GraphNodeInfoByNetwork = Record<string, GraphNodeInfo> | ||
type GraphNodeInfoByNetwork = Record<string, GraphNodeInfo>; | ||
|
||
export const graphNodeInfoByNetwork: GraphNodeInfoByNetwork = { | ||
/* Graph Node maintained by Mantle Foundation: | ||
https://docs.mantle.xyz/network/for-devs/resources-and-tooling/graph-endpoints */ | ||
"mantle-testnet": { | ||
queryBase: "https://graph.testnet.mantle.xyz", | ||
deploy: "https://graph.testnet.mantle.xyz/deploy", | ||
index: "https://graph.testnet.mantle.xyz/graphql", | ||
ipfs: "https://ipfs.testnet.mantle.xyz", | ||
}, | ||
// Graph Node maintained by FusionX: https://fusionx.finance/ | ||
"mantle": { | ||
queryBase: "https://graph.fusionx.finance", | ||
// FusionX Graph Node implements deploy endpoint as a subdomain | ||
deploy: "https://deploy.graph.fusionx.finance", | ||
index: "https://graph.fusionx.finance/graphql", | ||
ipfs: "https://api.thegraph.com/ipfs", | ||
} | ||
} | ||
/** | ||
* Graph Node maintained by Mantle Foundation: | ||
* https://docs.mantle.xyz/network/for-devs/resources-and-tooling/graph-endpoints | ||
*/ | ||
"mantle-testnet": { | ||
queryBase: "https://graph.testnet.mantle.xyz", | ||
deploy: "https://graph.testnet.mantle.xyz/deploy", | ||
index: "https://graph.testnet.mantle.xyz/graphql", | ||
ipfs: "https://ipfs.testnet.mantle.xyz", | ||
}, | ||
/** | ||
* Graph Node maintained by FusionX | ||
* https://fusionx.finance/ | ||
*/ | ||
mantle: { | ||
queryBase: "https://graph.fusionx.finance", | ||
// FusionX Graph Node implements deploy endpoint as a subdomain | ||
deploy: "https://deploy.graph.fusionx.finance", | ||
index: "https://graph.fusionx.finance/graphql", | ||
ipfs: "https://api.thegraph.com/ipfs", | ||
}, | ||
/** | ||
* Graph Node maintained by CORE DAO: | ||
* https://docs.coredao.org/developer/develop-on-core/core-subgraph | ||
*/ | ||
core: { | ||
queryBase: "https://thegraph.coredao.org", | ||
// FusionX Graph Node implements deploy endpoint as a subdomain | ||
deploy: "https://thegraph.coredao.org/deploy/", | ||
index: "https://thegraph.coredao.org/graphql", | ||
ipfs: "https://thegraph.coredao.org/ipfs/", | ||
}, | ||
}; | ||
|
||
// TheGraph Hosted Service | ||
export const defaultGraphNodeInfo: GraphNodeInfo = { | ||
queryBase: "https://api.thegraph.com", | ||
deploy: "https://api.thegraph.com/deploy", | ||
/* TheGraph Hosted Service has a different endpoint for checking subgraph health. | ||
queryBase: "https://api.thegraph.com", | ||
deploy: "https://api.thegraph.com/deploy", | ||
/* TheGraph Hosted Service has a different endpoint for checking subgraph health. | ||
https://thegraph.com/docs/en/deploying/deploying-a-subgraph-to-hosted/#checking-subgraph-health */ | ||
index: "https://api.thegraph.com/index-node/graphql", | ||
ipfs: "https://api.thegraph.com/ipfs", | ||
} | ||
index: "https://api.thegraph.com/index-node/graphql", | ||
ipfs: "https://api.thegraph.com/ipfs", | ||
}; |
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 |
---|---|---|
|
@@ -14,5 +14,6 @@ | |
"gnosis", | ||
"optimism", | ||
"moonbeam", | ||
"tombchain" | ||
"tombchain", | ||
"core" | ||
] |
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,89 @@ | ||
specVersion: 0.0.5 | ||
schema: | ||
file: ./schema.graphql | ||
dataSources: | ||
- kind: ethereum/contract | ||
name: ERC20Proxy | ||
network: core | ||
source: | ||
address: "0x88Ecc15fDC2985A7926171B938BB2Cd808A5ba40" | ||
abi: ERC20Proxy | ||
startBlock: 8317448 | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.7 | ||
language: wasm/assemblyscript | ||
entities: | ||
- Payment | ||
abis: | ||
- name: ERC20Proxy | ||
file: ./abis/ERC20Proxy.json | ||
eventHandlers: | ||
- event: TransferWithReference(address,address,uint256,indexed bytes) | ||
handler: handleTransferWithReference | ||
receipt: true | ||
file: ./src/erc20Proxy.ts | ||
- kind: ethereum/contract | ||
name: ERC20FeeProxy_0_2_0 | ||
network: core | ||
source: | ||
address: "0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE" | ||
abi: ERC20FeeProxy_0_2_0 | ||
startBlock: 8317450 | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.7 | ||
language: wasm/assemblyscript | ||
entities: | ||
- Payment | ||
abis: | ||
- name: ERC20FeeProxy_0_2_0 | ||
file: ./abis/ERC20FeeProxy-0.2.0.json | ||
eventHandlers: | ||
- event: TransferWithReferenceAndFee(address,address,uint256,indexed bytes,uint256,address) | ||
handler: handleTransferWithReferenceAndFee | ||
receipt: true | ||
file: ./src/erc20FeeProxy.ts | ||
- kind: ethereum/contract | ||
name: EthProxy_0_3_0 | ||
network: core | ||
source: | ||
address: "0x171Ee0881407d4c0C11eA1a2FB7D5b4cdED71e6e" | ||
abi: EthProxy_0_3_0 | ||
startBlock: 8317443 | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.7 | ||
language: wasm/assemblyscript | ||
entities: | ||
- Payment | ||
abis: | ||
- name: EthProxy_0_3_0 | ||
file: ./abis/EthProxy-0.3.0.json | ||
eventHandlers: | ||
- event: TransferWithReference(address,uint256,indexed bytes) | ||
handler: handleTransferWithReference | ||
receipt: true | ||
file: ./src/ethProxy.ts | ||
- kind: ethereum/contract | ||
name: EthFeeProxy_0_2_0 | ||
network: core | ||
source: | ||
address: "0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687" | ||
abi: EthFeeProxy_0_2_0 | ||
startBlock: 8317446 | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.7 | ||
language: wasm/assemblyscript | ||
entities: | ||
- Payment | ||
abis: | ||
- name: EthFeeProxy_0_2_0 | ||
file: ./abis/EthFeeProxy-0.2.0.json | ||
eventHandlers: | ||
- event: TransferWithReferenceAndFee(address,uint256,indexed bytes,uint256,address) | ||
handler: handleTransferWithReferenceAndFee | ||
receipt: true | ||
file: ./src/ethFeeProxy.ts | ||
|
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