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

Rosetta - return generic UNKNOWN operation type for future HAPI transaction types #8320

Open
xin-hedera opened this issue May 16, 2024 · 0 comments
Labels
enhancement Type: New feature rosetta Area: Rosetta API

Comments

@xin-hedera
Copy link
Collaborator

xin-hedera commented May 16, 2024

Problem

It's a maintenance burden to add support of resolving a new transaction type (an integer) to its transaction name (in text, and in rosetta world, it's used as operation type). In the mean time, if the customer needs support of a specific transaction for both rosetta data API and construction API, a request shall be made and worked ahead of going to production.

Thus, in mirrornode rosetta module, for any transaction type out of the already supported ones, UNKNOWN should be provided as the operation type.

Solution

  • make types.TransactionTypes private, i.e., change it to types.transactionTypes
  • add a public function func GetTransactionType(type int32) string
  • replace references of types.TransactionTypes to types.GetTransactionType
  • Check if we can enumerate transaction results or types from the sdk instead of explicitly defining them

Alternatives

No response

@xin-hedera xin-hedera added enhancement Type: New feature rosetta Area: Rosetta API labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature rosetta Area: Rosetta API
Projects
None yet
Development

No branches or pull requests

1 participant