From 85df728495769eeb74d59ebcce8be0f27b64a6f4 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Sep 2024 13:56:10 +0200 Subject: [PATCH] fix(public-allocator): network without public allocator fallbacks on zeroAddress --- src/utils/publicAllocator.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/publicAllocator.ts b/src/utils/publicAllocator.ts index 96ed202..814bc4a 100644 --- a/src/utils/publicAllocator.ts +++ b/src/utils/publicAllocator.ts @@ -2,7 +2,6 @@ import { Address, dataSource, log } from "@graphprotocol/graph-ts"; export function getPublicAllocatorAddress(): Address { const network = dataSource.network(); - log.warning("Network id: {}", [network]); if (network == "mainnet") { return Address.fromString("0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D"); } @@ -10,7 +9,6 @@ export function getPublicAllocatorAddress(): Address { return Address.fromString("0xA090dD1a701408Df1d4d0B85b716c87565f90467"); } - log.warning("No public allocator for network: {}", [network]); - return Address.fromString("0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D"); - // TODO: throw an error instead of returning a default value + log.warning("Unsupported Network id: {}", [network]); + return Address.zero(); }