From ca6c029e6ffae6debba465c46bc89ed6cd075302 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 8 Nov 2024 01:46:13 +0100 Subject: [PATCH] fix e2e tests --- e2e/txserver/zeta_tx_server.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/e2e/txserver/zeta_tx_server.go b/e2e/txserver/zeta_tx_server.go index 0419348859..146dda4cf2 100644 --- a/e2e/txserver/zeta_tx_server.go +++ b/e2e/txserver/zeta_tx_server.go @@ -537,16 +537,21 @@ func (zts ZetaTxServer) DeployZRC20s( } // find spl zrc20 - splzrc20, ok := lo.Find(deployedEvents, func(ev *fungibletypes.EventZRC20Deployed) bool { - return ev.ChainId == chains.SolanaLocalnet.ChainId && ev.CoinType == coin.CoinType_ERC20 - }) - if !ok { - return nil, fmt.Errorf("unable to find spl zrc20") + splzrc20Addr := common.Address{} + if zrc20Deployment.SPLAddr != nil { + splzrc20, ok := lo.Find(deployedEvents, func(ev *fungibletypes.EventZRC20Deployed) bool { + return ev.ChainId == chains.SolanaLocalnet.ChainId && ev.CoinType == coin.CoinType_ERC20 + }) + if !ok { + return nil, fmt.Errorf("unable to find spl zrc20") + } + + splzrc20Addr = common.HexToAddress(splzrc20.Contract) } return &ZRC20Addresses{ ERC20ZRC20Addr: common.HexToAddress(erc20zrc20.Contract), - SPLZRC20Addr: common.HexToAddress(splzrc20.Contract), + SPLZRC20Addr: splzrc20Addr, }, nil }