-
Notifications
You must be signed in to change notification settings - Fork 29
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
[WIP, DONOT MERGE]: Fix FeeOps duplicated index issue and improve geth-sdk. #103
base: master
Are you sure you want to change the base?
Conversation
fc22eb2
to
7701430
Compare
7701430
to
103136d
Compare
// the current pending state of the backend blockchain. There is no guarantee that this is | ||
// the true gas limit requirement as other transactions may be added or removed by miners, | ||
// but it should provide a basis for setting a reasonable default. | ||
EstimateGas(ctx context.Context, msg Eth.CallMsg) (uint64, 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.
EstimateGas
is the built-in function of ethclient, it shouldn't be in our client interface
@@ -130,7 +130,7 @@ func TransferOps(tx *evmClient.LoadedTransaction, startIndex int) []*RosettaType | |||
return ops | |||
} | |||
|
|||
func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation { | |||
func FeeOps(tx *evmClient.LoadedTransaction, native_currency *RosettaTypes.Currency) []*RosettaTypes.Operation { |
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.
this function is used by all EVM chains, modify the shared util function here especially the function args can potentially break all downstream dependents, usually EVM chain should implement it according to its own flavour
also all EVM and L2 use ETH as native token, we shouldn't only modify the shared util function for BNB
@@ -203,6 +203,7 @@ func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation { | |||
func TraceOps( | |||
calls []*evmClient.FlatCall, | |||
startIndex int, | |||
native_currency *RosettaTypes.Currency, |
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.
this function is used by all EVM chains, modify the shared util function here especially the function args can potentially break all downstream dependents, usually EVM chain should implement it according to its own flavour
also all EVM and L2 use ETH as native token, we shouldn't only modify the shared util function for BNB
@jacquescaocb please hold off to do consolidation until the alignment of plan/execution is finalized |
Fixes # .
1, Fix FeeOps duplicated index Ops issue.
2, Added common function EstimateGas declaration in the type interface.
3, Fix TranceOps wrong native token issue.
Motivation
Solution
Open questions