-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[aptos-framework] Remove balance checks in DFA #16313
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
Conversation
⏱️ 41m total CI duration on this PR
|
94a1f9a to
d67254f
Compare
|
Drafted AIP for discussion and justification for this change: aptos-foundation/AIPs#582 |
|
|
||
| #[test(creator = @0xcafe)] | ||
| #[expected_failure(abort_code=0x70002, location=aptos_framework::dispatchable_fungible_asset)] | ||
| fun test_nil_op_token( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the test name to record the new expected behavior now?
|
Can you add a test where the override function clamps down the amount to max amount users can withdraw? |
|
Test added |
d67254f to
12b0f38
Compare
| @@ -0,0 +1,89 @@ | |||
| #[test_only] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does clamped mean here?
add some comments?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0907b12 to
edf8d8c
Compare
edf8d8c to
cd8b091
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|

Description
This PR removes the balance check in the
dispatchable_fungible_assetmodule that was verifying the withdrawn amount matched the requested amount. The check was unnecessary and was causing tests to fail. Additionally, it enhances theten_x_tokentest module by implementing and registering proper withdraw and deposit dispatch functions.How Has This Been Tested?
The changes have been tested through the existing
nil_op_token_testswhich previously expected a failure but now passes correctly. The test verifies that withdrawal and deposit operations work properly without the balance check.Key Areas to Review
dispatchable_fungible_asset.movewhich was comparing start and end balancesten_x_token.movetest moduleType of Change
Which Components or Systems Does This Change Impact?
Checklist