Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Jul 17, 2024
1 parent 357e539 commit fb4c61d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 1 addition & 6 deletions test/ethtransfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import (
)

func TestEthTransfer(t *testing.T) {
cmd := exec.Command("kurtosis", "port", "print", "cdk-v1", "zkevm-node-rpc-001", "http-rpc")
output, err := cmd.CombinedOutput()
if err != nil {
log.Fatalf("Failed to execute command: %s", err)
}
operations.L2RPCURL = strings.TrimSpace(string(output))
operations.L2RPCURL = operations.GetL2RPCURL()

const amountOfTxsToSend = 10
client, err := jsonrpc.NewClient(operations.L2RPCURL)
Expand Down
10 changes: 10 additions & 0 deletions test/operations/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@ func GetL2Wallet() (*wallet.Key, error) {
return nil, err
}
return wallet.NewWalletFromPrivKey(prvKeyBytes)
}

func GetL2RPCURL() string {
cmd := exec.Command("kurtosis", "port", "print", "cdk-v1", "zkevm-node-rpc-001", "http-rpc")
output, err := cmd.CombinedOutput()
if err != nil {
log.Fatalf("Failed to execute command: %s", err)
}

return strings.TrimSpace(string(output))
}

0 comments on commit fb4c61d

Please sign in to comment.