-
Notifications
You must be signed in to change notification settings - Fork 9
docs: mark INativeToken functions as external #66
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,10 @@ use std::sync::OnceLock; | |
|
|
||
| sol! { | ||
| interface INativeToken { | ||
| function mint(address to, uint256 amount); | ||
| function burn(address from, uint256 amount); | ||
| function addToAllowList(address account); | ||
| function removeFromAllowList(address account); | ||
| function mint(address to, uint256 amount) external; | ||
| function burn(address from, uint256 amount) external; | ||
| function addToAllowList(address account) external; | ||
| function removeFromAllowList(address account) external; | ||
|
Comment on lines
+15
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding the Consider adding a brief comment explaining why these functions are marked as |
||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,10 +45,10 @@ We will implement a custom precompile for native token minting. The precompile w | |
|
|
||
| ```solidity | ||
| interface INativeToken { | ||
| function mint(address to, uint256 amount); | ||
| function burn(address from, uint256 amount); | ||
| function addToAllowList(address account); | ||
| function removeFromAllowList(address account); | ||
| function mint(address to, uint256 amount) external; | ||
| function burn(address from, uint256 amount) external; | ||
| function addToAllowList(address account) external; | ||
| function removeFromAllowList(address account) external; | ||
|
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding the Consider adding a brief comment explaining why these functions are marked as |
||
| } | ||
| ``` | ||
|
|
||
|
|
||
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.
Adding the
externalkeyword to the function definitions in the interface makes it explicit that these functions are intended to be called from outside the contract. This is a good practice for interface definitions.Consider adding a brief comment explaining why these functions are marked as
externalfor better understanding.