Skip to content

Commit

Permalink
simplify pinpong contracts creation loop
Browse files Browse the repository at this point in the history
Co-authored-by: Will Winder <[email protected]>
  • Loading branch information
asoliman92 and winder authored Jul 10, 2024
1 parent 0f477c8 commit 92b12f5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ func initializePingPongContracts(
chainIDs := maps.Keys(chainUniverses)
// For each chain initialize N ping pong contracts, where N is the (number of chains - 1)
for chainID, universe := range chainUniverses {
chainsToConnectTo := filter(chainIDs, func(chainIDArg uint64) bool {
return chainIDArg != chainID
})
pingPongs[chainID] = make(map[uint64]*pp.PingPongDemo)
for _, chainToConnect := range chainsToConnectTo {
for _, chainToConnect := range chainIDs {
if chainToConnect == chainID {
continue // don't connect chain to itself
}
backend := universe.backend
pingPongAddr, _, _, err := pp.DeployPingPongDemo(owner, backend, universe.router.Address(), universe.linkToken.Address())
require.NoError(t, err)
Expand Down

0 comments on commit 92b12f5

Please sign in to comment.