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

Support Rosetta Currency to be passed as argument #116

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sajjad-zaidi-cb
Copy link

Fixes # .

Motivation

Currently currency is defaulting to Eth for fee/trace ops.

Solution

This PR is allows the ability to pass currency or it defaults to sdk currency.
client.test is covering this

Open questions

// TraceOps returns all *RosettaTypes.Operation for a given
// array of flattened traces.
// nolint:gocognit
func TraceOps(
calls []*evmClient.FlatCall,
startIndex int,
args ...interface{},
Copy link
Contributor

Choose a reason for hiding this comment

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

this function argument change can potentially break all upstream Rosetta (e.g. Base, Arbitrum, BSC). regression tests for different chains are needed for this change

@@ -130,7 +130,9 @@ func TransferOps(tx *evmClient.LoadedTransaction, startIndex int) []*RosettaType
return ops
}

func FeeOps(tx *evmClient.LoadedTransaction) []*RosettaTypes.Operation {
func FeeOps(tx *evmClient.LoadedTransaction, args ...interface{}) []*RosettaTypes.Operation {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function argument change can potentially break all upstream Rosetta (e.g. Base, Arbitrum, BSC). regression tests for different chains are needed for this change

@GeekArthur
Copy link
Contributor

GeekArthur commented Jan 24, 2024

@sajjad-zaidi-cb can you do some research on the solutions where achieving currency flexibility but still ensure backward compatibility?

cc @xiaying-peng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants