diff --git a/app/app.go b/app/app.go index d69be687..1dea8f41 100644 --- a/app/app.go +++ b/app/app.go @@ -15,6 +15,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + ethereumCrypto "github.com/ethereum/go-ethereum/crypto" "github.com/libp2p/go-libp2p/core/crypto" "github.com/rs/zerolog/log" "github.com/spf13/viper" @@ -114,6 +115,8 @@ func Run() error { } blockstore := store.NewBlockStore(db) keyshareStore := keyshare.NewECDSAKeyshareStore(configuration.RelayerConfig.MpcConfig.KeysharePath) + keyshare, err := keyshareStore.GetKeyshare() + panicOnError(err) mp, err := observability.InitMetricProvider(context.Background(), configuration.RelayerConfig.OpenTelemetryCollectorURL) panicOnError(err) @@ -290,6 +293,7 @@ func Run() error { lifiMh := evmMessage.NewLifiEscrowMessageHandler( *c.GeneralChainConfig.Id, + ethereumCrypto.PubkeyToAddress(*keyshare.Key.ECDSAPub.ToBtcecPubKey().ToECDSA()), lifiOutputSettlers, coordinator, host, diff --git a/chains/evm/calls/consts/lifi.go b/chains/evm/calls/consts/lifi.go index 45c7fc68..de7abf34 100644 --- a/chains/evm/calls/consts/lifi.go +++ b/chains/evm/calls/consts/lifi.go @@ -11,7 +11,6 @@ var LifiABI, _ = abi.JSON(strings.NewReader(`[{ "type": "function", "stateMutability": "nonpayable", "inputs": [ - {"name": "fillDeadline", "type": "uint32"}, {"name": "orderId", "type": "bytes32"}, { "name": "outputs", @@ -27,7 +26,8 @@ var LifiABI, _ = abi.JSON(strings.NewReader(`[{ {"name": "context", "type": "bytes"} ] }, - {"name": "proposedSolver", "type": "bytes32"} + {"name": "fillDeadline", "type": "uint48"}, + {"name": "fillerData", "type": "bytes"} ], "outputs": [] }]`)) diff --git a/chains/evm/message/lifiEscrow.go b/chains/evm/message/lifiEscrow.go index e4ddb015..d0299d86 100644 --- a/chains/evm/message/lifiEscrow.go +++ b/chains/evm/message/lifiEscrow.go @@ -53,6 +53,7 @@ type LifiEscrowMessageHandler struct { func NewLifiEscrowMessageHandler( chainID uint64, + mpcAddress common.Address, lifiAddresses map[uint64]common.Address, coordinator Coordinator, host host.Host, @@ -70,6 +71,7 @@ func NewLifiEscrowMessageHandler( lifiAddresses: lifiAddresses, coordinator: coordinator, host: host, + mpcAddress: mpcAddress, comm: comm, fetcher: fetcher, confirmationWatcher: confirmationWatcher, @@ -220,10 +222,10 @@ func (h *LifiEscrowMessageHandler) calldata(order *lifi.LifiOrder) ([]byte, erro return consts.LifiABI.Pack( "fillOrderOutputs", - order.Order.FillDeadline, common.HexToHash(order.Meta.OnChainOrderID), outputs, - common.HexToHash(h.mpcAddress.Hex())) + new(big.Int).SetUint64(uint64(order.Order.FillDeadline)), + common.HexToHash(h.mpcAddress.Hex()).Bytes()) } // verifyOrder verifies order based on these instructions https://docs.catalyst.exchange/solver/orderflow/#order-validation diff --git a/chains/evm/message/lifiEscrow_test.go b/chains/evm/message/lifiEscrow_test.go index f5795db5..bdcf2810 100644 --- a/chains/evm/message/lifiEscrow_test.go +++ b/chains/evm/message/lifiEscrow_test.go @@ -101,6 +101,7 @@ func (s *LifiEscrowMessageHandlerTestSuite) SetupTest() { s.handler = message.NewLifiEscrowMessageHandler( 8453, + common.Address{}, lifiAddresses, s.mockCoordinator, s.mockHost,