Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Nov 8, 2024
1 parent 498f4ea commit ca6c029
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions e2e/txserver/zeta_tx_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ca6c029

Please sign in to comment.