-
Notifications
You must be signed in to change notification settings - Fork 279
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
[feature]: #1572: Specialized permission tokens #2156
[feature]: #1572: Specialized permission tokens #2156
Conversation
5d7f510
to
91181da
Compare
644b51b
to
8d19521
Compare
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.
Need to update telegram channels with API changes.
@mversic, added |
declare_token!( | ||
/// Can burn asset with the corresponding asset definition. | ||
CanBurnAssetWithDefinition { | ||
/// Asset definition id. | ||
asset_definition_id ("asset_definition_id"): DefinitionId, | ||
}, | ||
"can_burn_asset_with_definition" | ||
); |
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.
Could be a derive macro:
declare_token!( | |
/// Can burn asset with the corresponding asset definition. | |
CanBurnAssetWithDefinition { | |
/// Asset definition id. | |
asset_definition_id ("asset_definition_id"): DefinitionId, | |
}, | |
"can_burn_asset_with_definition" | |
); | |
/// Can burn asset with the corresponding asset definition. | |
#[derive(Permission)] | |
struct CanBurnAssetWithDefinition { | |
/// Asset definition id. | |
asset_definition_id: DefinitionId, | |
} |
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 chose to leave it as macro_rules because I don't have a lot of experience writing procedural macros and this one is straightforward enough to be understandable in spite of it's length IMO.
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.
Let's create a ticket for it in chores.
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Quentin Inkling <mbee@protonmail.ch>
Signed-off-by: Quentin Inkling <mbee@protonmail.ch>
Signed-off-by: Quentin Inkling <mbee@protonmail.ch>
83e096b
to
c7e6a12
Compare
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…erledger-iroha#2156) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Description of the Change
Created concrete types for
PermissionToken
s predefined inpublic_blockchain
to enable client interaction withpublic_blockchain
be less stringly-typed.Added cli util to list the new concrete token types.
Issue
Resolves #1572
Benefits
Less stringly-typed
public_blockchain
.Possible Drawbacks
None?