From 3487411de5fef2fedb995a1c6e28829787fa778e Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Wed, 30 Oct 2024 08:36:02 +0100 Subject: [PATCH 1/3] chore: add mainnet COP relayers addresses --- infra/relayer_addresses.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infra/relayer_addresses.json b/infra/relayer_addresses.json index 1e24eee..6fea59b 100644 --- a/infra/relayer_addresses.json +++ b/infra/relayer_addresses.json @@ -7,6 +7,8 @@ }, "prod": { "php_usd": "0x3bC1f31B8150dc65B9fB9E8B69604C40EaA97C2F", - "celo_php": "0x8Ec42cd1F5F41EAA8701a0a246cD76Fc7543EA8E" + "cop_usd": "0x783F947126Adb7646c2A459B867f5B526D2E6603", + "celo_php": "0x8Ec42cd1F5F41EAA8701a0a246cD76Fc7543EA8E", + "celo_cop": "0x5926F76D43Ce2D778880226b3C4e7156C8Ece99e" } } From 3eb29396313760d537922318180a502e6eed9193 Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:12:15 +0100 Subject: [PATCH 2/3] fix: use base/quote format on aegis-export --- bin/aegis-export.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/aegis-export.ts b/bin/aegis-export.ts index d498ad3..ea78818 100644 --- a/bin/aegis-export.ts +++ b/bin/aegis-export.ts @@ -56,11 +56,17 @@ const createRelayer = ( ): Relayer => { // Type assertion (as string) is safe here because we know that the keys of our RelayerAddresses object are always strings const formattedRateFeed = (rateFeed as string).replace("_", "").toUpperCase(); + + // We use the format {base}/{quote} when deriving the relayer signer address from the rate feed + const rateFeedWithSlash = (rateFeed as string) + .replace("_", "/") + .toUpperCase(); + return { env, rateFeed: formattedRateFeed, rateFeedId: toRateFeedId(`relayed:${formattedRateFeed}`), - signerAddress: deriveRelayerAccount(mnemonic, rateFeed as string).address, + signerAddress: deriveRelayerAccount(mnemonic, rateFeedWithSlash).address, relayerAddress: RelayerAddresses[env][rateFeed] as Address, }; }; From 2146fed949ccd3730288b09ab2669b3aceb38923 Mon Sep 17 00:00:00 2001 From: Philip Paetz Date: Wed, 30 Oct 2024 12:16:41 +0100 Subject: [PATCH 3/3] feat: added getRateFeedTradingMode metric to aegis export script output --- bin/aegis-export.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/aegis-export.ts b/bin/aegis-export.ts index ea78818..1fc38b4 100644 --- a/bin/aegis-export.ts +++ b/bin/aegis-export.ts @@ -86,6 +86,18 @@ ${relayers.map(({ rateFeed, rateFeedId }) => ` 'relayed:${rateFeed}': '${rate ${relayers.map(({ rateFeed, signerAddress }) => ` RelayerSigner${rateFeed}: '${signerAddress}'`).join("\n")} metrics: + # Checks rate feed trading modes + - source: BreakerBox.getRateFeedTradingMode(address rateFeed)(uint8) + schedule: 0/10 * * * * * + type: gauge + chains: all + # NOTE: We filtered out derived CELO rate feeds like 'relayed:CELOPHP' here because we typically don't add breakers for them + variants: +${relayers + .map(({ rateFeed }) => ` - [relayed:${rateFeed}]`) + .filter((rateFeed) => !rateFeed.includes("relayed:CELO")) + .join("\n")} + # Checks for rate feed freshness - source: SortedOracles.isOldestReportExpired(address rateFeed)(bool,address) schedule: 0/10 * * * * *