From 33319a78003cc843c459140abc325f00fae11638 Mon Sep 17 00:00:00 2001 From: kev1n-peters <96065607+kev1n-peters@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:12:53 -0600 Subject: [PATCH] Added Portico contracts to watchers (#884) Co-authored-by: Kevin Peters Co-authored-by: walker-16 --- contract-watcher/config/mainnet.go | 30 ++++++++++++++++++++++++++++++ contract-watcher/config/types.go | 6 ++++++ 2 files changed, 36 insertions(+) diff --git a/contract-watcher/config/mainnet.go b/contract-watcher/config/mainnet.go index 0b23c682..06cc35b7 100644 --- a/contract-watcher/config/mainnet.go +++ b/contract-watcher/config/mainnet.go @@ -37,6 +37,12 @@ var ETHEREUM_MAINNET = WatcherBlockchainAddresses{ Name: MetehodCompleteTransferWithRelay, }, }, + strings.ToLower("0xd8E1465908103eD5fd28e381920575fb09beb264"): { + { + ID: MethodIDReceiveMessageAndSwap, + Name: MethodReceiveMessageAndSwap, + }, + }, }, } @@ -77,6 +83,12 @@ var POLYGON_MAINNET = WatcherBlockchainAddresses{ Name: MethodReceiveTbtc, }, }, + strings.ToLower("0xf6C5FD2C8Ecba25420859f61Be0331e68316Ba01"): { + { + ID: MethodIDReceiveMessageAndSwap, + Name: MethodReceiveMessageAndSwap, + }, + }, }, } @@ -318,6 +330,12 @@ var ARBITRUM_MAINNET = WatcherBlockchainAddresses{ Name: MethodReceiveTbtc, }, }, + strings.ToLower("0xf8497FE5B0C5373778BFa0a001d476A21e01f09b"): { + { + ID: MethodIDReceiveMessageAndSwap, + Name: MethodReceiveMessageAndSwap, + }, + }, }, } @@ -334,6 +352,12 @@ var OPTIMISM_MAINNET = WatcherBlockchainAddresses{ Name: MethodReceiveTbtc, }, }, + strings.ToLower("0xcF205Fa51D33280D9B70321Ae6a3686FB2c178b2"): { + { + ID: MethodIDReceiveMessageAndSwap, + Name: MethodReceiveMessageAndSwap, + }, + }, }, } @@ -366,5 +390,11 @@ var BASE_MAINNET = WatcherBlockchainAddresses{ Name: MetehodCompleteTransferWithRelay, }, }, + strings.ToLower("0x9816d7C448f79CdD4aF18c4Ae1726A14299E8C75"): { + { + ID: MethodIDReceiveMessageAndSwap, + Name: MethodReceiveMessageAndSwap, + }, + }, }, } diff --git a/contract-watcher/config/types.go b/contract-watcher/config/types.go index 67a30e05..9c0147d2 100644 --- a/contract-watcher/config/types.go +++ b/contract-watcher/config/types.go @@ -18,6 +18,9 @@ const ( //Method name for wormhole tBTC gateway MethodReceiveTbtc = "receiveTbtc" + //Method name for Portico contract + MethodReceiveMessageAndSwap = "receiveMessageAndSwap" + //Method ids for wormhole token bridge contract MethodIDCompleteTransfer = "0xc6878519" MethodIDWrapAndTransfer = "0x9981509f" @@ -31,6 +34,9 @@ const ( //Method id for wormhole tBTC gateway MethodIDReceiveTbtc = "0x5d21a596" + + //Method id for Portico contract + MethodIDReceiveMessageAndSwap = "0x3d528f35" ) type WatcherBlockchain struct {