From b4a5d092ca158244fdb9bc70ace9c63cb79de906 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Tue, 26 Aug 2025 22:56:13 +0300 Subject: [PATCH] feat: exclude non-busy contracts from strict network check --- internal/handler/within_network.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/internal/handler/within_network.go b/internal/handler/within_network.go index c0c3c0e..4dace59 100644 --- a/internal/handler/within_network.go +++ b/internal/handler/within_network.go @@ -2,7 +2,24 @@ package handler import "context" +// Add whatever is the in: +// Sarafu Registry AND (Celo Allowed Gas Token OR Known Busy Token e.g. USDGLO) +var busyContracts = map[string]bool{ + // cUSD + "0x765DE816845861e75A25fCA122bb6898B8B1282a": true, + // USDT + "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e": true, + // cKES + "0x456a3D042C0DbD3db53D5489e98dFb038553B0d0": true, + // USDC + "0xcebA9300f2b948710d2653dD7B07f33A8B32118C": true, +} + func (hc *HandlerContainer) checkWithinNetwork(ctx context.Context, contractAddress string, from string, to string) (bool, error) { + if !busyContracts[contractAddress] { + return true, nil + } + exists, err := hc.cache.ExistsNetwork(ctx, contractAddress, from, to) if err != nil { return false, err