Select the following true statement(s) about authorization in Scrypto.
Select all that apply
2
Select the following true statement(s) about Application-level Authentication.
Select all that apply
3
Select the following true statement(s) about badges:
Select all that apply
4
Select the error(s) in the following code.
Select all that apply
rust
1use scrypto::prelude::*;23#[blueprint]4mod blueprint_module {5 struct AwesomeBlueprint {6 admin_badge: ResourceAddress7 }89 impl AwesomeBlueprint {10 pub fn instantiate() -> (ComponentAddress, Bucket) {11 // The admin badge for this component12 let admin_badge: Bucket = ResourceBuilder::new_fungible()13 .divisibility(DIVISIBILITY_NONE)14 .mint_initial_supply(1);1516 // Setting up the access rules of the component17 let rules: AccessRules = AccessRules::new()18 .method("secret_method", admin_badge.resource_address(), LOCKED)19 .default(rule!(allow_all), LOCKED);2021 // Initialize our component, placing the minting authority badge within its 22 // vault, where it will remain forever23 let flat_admin_component = Self {24 admin_badge: admin_badge.resource_address(),25 }26 .instantiate();2728 let component_address = flat_admin_component.globalize();2930 flat_admin_component.add_access_check(rules);3132 // Return the instantiated component and the admin badge we just minted33 (component_address, admin_badge)34 }35 }36}
5
In application-level auth, what should be the type of the badge argument passed to a method / function:
6
Select the following true statement(s) about Proofs:
Select all that apply
7
When we received a Proof on a method, why do we need to first validate it?
8
What is the authorize (closure) method on Vaults and Buckets actually doing under the hood:
9
Select the following true statement(s) about address-based authorization.
Select all that apply
10
What should go in the placeholder on line 8 so that a proof of the admin_badge is required to mint more TOKEN: