Closed mrnaveira closed 1 month ago
571 tests +1 570 :white_check_mark: +1 3h 15m 47s :stopwatch: - 2m 28s 64 suites ±0 0 :zzz: ±0 2 files ±0 1 :x: ±0
For more details on these failures, see this check.
Results for commit 352baae3. ± Comparison against base commit 39c638bc.
:recycle: This comment has been updated with latest results.
Description
tari_template_lib
to buildAccessRule
enumsaccount
andaccount_nft
)Motivation and Context
We want a better way of constructing
AccessRules
. For example, to restrict a resource to be minted only by a specific component, we need something like:Instead, we want a new macro that allows us to build access rules in simpler and more readable way:
This PR adds a new macro rule! for this purpose. All variants of rules can be build as follows:
rule!(allow_all)
rule!(deny_all)
rule!(component(address))
rule!(resource(address))
rule!(template(address))
rule!(non_fungible(address))
rule!(any_of(component(c_address)), template(t_address)))
How Has This Been Tested?
What process can a PR reviewer use to test or verify this change?
See previous section
Breaking Changes
tari_template_lib
crate changes, all the builtin templates (e.g. account) also change.