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 idea of the comments in the Rust is that they will eventually be
generated by a Rust macro that replaces all the
assert_owner
calls.The macro can look like:
Or maybe:
The "owner" view method could be auto-generated from a
derive
on thestruct:
While
::admins
and::get_admin_contract_id
would beexplicitly-defined methods on this contract.
The methods specified here would all be expected to return
AccountId | Vec<AccountId>
::get_admin_contract_id::admins specifies that any accounts returned by
this method on an external contract should be allowed calling the
specified method. This would be simple to handle on a frontend, but
implies that a cross-contract call with callback is generated by having
such a specification in the macro.