@@ -32,6 +32,9 @@ import (
3232 "github.com/sprintertech/sprinter-signing/chains/evm/calls/events"
3333 evmListener "github.com/sprintertech/sprinter-signing/chains/evm/listener"
3434 evmMessage "github.com/sprintertech/sprinter-signing/chains/evm/message"
35+ "github.com/sprintertech/sprinter-signing/chains/lighter"
36+ lighterMessage "github.com/sprintertech/sprinter-signing/chains/lighter/message"
37+ "github.com/sprintertech/sprinter-signing/comm"
3538 "github.com/sprintertech/sprinter-signing/comm/elector"
3639 "github.com/sprintertech/sprinter-signing/comm/p2p"
3740 "github.com/sprintertech/sprinter-signing/config"
@@ -42,6 +45,7 @@ import (
4245 "github.com/sprintertech/sprinter-signing/price"
4346 "github.com/sprintertech/sprinter-signing/protocol/across"
4447 "github.com/sprintertech/sprinter-signing/protocol/lifi"
48+ lighterAPI "github.com/sprintertech/sprinter-signing/protocol/lighter"
4549 "github.com/sprintertech/sprinter-signing/protocol/mayan"
4650 "github.com/sprintertech/sprinter-signing/topology"
4751 "github.com/sprintertech/sprinter-signing/tss"
@@ -254,7 +258,7 @@ func Run() error {
254258 sigChn )
255259 go acrossMh .Listen (ctx )
256260
257- mh .RegisterMessageHandler (evmMessage . AcrossMessage , acrossMh )
261+ mh .RegisterMessageHandler (message . MessageType ( comm . AcrossMsg . String ()) , acrossMh )
258262 supportedChains [* c .GeneralChainConfig .Id ] = struct {}{}
259263 confirmationsPerChain [* c .GeneralChainConfig .Id ] = c .ConfirmationsByValue
260264 }
@@ -278,7 +282,7 @@ func Run() error {
278282 sigChn )
279283 go mayanMh .Listen (ctx )
280284
281- mh .RegisterMessageHandler (evmMessage . MayanMessage , mayanMh )
285+ mh .RegisterMessageHandler (message . MessageType ( comm . MayanMsg . String ()) , mayanMh )
282286 supportedChains [* c .GeneralChainConfig .Id ] = struct {}{}
283287 confirmationsPerChain [* c .GeneralChainConfig .Id ] = c .ConfirmationsByValue
284288 }
@@ -291,7 +295,7 @@ func Run() error {
291295 resolver := token .NewTokenResolver (solverConfig , usdPricer )
292296 orderPricer := pricing .NewStandardPricer (resolver )
293297 lifiApi := lifi .NewLifiAPI ()
294- lifiValidator := validation .NewLifiEscrowOrderValidator (solverConfig , orderPricer )
298+ lifiValidator := validation .NewLifiEscrowOrderValidator (solverConfig , orderPricer , resolver )
295299
296300 lifiMh := evmMessage .NewLifiEscrowMessageHandler (
297301 * c .GeneralChainConfig .Id ,
@@ -309,7 +313,7 @@ func Run() error {
309313 sigChn ,
310314 )
311315 go lifiMh .Listen (ctx )
312- mh .RegisterMessageHandler (evmMessage . LifiEscrowMessage , lifiMh )
316+ mh .RegisterMessageHandler (message . MessageType ( comm . LifiEscrowMsg . String ()) , lifiMh )
313317 supportedChains [* c .GeneralChainConfig .Id ] = struct {}{}
314318 confirmationsPerChain [* c .GeneralChainConfig .Id ] = c .ConfirmationsByValue
315319 }
@@ -323,7 +327,7 @@ func Run() error {
323327 keyshareStore ,
324328 )
325329 go lifiUnlockMh .Listen (ctx )
326- mh .RegisterMessageHandler (evmMessage . LifiUnlockMessage , lifiUnlockMh )
330+ mh .RegisterMessageHandler (message . MessageType ( comm . LifiUnlockMsg . String ()) , lifiUnlockMh )
327331
328332 var startBlock * big.Int
329333 var listener * coreListener.EVMListener
@@ -349,6 +353,24 @@ func Run() error {
349353 }
350354 }
351355
356+ lighterConfig , err := lighter .NewLighterConfig (* solverConfig )
357+ panicOnError (err )
358+ lighterAPI := lighterAPI .NewLighterAPI ()
359+ lighterMessageHandler := lighterMessage .NewLighterMessageHandler (
360+ lighterConfig .WithdrawalAddress ,
361+ lighterConfig .UsdcAddress ,
362+ lighterConfig .RepaymentAddress ,
363+ lighterAPI ,
364+ coordinator ,
365+ host ,
366+ communication ,
367+ keyshareStore ,
368+ sigChn ,
369+ )
370+ go lighterMessageHandler .Listen (ctx )
371+ lighterChain := lighter .NewLighterChain (lighterMessageHandler )
372+ domains [lighter .LIGHTER_DOMAIN_ID ] = lighterChain
373+
352374 go jobs .StartCommunicationHealthCheckJob (host , configuration .RelayerConfig .MpcConfig .CommHealthCheckInterval , sygmaMetrics )
353375
354376 r := relayer .NewRelayer (domains , sygmaMetrics )
0 commit comments