Skip to content
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

BCI-2376 TXM as service. Post TX endpoint. #11256

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/chains/evm/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/config"
)

//go:generate mockery --quiet --name EVM --output ./mocks/ --case=underscore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have moved away from mocking config interfaces since they were cause a lot of problems. How is this one being used?

Copy link
Collaborator Author

@dhaidashenko dhaidashenko Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tx.FeeLimit = chain.Config().EVM().GasEstimator().LimitDefault()

This is the only way that I could get access to the default gas limit.
Is it better to introduce new method on chain.GasEstimator() that would return default gas limit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you mean. Are we able to use a fake config type? Or a real config type populated with the values that we need? Mockery types comes with a ton of extra baggage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example:

type TestEvmConfig struct {

type EVM interface {
HeadTracker() HeadTracker
BalanceMonitor() BalanceMonitor
Expand Down
16 changes: 16 additions & 0 deletions core/chains/evm/config/mocks/chain_scoped_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading