Open
Conversation
ValarDragon
reviewed
Jul 31, 2025
Comment on lines
+12
to
+13
| const MAX_LIMIT: u32 = 30; | ||
| const DEFAULT_LIMIT: u32 = 10; |
Member
There was a problem hiding this comment.
Rename to specify PAGINATION_ as prefix
ValarDragon
reviewed
Jul 31, 2025
| Ok(Some(ratios)) | ||
| } | ||
|
|
||
| pub fn std_norm_factor(&self) -> Result<Uint128, ContractError> { |
Member
There was a problem hiding this comment.
Lets add some of the code docs in readme to here
ValarDragon
reviewed
Jul 31, 2025
| .collect() | ||
| } | ||
|
|
||
| pub(crate) fn normalized_total_balance(&self) -> Result<Uint128, ContractError> { |
Member
There was a problem hiding this comment.
Lets add a code comment as example (1nBTC, 5 WBTC => 6 Total when fixing precision)
ValarDragon
reviewed
Jul 31, 2025
| @@ -58,32 +65,116 @@ impl Transmuter { | |||
| mut deps: DepsMut, | |||
Member
There was a problem hiding this comment.
can we just get a code comment for this function of "e.g. nBTC -> Alloy BTC"
ValarDragon
reviewed
Jul 31, 2025
| let out_amount_before_fee = swap_to_alloyed::out_amount_via_exact_in( | ||
| tokens_in_with_norm_factor, | ||
| token_out_min_amount, | ||
| self.alloyed_asset.get_normalization_factor(deps.storage)?, |
Member
There was a problem hiding this comment.
this arg should be alloyed_norm_factor?
ValarDragon
reviewed
Jul 31, 2025
|
|
||
| let run_pool = |_deps: Deps, mut pool: TransmuterPool| { | ||
| pool.join_pool(&tokens_in)?; | ||
| let token_out = coin(out_amount_before_fee.u128(), alloyed_denom.clone()); |
Member
There was a problem hiding this comment.
Lets comment that were not checking min_out_amount because we check later stage? This may become more obvious as we get more complexity absracted into functions. E.g. even this run pool code line
8e91de8 to
8ebc9ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CHAIN-1062
depends on #47