From b46f66863cebf9cc61b5b6cc3f5855414142afaf Mon Sep 17 00:00:00 2001 From: Neil Duffy Date: Wed, 20 Mar 2024 01:43:40 +0000 Subject: [PATCH] feat: base deployment (#91) Co-authored-by: MantisClone --- README.md | 16 +++++- subgraph.base.yaml | 134 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 subgraph.base.yaml diff --git a/README.md b/README.md index bea9db0..5a88cac 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ Mainnets: - [Arbitrum One - Hosted Service](https://thegraph.com/hosted-service/subgraph/requestnetwork/request-payments-arbitrum-one) - [Arbitrum One - Decentralized Network](https://thegraph.com/explorer/subgraphs/3MtDdHbzvBVNBpzUTYXGuDDLgTd1b8bPYwoH1Hdssgp9?view=Overview&chain=arbitrum-one) - [Mantle - Hosted Service](https://graph.fusionx.finance/subgraphs/name/request-payments-mantle) +- [zkSync Era - Subgraph Studio](https://api.studio.thegraph.com/query/35843/request-payment-zksyncera/version/latest) +- [Base - Subgraph Studio](https://api.studio.thegraph.com/query/35843/request-payments-base/version/latest) Testnets: - [Goerli](https://thegraph.com/explorer/subgraph/requestnetwork/request-payments-goerli) @@ -137,17 +139,25 @@ For decentralized network, use: yarn graph deploy --studio request-payments- ./subgraph..yaml --version-label v1. ``` -#### Manual Deployment of zkSync Era +#### Manual Deployment to Subgraph Studio -The network zkSync Era is only supported by The Graph's Subgraph Studio so the deployment is different. +The following networks are only supported by The Graph's Subgraph Studio so the deployment is different. -Step 1: Authenticate the graph-cli with subgraph studio. Get the studio token (here)[https://thegraph.com/studio/subgraph/request-payment-zksyncera/] +- [zkSync Era](https://thegraph.com/studio/subgraph/request-payment-zksyncera) +- [Base](https://thegraph.com/studio/subgraph/request-payments-base) + +Step 1: Authenticate the graph-cli using a subgraph-specific deploy key (aka. studio token). Get the deploy keys from the links listed above. ``` graph auth --studio ``` Step 2: Deploy to subgraph studio ``` +graph deploy --studio request-payment- subgraph..yaml +``` +Examples: +``` graph deploy --studio request-payment-zksyncera subgraph.zksyncera.yaml +graph deploy --studio request-payments-base subgraph.base.yaml ``` ### Check the deployed version diff --git a/subgraph.base.yaml b/subgraph.base.yaml new file mode 100644 index 0000000..05c264d --- /dev/null +++ b/subgraph.base.yaml @@ -0,0 +1,134 @@ +specVersion: 0.0.5 +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum/contract + name: ERC20Proxy + network: base + source: + address: "0xc31323ea7513799e1e112Dc15a05d5b600Cc357e" + abi: ERC20Proxy + startBlock: 10827271 + 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: base + source: + address: "0x1892196E80C4c17ea5100Da765Ab48c1fE2Fb814" + abi: ERC20FeeProxy_0_2_0 + startBlock: 10827274 + 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: ERC20ConversionProxy + network: base + source: + address: "0x8296D56321cf207925a7804E5A8E3F579838e6Ad" + abi: ERC20ConversionProxy + startBlock: 10827277 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Payment + abis: + - name: ERC20ConversionProxy + file: ./abis/ERC20ConversionProxy.json + eventHandlers: + - event: TransferWithConversionAndReference(uint256,address,indexed bytes,uint256,uint256) + handler: handleTransferWithConversionAndReference + - event: TransferWithReferenceAndFee(address,address,uint256,indexed bytes,uint256,address) + handler: handleTransferWithReferenceAndFee + receipt: true + file: ./src/erc20ConversionProxy.ts + - kind: ethereum/contract + name: EthProxy_0_3_0 + network: base + source: + address: "0x090D3583e3f5953e2CC758b146f4Ae11f8224ad7" + abi: EthProxy_0_3_0 + startBlock: 10827261 + 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: base + source: + address: "0xd9C3889eB8DA6ce449bfFE3cd194d08A436e96f2" + abi: EthFeeProxy_0_2_0 + startBlock: 10827264 + 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 + - kind: ethereum/contract + name: EthConversionProxy_0_2_0 + network: base + source: + address: "0xEdfD8386d5DE52072B4Ad8dC69BBD0bB89f9A1fb" + abi: EthConversionProxy_0_2_0 + startBlock: 10827267 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Payment + abis: + - name: EthConversionProxy_0_2_0 + file: ./abis/EthConversionProxy-0.2.0.json + eventHandlers: + - event: TransferWithConversionAndReference(uint256,address,indexed bytes,uint256,uint256) + handler: handleTransferWithConversionAndReference + - event: TransferWithReferenceAndFee(address,uint256,indexed bytes,uint256,address) + handler: handleTransferWithReferenceAndFee + receipt: true + file: ./src/ethConversionProxy.ts