-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[docs] Improved aggregator Move documentation #5659
Conversation
const EAGGREGATOR_UNDERFLOW: u64 = 2; | ||
|
||
/// When aggregator feature is not supported (raised by native code). | ||
/// When aggregator feature is not supported. Raised by native code. | ||
const ENOT_SUPPORTED: u64 = 3; |
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.
I noticed that this is not used anywhere, also to in Move all constants are private so dropping this should be compatible?
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.
All error codes' comments are auto-updated in the error mapping (done as part of upgrading existing modules). These are shown to end users as error messages.
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.
I mean would it be safe to drop const ENOT_SUPPORTED: u64 = 3;
all together? If the comments are updated in the mapping, not sure we can do that...
@@ -0,0 +1,47 @@ | |||
# Design Rationale |
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.
May be this can be moved into dev docs? cc @clay-aptos
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.
May be this can be moved into dev docs? cc @clay-aptos
Yes, all of these docs should be considered for Aptos.dev. See my issue for this in:
#5577
Just ping that issue when you are ready to work on it. We have myriad docs in the repo that are not linked from Aptos.dev, it seems.
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.
Sounds good! Maybe this can wait until the blogpost first then.
aptos-move/framework/aptos-framework/sources/aggregator/aggregator.move
Outdated
Show resolved
Hide resolved
const EAGGREGATOR_UNDERFLOW: u64 = 2; | ||
|
||
/// When aggregator feature is not supported (raised by native code). | ||
/// When aggregator feature is not supported. Raised by native code. | ||
const ENOT_SUPPORTED: u64 = 3; |
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.
All error codes' comments are auto-updated in the error mapping (done as part of upgrading existing modules). These are shown to end users as error messages.
aptos-move/framework/aptos-framework/sources/aggregator/aggregator.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/aggregator/aggregator.move
Outdated
Show resolved
Hide resolved
aptos-move/framework/aptos-framework/sources/aggregator/aggregator_factory.move
Outdated
Show resolved
Hide resolved
struct Integer has store { | ||
value: u128, | ||
limit: u128, | ||
} | ||
|
||
/// Creates a new integer |
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.
This is rather a lazy comment. Can you explain a bit more on what this struct is for?
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.
Actually this comment is for the new
function and not for the struct (struct has a more explicit one). I guess I would just remove it then or state that a new integer is created that follows same overflow semantics as aggregator.
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.
✅ Forge suite
|
✅ Forge suite
|
* [docs] Improved aggregator documentation * [docs] Typo fixes in aggregator documentation * [docs] addressed comments
Description
Moved design rationale for aggregators into a separate readme, and fixed the Move documentation accordingly.
Test Plan