From 76bb98d7c26c84e89e3b5ff432719f451ead5ed2 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 15:08:35 +0530 Subject: [PATCH 01/16] changes for backend deployment --- .nvmrc | 1 + Algebra/src/utils/constants.ts | 2 +- Algebra/src/utils/pricing.ts | 8 ++++---- Algebra/subgraph.yaml | 8 ++++---- AlgebraFarming/subgraph.yaml | 8 ++++---- blocklytics/subgraph.yaml | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..138eca47 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +23.9.0 \ No newline at end of file diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index feb5c338..9adf0e4a 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xd7cB0E0692f2D55A17bA81c1fE5501D66774fC4A' +export const FACTORY_ADDRESS = '0xAA8CD6190C27A4f985dF0AE24DdA9A4a265700BD' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/src/utils/pricing.ts b/Algebra/src/utils/pricing.ts index d8edc10c..a3620131 100644 --- a/Algebra/src/utils/pricing.ts +++ b/Algebra/src/utils/pricing.ts @@ -5,14 +5,14 @@ import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' import { exponentToBigDecimal, safeDiv } from '../utils/index' const WMatic_ADDRESS = '0xb3b3cbed8243682845c2ff23ea1fd48e6144e34f' -const USDC_WMatic_03_POOL = '0x5b66a95f9e9340aa17d9926942cb624d82e6dbed' +const USDC_WMatic_03_POOL = '0x66177ab4ab19A48Fc25339A07FC14CF5C62EC33e' // token where amounts should contribute to tracked volume and liquidity // usually tokens that many tokens are paired with s export let WHITELIST_TOKENS: string[] = [ '0xb3b3cbed8243682845c2ff23ea1fd48e6144e34f', // WMATIC - '0xbb0ab77cf6e08f03e4cceabba163860cd1848df7', // USDC - '0x5aefba317baba46eaf98fd6f381d07673bca6467', // USDT + '0x0ea98bf8ff474639f6cbeb4c4bdd1ba74aa9a4a4', // USDC + '0x5aefba317baba46eaf98fd6f381d07673bca6467', // USDT '0x49a390a3dfd2d01389f799965f3af5961f87d228' ] @@ -21,7 +21,7 @@ let MINIMUM_Matic_LOCKED = BigDecimal.fromString('0') let Q192 = Math.pow(2, 192) let STABLE_COINS: string[] = [ - '0xbb0ab77cf6e08f03e4cceabba163860cd1848df7', // USDC + '0x0ea98bf8ff474639f6cbeb4c4bdd1ba74aa9a4a4', // USDC '0xabac6f23fdf1313fc2e9c9244f666157ccd32990' // SUDT ] diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index c75a5852..42f4246d 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,9 +7,9 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xd7cB0E0692f2D55A17bA81c1fE5501D66774fC4A' + address: '0xaa8cd6190c27a4f985df0ae24dda9a4a265700bd' abi: Factory - startBlock: 40201026 + startBlock: 41264229 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -40,9 +40,9 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0xB4F9b6b019E75CBe51af4425b2Fc12797e2Ee2a1' + address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' abi: NonfungiblePositionManager - startBlock: 40201026 + startBlock: 41264229 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/AlgebraFarming/subgraph.yaml b/AlgebraFarming/subgraph.yaml index 8a0c7513..274afd49 100644 --- a/AlgebraFarming/subgraph.yaml +++ b/AlgebraFarming/subgraph.yaml @@ -7,9 +7,9 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0xB4F9b6b019E75CBe51af4425b2Fc12797e2Ee2a1' + address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' abi: NonfungiblePositionManager - startBlock: 40201026 + startBlock: 41264229 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -38,9 +38,9 @@ dataSources: name: EternalFarming network: avalanche-testnet source: - address: '0x658E287E9C820484f5808f687dC4863B552de37D' + address: '0x95781e8d537D661Ae8264ae3069B92E5c80aCF34' abi: EternalFarming - startBlock: 40201026 + startBlock: 41264229 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/blocklytics/subgraph.yaml b/blocklytics/subgraph.yaml index 4a59e488..247683dc 100644 --- a/blocklytics/subgraph.yaml +++ b/blocklytics/subgraph.yaml @@ -10,7 +10,7 @@ dataSources: source: address: "0x0ddff327ddf7fe838e3e63d02001ef23ad1ede8e" abi: ConverterRegistryContract - startBlock: 40201026 + startBlock: 41264229 mapping: kind: ethereum/events apiVersion: 0.0.6 From 87bb27bcca562a88273132637dda336b85d62dfb Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 18:58:40 +0530 Subject: [PATCH 02/16] changes as discussed --- Algebra/subgraph.yaml | 4 ++-- AlgebraFarming/subgraph.yaml | 4 ++-- blocklytics/subgraph.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 42f4246d..ea9fe4b1 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -9,7 +9,7 @@ dataSources: source: address: '0xaa8cd6190c27a4f985df0ae24dda9a4a265700bd' abi: Factory - startBlock: 41264229 + startBlock: 41201109 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -42,7 +42,7 @@ dataSources: source: address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' abi: NonfungiblePositionManager - startBlock: 41264229 + startBlock: 41201109 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/AlgebraFarming/subgraph.yaml b/AlgebraFarming/subgraph.yaml index 274afd49..c45a084b 100644 --- a/AlgebraFarming/subgraph.yaml +++ b/AlgebraFarming/subgraph.yaml @@ -9,7 +9,7 @@ dataSources: source: address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' abi: NonfungiblePositionManager - startBlock: 41264229 + startBlock: 41201109 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -40,7 +40,7 @@ dataSources: source: address: '0x95781e8d537D661Ae8264ae3069B92E5c80aCF34' abi: EternalFarming - startBlock: 41264229 + startBlock: 41201109 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/blocklytics/subgraph.yaml b/blocklytics/subgraph.yaml index 247683dc..594aa5d0 100644 --- a/blocklytics/subgraph.yaml +++ b/blocklytics/subgraph.yaml @@ -10,7 +10,7 @@ dataSources: source: address: "0x0ddff327ddf7fe838e3e63d02001ef23ad1ede8e" abi: ConverterRegistryContract - startBlock: 41264229 + startBlock: 41201109 mapping: kind: ethereum/events apiVersion: 0.0.6 From f1370fc4ca13616802b9a49e06a4df33ec9caa98 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 18:59:33 +0530 Subject: [PATCH 03/16] changes as discussed --- Algebra/src/utils/pricing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Algebra/src/utils/pricing.ts b/Algebra/src/utils/pricing.ts index a3620131..8e88de4c 100644 --- a/Algebra/src/utils/pricing.ts +++ b/Algebra/src/utils/pricing.ts @@ -5,7 +5,7 @@ import { BigDecimal, BigInt } from '@graphprotocol/graph-ts' import { exponentToBigDecimal, safeDiv } from '../utils/index' const WMatic_ADDRESS = '0xb3b3cbed8243682845c2ff23ea1fd48e6144e34f' -const USDC_WMatic_03_POOL = '0x66177ab4ab19A48Fc25339A07FC14CF5C62EC33e' +const USDC_WMatic_03_POOL = '0x66177ab4ab19a48fc25339a07fc14cf5c62ec33e' // token where amounts should contribute to tracked volume and liquidity // usually tokens that many tokens are paired with s From f997d5a2f9111e49d4dac6763f297fdc8071f572 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 19:30:18 +0530 Subject: [PATCH 04/16] token changes --- Algebra/src/mappings/position-manager.ts | 5 +-- Algebra/src/utils/token.ts | 41 +++++++++++++++++++++++- Algebra/subgraph.yaml | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/Algebra/src/mappings/position-manager.ts b/Algebra/src/mappings/position-manager.ts index 7da04d76..01f637f4 100644 --- a/Algebra/src/mappings/position-manager.ts +++ b/Algebra/src/mappings/position-manager.ts @@ -10,6 +10,7 @@ import { Position, PositionSnapshot, Token} from '../types/schema' import { ADDRESS_ZERO, factoryContract, ZERO_BD, ZERO_BI, pools_list} from '../utils/constants' import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts' import { convertTokenToDecimal, loadTransaction } from '../utils' +import {getOrCreateToken} from "../utils/token"; @@ -117,8 +118,8 @@ export function handleIncreaseLiquidity(event: IncreaseLiquidity): void { return } - let token0 = Token.load(position.token0) - let token1 = Token.load(position.token1) + let token0 = getOrCreateToken(Address.fromString(position.token0)) + let token1 = getOrCreateToken(Address.fromString(position.token1)) diff --git a/Algebra/src/utils/token.ts b/Algebra/src/utils/token.ts index 8039dbad..258ed6a4 100644 --- a/Algebra/src/utils/token.ts +++ b/Algebra/src/utils/token.ts @@ -3,9 +3,48 @@ import { ERC20 } from '../types/Factory/ERC20' import { ERC20SymbolBytes } from '../types/Factory/ERC20SymbolBytes' import { ERC20NameBytes } from '../types/Factory/ERC20NameBytes' import { StaticTokenDefinition } from './staticTokenDefinition' -import { BigInt, Address } from '@graphprotocol/graph-ts' +import {BigInt, Address, BigDecimal} from '@graphprotocol/graph-ts' import { isNullEthValue } from '.' +import {Token} from "../types/schema"; +export function getOrCreateToken(address: Address): Token | null { + let token = Token.load(address.toHexString()) + + if (token == null) { + token = new Token(address.toHexString()) + let contract = ERC20.bind(address) + + let symbolResult = contract.try_symbol() + let nameResult = contract.try_name() + let decimalsResult = contract.try_decimals() + + token.symbol = symbolResult.reverted ? '' : symbolResult.value + token.name = nameResult.reverted ? '' : nameResult.value + token.decimals = decimalsResult.reverted + ? BigInt.fromI32(18) + : BigInt.fromI32(decimalsResult.value) + + token.totalSupply = BigInt.zero() + + // 🔽 Initialize ALL required fields safely + token.volume = BigDecimal.zero() + token.volumeUSD = BigDecimal.zero() + token.untrackedVolumeUSD = BigDecimal.zero() + token.feesUSD = BigDecimal.zero() + token.txCount = BigInt.zero() + token.poolCount = BigInt.zero() + token.totalValueLocked = BigDecimal.zero() + token.totalValueLockedUSD = BigDecimal.zero() + token.totalValueLockedUSDUntracked = BigDecimal.zero() + token.derivedMatic = BigDecimal.zero() + token.whitelistPools = [] + + token.save() + } + + + return token +} export function fetchTokenSymbol(tokenAddress: Address): string { let contract = ERC20.bind(tokenAddress) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index ea9fe4b1..6bc89982 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' + address: '0x8a4179fea7cc44a4b142aa6f46c382a4279e0aae' abi: NonfungiblePositionManager startBlock: 41201109 mapping: From a792146019f0917b3ae9a00c909a1b09d93b781d Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 19:52:16 +0530 Subject: [PATCH 05/16] slight refactor for the get token --- Algebra/src/utils/token.ts | 74 +++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/Algebra/src/utils/token.ts b/Algebra/src/utils/token.ts index 258ed6a4..93841427 100644 --- a/Algebra/src/utils/token.ts +++ b/Algebra/src/utils/token.ts @@ -6,43 +6,69 @@ import { StaticTokenDefinition } from './staticTokenDefinition' import {BigInt, Address, BigDecimal} from '@graphprotocol/graph-ts' import { isNullEthValue } from '.' import {Token} from "../types/schema"; +const ZERO_BI = BigInt.fromI32(0) +const ZERO_BD = BigDecimal.fromString("0") -export function getOrCreateToken(address: Address): Token | null { - let token = Token.load(address.toHexString()) +export function getOrCreateToken(tokenAddress: Address): Token | null { + let tokenId = tokenAddress.toHexString() + let token = Token.load(tokenId) if (token == null) { - token = new Token(address.toHexString()) - let contract = ERC20.bind(address) + token = new Token(tokenId) + // Bind the contract to call methods + let contract = ERC20.bind(tokenAddress) + + // Fetch symbol + let symbol = "unknown" let symbolResult = contract.try_symbol() + if (!symbolResult.reverted) { + symbol = symbolResult.value + } + token.symbol = symbol + + // Fetch name + let name = "unknown" let nameResult = contract.try_name() + if (!nameResult.reverted) { + name = nameResult.value + } + token.name = name + + // Fetch total supply + let totalSupply = ZERO_BI + let totalSupplyResult = contract.try_totalSupply() + if (!totalSupplyResult.reverted) { + totalSupply = totalSupplyResult.value + } + token.totalSupply = totalSupply + + // Fetch decimals - bail if null let decimalsResult = contract.try_decimals() + if (decimalsResult.reverted) { + token.decimals = BigInt.fromI32(18); + } + else { + token.decimals = BigInt.fromI32(decimalsResult.value) + } - token.symbol = symbolResult.reverted ? '' : symbolResult.value - token.name = nameResult.reverted ? '' : nameResult.value - token.decimals = decimalsResult.reverted - ? BigInt.fromI32(18) - : BigInt.fromI32(decimalsResult.value) - - token.totalSupply = BigInt.zero() - - // 🔽 Initialize ALL required fields safely - token.volume = BigDecimal.zero() - token.volumeUSD = BigDecimal.zero() - token.untrackedVolumeUSD = BigDecimal.zero() - token.feesUSD = BigDecimal.zero() - token.txCount = BigInt.zero() - token.poolCount = BigInt.zero() - token.totalValueLocked = BigDecimal.zero() - token.totalValueLockedUSD = BigDecimal.zero() - token.totalValueLockedUSDUntracked = BigDecimal.zero() - token.derivedMatic = BigDecimal.zero() + // Initialize zero/default fields + token.derivedMatic = ZERO_BD + token.volume = ZERO_BD + token.volumeUSD = ZERO_BD + token.untrackedVolumeUSD = ZERO_BD + token.feesUSD = ZERO_BD + token.totalValueLocked = ZERO_BD + token.totalValueLockedUSD = ZERO_BD + token.totalValueLockedUSDUntracked = ZERO_BD + token.txCount = ZERO_BI + token.poolCount = ZERO_BI token.whitelistPools = [] + // Save the new token entity token.save() } - return token } From 6e45fdfe272a86c1f33a4499006cccd173cb46ea Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Tue, 3 Jun 2025 19:53:38 +0530 Subject: [PATCH 06/16] changed block number as discussed --- Algebra/subgraph.yaml | 4 ++-- AlgebraFarming/subgraph.yaml | 4 ++-- blocklytics/subgraph.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 6bc89982..48b9eb9d 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -9,7 +9,7 @@ dataSources: source: address: '0xaa8cd6190c27a4f985df0ae24dda9a4a265700bd' abi: Factory - startBlock: 41201109 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -42,7 +42,7 @@ dataSources: source: address: '0x8a4179fea7cc44a4b142aa6f46c382a4279e0aae' abi: NonfungiblePositionManager - startBlock: 41201109 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/AlgebraFarming/subgraph.yaml b/AlgebraFarming/subgraph.yaml index c45a084b..2101b6a1 100644 --- a/AlgebraFarming/subgraph.yaml +++ b/AlgebraFarming/subgraph.yaml @@ -9,7 +9,7 @@ dataSources: source: address: '0x8a4179FEA7CC44a4B142Aa6f46c382a4279e0aAe' abi: NonfungiblePositionManager - startBlock: 41201109 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -40,7 +40,7 @@ dataSources: source: address: '0x95781e8d537D661Ae8264ae3069B92E5c80aCF34' abi: EternalFarming - startBlock: 41201109 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/blocklytics/subgraph.yaml b/blocklytics/subgraph.yaml index 594aa5d0..9ddfad43 100644 --- a/blocklytics/subgraph.yaml +++ b/blocklytics/subgraph.yaml @@ -10,7 +10,7 @@ dataSources: source: address: "0x0ddff327ddf7fe838e3e63d02001ef23ad1ede8e" abi: ConverterRegistryContract - startBlock: 41201109 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 From 73b7590d3acddf94721537923eacfc49575c028b Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Thu, 19 Jun 2025 14:57:11 +0530 Subject: [PATCH 07/16] goldsky deployment --- Algebra/package.json | 1 + Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- node_modules/.yarn-integrity | 10 ++++++++++ yarn.lock | 4 ++++ 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 node_modules/.yarn-integrity create mode 100644 yarn.lock diff --git a/Algebra/package.json b/Algebra/package.json index 4e25222a..0c11dd40 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,6 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/2025.06.19 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 9adf0e4a..10b2ab80 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xAA8CD6190C27A4f985dF0AE24DdA9A4a265700BD' +export const FACTORY_ADDRESS = '0xe80C0ECEf76C44A890225e57f920D4AE280F456b' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 48b9eb9d..ce24a207 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xaa8cd6190c27a4f985df0ae24dda9a4a265700bd' + address: '0xe80C0ECEf76C44A890225e57f920D4AE280F456b' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0x8a4179fea7cc44a4b142aa6f46c382a4279e0aae' + address: '0x9d0C3637318265bE8e645b9cf284Cf59a2927ffd' abi: NonfungiblePositionManager startBlock: 40995881 mapping: diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 00000000..b9eb2065 --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "darwin-arm64-131", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..fb57ccd1 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From ce8ba5d080d9c6ff3d30c45793d9287ee896cc94 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Thu, 19 Jun 2025 19:24:33 +0530 Subject: [PATCH 08/16] graph for testnet deployed --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 0c11dd40..ff71d045 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/2025.06.19 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-testnet/2025.06.19 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 10b2ab80..a8f621df 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xe80C0ECEf76C44A890225e57f920D4AE280F456b' +export const FACTORY_ADDRESS = '0xcB9cbBD8C7549D2B74272F451AA2d5CB0642Ff15' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index ce24a207..4007a07d 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xe80C0ECEf76C44A890225e57f920D4AE280F456b' + address: '0xcB9cbBD8C7549D2B74272F451AA2d5CB0642Ff15' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0x9d0C3637318265bE8e645b9cf284Cf59a2927ffd' + address: '0xB43A70e9cC217bF68930694BDA951012d8a1A532' abi: NonfungiblePositionManager startBlock: 40995881 mapping: From 4f68d3c5c1aebe5a57a9b2ec10e02efd141a1d38 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Fri, 20 Jun 2025 00:06:14 +0530 Subject: [PATCH 09/16] testnet corrected contracts deployment --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index ff71d045..9476a79e 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-testnet/2025.06.19 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-testnet/2025.06.21 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index a8f621df..7ce1b108 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xcB9cbBD8C7549D2B74272F451AA2d5CB0642Ff15' +export const FACTORY_ADDRESS = '0xa06390382BC1aF10f2718b1928DdE596970F86BA' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 4007a07d..070106c0 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xcB9cbBD8C7549D2B74272F451AA2d5CB0642Ff15' + address: '0xa06390382BC1aF10f2718b1928DdE596970F86BA' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0xB43A70e9cC217bF68930694BDA951012d8a1A532' + address: '0x273fe2b1f6D621Da61690e64FD8A2b9684F55e7B' abi: NonfungiblePositionManager startBlock: 40995881 mapping: From 88a80beedc88a4c61f7b646e7be9b1bb32a8e044 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Fri, 20 Jun 2025 01:39:30 +0530 Subject: [PATCH 10/16] devnet deployments --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 9476a79e..08083d40 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-testnet/2025.06.21 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-devnet/2025.06.21 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 7ce1b108..80652855 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xa06390382BC1aF10f2718b1928DdE596970F86BA' +export const FACTORY_ADDRESS = '0x5FfF2E089FFf11c679b1306f0e51cb7c112CDD88' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 070106c0..c2613aab 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xa06390382BC1aF10f2718b1928DdE596970F86BA' + address: '0x5FfF2E089FFf11c679b1306f0e51cb7c112CDD88' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0x273fe2b1f6D621Da61690e64FD8A2b9684F55e7B' + address: '0x8F9BBD6f8657Ad06704791fc4626e985ec52E48A' abi: NonfungiblePositionManager startBlock: 40995881 mapping: From c093df88ed5b7d14fa5e3bbc907e758341d5cfd8 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Mon, 30 Jun 2025 13:29:15 +0530 Subject: [PATCH 11/16] devnet 24thjune --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 08083d40..9bfe37bf 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-devnet/2025.06.21 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-devnet/2025.06.24 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 80652855..26b8928b 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0x5FfF2E089FFf11c679b1306f0e51cb7c112CDD88' +export const FACTORY_ADDRESS = '0xDA9Eaa81d5712A2643F936758eddc8C3322b6789' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index c2613aab..8b47a4fd 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0x5FfF2E089FFf11c679b1306f0e51cb7c112CDD88' + address: '0xDA9Eaa81d5712A2643F936758eddc8C3322b6789' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0x8F9BBD6f8657Ad06704791fc4626e985ec52E48A' + address: '0xdf539385A2cE059d1474350507e6f84dA4224C6D' abi: NonfungiblePositionManager startBlock: 40995881 mapping: From 08ffa8828fb68c87ff2f23b8350f4c7f35e1c63b Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Mon, 30 Jun 2025 15:04:58 +0530 Subject: [PATCH 12/16] updated code for testnet 30.6.2025 --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- node_modules/.yarn-integrity | 6 +++-- update_addresses.sh | 42 ++++++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 update_addresses.sh diff --git a/Algebra/package.json b/Algebra/package.json index 9bfe37bf..6db88535 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core-devnet/2025.06.24 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/testnet-30.6.2025 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 26b8928b..ad4da2b3 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xDA9Eaa81d5712A2643F936758eddc8C3322b6789' +export const FACTORY_ADDRESS = '0xDC41bA754Fd6E524dD7B195B557434760F4952a7' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 8b47a4fd..8e7bb5e8 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xDA9Eaa81d5712A2643F936758eddc8C3322b6789' + address: '0xDC41bA754Fd6E524dD7B195B557434760F4952a7' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0xdf539385A2cE059d1474350507e6f84dA4224C6D' + address: '0xf7e9491B88FF32C1f8C00c18392b13157DF2B4b9' abi: NonfungiblePositionManager startBlock: 40995881 mapping: diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index b9eb2065..63b2ffe0 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -1,6 +1,8 @@ { - "systemParams": "darwin-arm64-131", - "modulesFolders": [], + "systemParams": "darwin-arm64-127", + "modulesFolders": [ + "node_modules" + ], "flags": [], "linkedModules": [], "topLevelPatterns": [], diff --git a/update_addresses.sh b/update_addresses.sh new file mode 100644 index 00000000..83ee2059 --- /dev/null +++ b/update_addresses.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Usage: VERSION_TO_DEPLOY=30.6.2025 ./update_addresses.sh input.json + +if [ "$#" -ne 1 ]; then + echo "Usage: VERSION_TO_DEPLOY= $0 " + exit 1 +fi + +if [ -z "$VERSION_TO_DEPLOY" ]; then + echo "❌ VERSION_TO_DEPLOY env variable is not set" + exit 1 +fi + +JSON_FILE="$1" +CONSTANTS_FILE="Algebra/src/utils/constants.ts" +SUBGRAPH_FILE="Algebra/subgraph.yaml" +PACKAGE_FILE="Algebra/package.json" + +# Extract addresses from JSON +FACTORY=$(jq -r '.factory' "$JSON_FILE") +NONFUNGIBLE_POSITION_MANAGER=$(jq -r '.nonfungiblePositionManager' "$JSON_FILE") + +# === constants.ts === +sed -i '' -E "s|export const FACTORY_ADDRESS = '0x[a-fA-F0-9]{40}'|export const FACTORY_ADDRESS = '$FACTORY'|" "$CONSTANTS_FILE" + +# === subgraph.yaml === +sed -i '' -E "/name: Factory/ { + N;N;N;N; + s/address: '0x[a-fA-F0-9]{40}'/address: '$FACTORY'/ +}" "$SUBGRAPH_FILE" + +sed -i '' -E "/name: NonfungiblePositionManager/ { + N;N;N;N; + s/address: '0x[a-fA-F0-9]{40}'/address: '$NONFUNGIBLE_POSITION_MANAGER'/ +}" "$SUBGRAPH_FILE" + +# === package.json === +# Replace anything after poap-subgraph-core/ and before --path +sed -i '' -E "s|(poap-subgraph-core/)[^ ]+|\1${VERSION_TO_DEPLOY}|" "$PACKAGE_FILE" + +echo "✅ All updates applied successfully." From 2bc311b41b8d8fe58ef241afde74c9185322a10d Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Wed, 2 Jul 2025 18:40:51 +0530 Subject: [PATCH 13/16] mockmainnet 1.0.1 deployment --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 6db88535..d57eeb0e 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/testnet-30.6.2025 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mockmainnet-1.0.1 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index ad4da2b3..7390dc58 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xDC41bA754Fd6E524dD7B195B557434760F4952a7' +export const FACTORY_ADDRESS = '0x44Ee3D2ec3C86F21c0C187c937375D3c20479388' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 8e7bb5e8..45713aa9 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche-testnet source: - address: '0xDC41bA754Fd6E524dD7B195B557434760F4952a7' + address: '0x44Ee3D2ec3C86F21c0C187c937375D3c20479388' abi: Factory startBlock: 40995881 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche-testnet source: - address: '0xf7e9491B88FF32C1f8C00c18392b13157DF2B4b9' + address: '0x2608360F32Accdd9aAdAF6A6d12D9c53E56c99A0' abi: NonfungiblePositionManager startBlock: 40995881 mapping: From 972791afa342f3e1a98747ec4f2340b8e126aadf Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Thu, 3 Jul 2025 22:58:23 +0530 Subject: [PATCH 14/16] updated mockmainent changes --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index d57eeb0e..2ddb4b74 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mockmainnet-1.0.1 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mockmainnet-1.1.2 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 7390dc58..46820a44 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0x44Ee3D2ec3C86F21c0C187c937375D3c20479388' +export const FACTORY_ADDRESS = '0xd1b1aCD161f444A028CeCccB7Ee6e57f7ab48687' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 45713aa9..3701e06f 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -5,11 +5,11 @@ schema: dataSources: - kind: ethereum/contract name: Factory - network: avalanche-testnet + network: avalanche source: - address: '0x44Ee3D2ec3C86F21c0C187c937375D3c20479388' + address: '0xd1b1aCD161f444A028CeCccB7Ee6e57f7ab48687' abi: Factory - startBlock: 40995881 + startBlock: 64892897 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -38,11 +38,11 @@ dataSources: handler: handleNewCommunityFee - kind: ethereum/contract name: NonfungiblePositionManager - network: avalanche-testnet + network: avalanche source: - address: '0x2608360F32Accdd9aAdAF6A6d12D9c53E56c99A0' + address: '0x9a4B32048102fcE37d991a3021BbFCC171b982AE' abi: NonfungiblePositionManager - startBlock: 40995881 + startBlock: 64892897 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -73,7 +73,7 @@ dataSources: templates: - kind: ethereum/contract name: Pool - network: avalanche-testnet + network: avalanche source: abi: Pool mapping: From a2f6008c2cdfdfdb04048b5bd4e56811aeb1bd21 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Fri, 4 Jul 2025 18:37:40 +0530 Subject: [PATCH 15/16] subgraph updated --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 2ddb4b74..1c857eff 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mockmainnet-1.1.2 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mainnet-1.0.0 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 46820a44..57d6aff6 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0xd1b1aCD161f444A028CeCccB7Ee6e57f7ab48687' +export const FACTORY_ADDRESS = '0x512eb749541B7cf294be882D636218c84a5e9E5F' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 3701e06f..05d284e6 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -7,7 +7,7 @@ dataSources: name: Factory network: avalanche source: - address: '0xd1b1aCD161f444A028CeCccB7Ee6e57f7ab48687' + address: '0x512eb749541B7cf294be882D636218c84a5e9E5F' abi: Factory startBlock: 64892897 mapping: @@ -40,7 +40,7 @@ dataSources: name: NonfungiblePositionManager network: avalanche source: - address: '0x9a4B32048102fcE37d991a3021BbFCC171b982AE' + address: '0x3fED017EC0f5517Cdf2E8a9a4156c64d74252146' abi: NonfungiblePositionManager startBlock: 64892897 mapping: From 969712f105b974d1edd2ca1df796d13d93550be3 Mon Sep 17 00:00:00 2001 From: Sriharsha Date: Mon, 28 Jul 2025 11:56:34 +0530 Subject: [PATCH 16/16] devnet 28.7.2025 changes --- Algebra/package.json | 2 +- Algebra/src/utils/constants.ts | 2 +- Algebra/subgraph.yaml | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Algebra/package.json b/Algebra/package.json index 1c857eff..ba271159 100644 --- a/Algebra/package.json +++ b/Algebra/package.json @@ -11,7 +11,7 @@ "deploy-local": "graph deploy cryptoalgebra/algebra --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020", "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token iliaazhel/integral-core subgraph.yaml", "deploy-dev": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token a3f47169869d4585a475d0d1d10a4062 iliaazhel/fuzzyswap subgraph.yaml", - "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/mainnet-1.0.0 --path .", + "deploy-goldsky": "goldsky subgraph deploy poap-subgraph-core/devnet-28.7.2025 --path .", "create": "graph create cryptoalgebra/info --node https://api.thegraph.com/create/" }, "devDependencies": { diff --git a/Algebra/src/utils/constants.ts b/Algebra/src/utils/constants.ts index 57d6aff6..76650f93 100644 --- a/Algebra/src/utils/constants.ts +++ b/Algebra/src/utils/constants.ts @@ -4,7 +4,7 @@ import { Factory as FactoryContract } from '../types/templates/Pool/Factory' export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' -export const FACTORY_ADDRESS = '0x512eb749541B7cf294be882D636218c84a5e9E5F' +export const FACTORY_ADDRESS = '0x8F32501837F1E354CA84Fa74C194da1411A200a7' export const FEE_DENOMINATOR = BigDecimal.fromString('1000000') export let ZERO_BI = BigInt.fromI32(0) diff --git a/Algebra/subgraph.yaml b/Algebra/subgraph.yaml index 05d284e6..c2ea086c 100644 --- a/Algebra/subgraph.yaml +++ b/Algebra/subgraph.yaml @@ -5,11 +5,11 @@ schema: dataSources: - kind: ethereum/contract name: Factory - network: avalanche + network: avalanche-testnet source: - address: '0x512eb749541B7cf294be882D636218c84a5e9E5F' + address: '0x8F32501837F1E354CA84Fa74C194da1411A200a7' abi: Factory - startBlock: 64892897 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -38,11 +38,11 @@ dataSources: handler: handleNewCommunityFee - kind: ethereum/contract name: NonfungiblePositionManager - network: avalanche + network: avalanche-testnet source: - address: '0x3fED017EC0f5517Cdf2E8a9a4156c64d74252146' + address: '0xdca7f48C88D6B466CEec70261bc68E64c5b1fDDF' abi: NonfungiblePositionManager - startBlock: 64892897 + startBlock: 40995881 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -73,7 +73,7 @@ dataSources: templates: - kind: ethereum/contract name: Pool - network: avalanche + network: avalanche-testnet source: abi: Pool mapping: