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

Create abstractions for manipulation coinType format #3624

Open
lumtis opened this issue Mar 4, 2025 · 0 comments
Open

Create abstractions for manipulation coinType format #3624

lumtis opened this issue Mar 4, 2025 · 0 comments
Labels
chain:sui code-quality Code quality improvement

Comments

@lumtis
Copy link
Member

lumtis commented Mar 4, 2025

Describe the Issue

The cointype when emitting the event in Sui doesnt' include 0x prefix
We therefore use this no prefix format for the asset value in the zrc20 data to match directly with the data emitted from Sui.

However, there are different part of the code requiring to set the 0x prefix.

coinType = "0x" + cctx.InboundParams.Asset

(might be other in the future with whitelist tx)

This prefix is added manually, for better code clarity it might be better to create method abstracting this change, from the dev perspective, only a coinType type is used.

Alternative

Explore the possibility of emitting the type with 0x format on Sui and use this format everywhere in the code

@lumtis lumtis added chain:sui code-quality Code quality improvement labels Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chain:sui code-quality Code quality improvement
Projects
None yet
Development

No branches or pull requests

1 participant