-
Notifications
You must be signed in to change notification settings - Fork 443
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
Remove Default
implementation for AccountId
#1255
Merged
Merged
Conversation
This file contains 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
Since it doesn't implement `Default` we can't use the macro implementations anymore.
HCastano
commented
Jun 13, 2022
HCastano
added
the
E-on-ice
The issue or PR is currently on ice and not further discussed or developed.
label
Jun 14, 2022
Codecov Report
@@ Coverage Diff @@
## master #1255 +/- ##
==========================================
- Coverage 70.38% 64.73% -5.66%
==========================================
Files 207 207
Lines 6393 6381 -12
==========================================
- Hits 4500 4131 -369
- Misses 1893 2250 +357
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
HCastano
removed
the
E-on-ice
The issue or PR is currently on ice and not further discussed or developed.
label
Feb 1, 2023
ascjones
requested changes
Feb 1, 2023
This was referenced Feb 1, 2023
Merged
* Make cross-contract callee non-optional * clippy * Fmt * Fix * clippy * clippy * clippy * Add a similar method for `code_hash` * Fix doc tests * RustFmt * Rename top level methods to `call` and `delegate` * Fix some renames --------- Co-authored-by: Hernando Castano <hernando@hcastano.com>
ascjones
approved these changes
Feb 1, 2023
Merged
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.
The problem here is that in the
sr25519
anded25519
curves thezero-address public key has a known private key.
The
Default
implementation ofAccountId
returned the zero-address. Since developersfrequently reach for
Default
it is entirely possible that they could shoot themselvesin the foot unknowingly. For example, assigning a contract owner to the zero address
and not updating it, or using it as a burn address.
There's also an argument to be made that the concept of the
Default
address doesn'tmake sense anyways, and we shouldn't be giving this specific address a special treatment.
Closes #1110.