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

feat: use Uint256 for Coin #2413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

varun-doshi
Copy link

Closes #2366

@chipshort chipshort self-requested a review March 24, 2025 13:51
Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

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

Nice start, but the contracts also need to be updated

Comment on lines +55 to +60
#[macro_export]
macro_rules! uint256 {
($val:expr) => {
Uint256::from($val)
};
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this really that useful? What's the benefit over just writing Uint256::from?

Copy link
Author

Choose a reason for hiding this comment

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

I thought this might become a bit tedious to look at:

Coin::new(Uint256::from(123u128), "ucosm");

But yes I get your point, it isn't really adding much value. Will remove this

@varun-doshi
Copy link
Author

Nice start, but the contracts also need to be updated

Looks like changing any value representation in the contracts/ folder will result in a huge number of file changes.
Would you like that to be a separate PR for ease of review?

@chipshort
Copy link
Collaborator

Sure, a PR merging into this one would be great.

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

Successfully merging this pull request may close these issues.

Use Uint256 for Coin
2 participants