-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(geth): add ethereum support for the geth binary #1230
Conversation
…x utxo send amount
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
…d it should be more stable.
switch cfg.Bin { | ||
case "anvil": | ||
return foundry.NewAnvilChain(testName, cfg, log), nil | ||
case "geth": | ||
return geth.NewGethChain(testName, cfg, log), nil | ||
default: | ||
return nil, fmt.Errorf("unknown binary: %s for ethereum chain type, must be anvil or geth", cfg.Bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice, I like this design pattern a lot for this. clean & great UX
@@ -36,7 +37,7 @@ func TestEthereum(t *testing.T) { | |||
ctx := context.Background() | |||
|
|||
// Get default ethereum chain config for anvil | |||
anvilConfig := ethereum.DefaultEthereumAnvilChainConfig("ethereum") | |||
anvilConfig := foundry.DefaultEthereumAnvilChainConfig("ethereum") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self:
- add release note that we support both foundry & geth now
modifications to local-ic required?nope you handled! ty!
_, _, _ = val0.Exec(ctx, val0.TxCommand(keyName, command...), val0.Chain.Config().Env) | ||
// We are running many nodes, using many resources. This function is similar to | ||
// testutils.WaitForBlocks(), but does not hammer calls as fast as possible. | ||
func NiceWaitForBlocks(ctx context.Context, delta int64, chain ibc.Chain) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I like the idea for this function, but I think adding a time.Duration in the function params would be better suited so its more general? or maybe just a better name, as nice
in what context to a user? Leaving that to scope for a future PR if desired.
WaitForBlocksWithDelay(ctx context.Context, delta int64, chain ibc.Chain, searchDelay time.Duration)
Tested to also support Binance Smart Chain (v1.2.13)