-
Notifications
You must be signed in to change notification settings - Fork 47
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
refactor: enforce no runtime in pallet #349
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
11d27c7
refactor: clean inflation pallet of runtime code
weichweich 93cf31a
refactor: clean pallet did lookup of runtime code
weichweich 7f00e39
refactor: move parameter to common
weichweich aebb5c7
reafactor: clean pallet did of runtime references
weichweich 079dd12
fix: standalone
weichweich 0d38ae3
fixes
weichweich 0b95388
fix: benchmarks, tests, ...
weichweich 0c6b88c
🧹🐢
weichweich 4b14edb
refactor: clean kilt launch of runtime code
weichweich 0007b8f
refactor: clean parachain-staking of runtime code
weichweich 6728443
🧹🐢
weichweich 369d3ff
style: use `sp_std::vec![]`
weichweich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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'm up for better solution. This was the first thing that came to my mind. But it's definitely not the best solution since not every 32 Byte array is a DidVerifiableIdentifier. 🤔 On the other hand why not? You could try it on anything that is somehow a 32 Byte array.
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't we use the same trait requirements that the pallet requires?
Or if we want to be even more general, just taking whatever is needed from the
Parameter
type.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.
For the implementation the requirement
I: AsRef<[u8; 32]>
should be enough. But I would like to limit it to the actual type that is theDidIdentifier
and not just all things that can be referenced as a[u8; 32]
. Which is also anAccountId
. But I think there is no way around that. 🤷 Adding more constraints maybe reduce the number of types this is implemented for, but I'm not sure if it's worth it? 🤔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 would not spend too much on this, but if that's the only trait required right now in the method implementation and it's compiling, I would go on with that.