diff --git a/package.json b/package.json index 2231bfc7..2894d944 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,12 @@ "graph:linea-deploy": "graph deploy --node https://graph-deploy.linea.build/ --ipfs https://graph-ipfs.linea.build LedgityLabs/LedgityYield ./subgraph/linea-subgraph.yaml", "graph:linea-remove": "graph remove --node https://graph-deploy.linea.build/ LedgityLabs/LedgityYield", "graph:arbitrum-gen": "cd subgraph && graph codegen ./arbitrum-subgraph.yaml && graph build ./arbitrum-subgraph.yaml", - "graph:arbitrum-deploy": "graph deploy --studio ledgity-yield-arbitrum ./subgraph/arbitrum-subgraph.yaml" + "graph:arbitrum-deploy": "graph deploy --studio ledgity-yield-arbitrum ./subgraph/arbitrum-subgraph.yaml" }, "dependencies": { "@auth/prisma-adapter": "^1.0.11", "@graphprotocol/client-add-source-name": "2.0.0", + "@graphprotocol/graph-cli": "^0.68.0", "@graphql-mesh/transform-prefix": "0.96.5", "@graphql-tools/utils": "9.2.1", "@prisma/client": "^5.7.0", diff --git a/subgraph/OKX_X1_testnet-subgraph.yaml b/subgraph/OKX_X1_testnet-subgraph.yaml new file mode 100644 index 00000000..95b47200 --- /dev/null +++ b/subgraph/OKX_X1_testnet-subgraph.yaml @@ -0,0 +1,57 @@ +specVersion: 0.0.6 +description: A subgraph of Ledgity Yield data +repository: https://github.com/LedgityLabs/LedgityYield +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum/contract + name: LTokenSignaler + network: xgon + source: + address: "0x6A88b87aA4865e8d67D7CD32178bA03F885a088a" + abi: LTokenSignaler + startBlock: 10172276 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./mapping.ts + entities: + - LToken + abis: + - name: LTokenSignaler + file: ../contracts/abis/LTokenSignaler.json + - name: LToken + file: ../contracts/abis/LToken.json + eventHandlers: + - event: LTokenSignalEvent(indexed address) + handler: handleSignaledLToken +templates: + - kind: ethereum/contract + name: LToken + network: xgon + source: + abi: LToken + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./mapping.ts + entities: + - LToken + - TVLChange + - APRChange + - Activity + - RewardsMint + abis: + - name: LToken + file: ../contracts/abis/LToken.json + eventHandlers: + - event: TVLChangeEvent(uint256) + handler: handleTVLChangeEvent + - event: APRChangeEvent(uint16) + handler: handleAPRChangeEvent + - event: ActivityEvent(indexed int256,indexed address,indexed uint8,uint256,uint256,uint8,int256) + handler: handleActivityEvent + - event: MintedRewardsEvent(indexed address,uint256,uint256) + handler: handleMintedRewardsEvent