03 Resources
Chapter 3 Quiz
1
What should go in the placeholder at line 8?
#[blueprint]mod blueprint_module { struct MyBlueprint { my_token_resource_address: ResourceAddress, } impl MyBlueprint { pub fn instantiate_my_blueprint() -> [?] { let my_token = ResourceBuilder::new_fungible() .divisibility(DIVISIBILITY_NONE) .metadata("name", "My Token") .metadata("symbol", "MT") .metadata("url", "https://radixdlt.com ") .mint_initial_supply(1000); let component = Self { my_token_resource_address: my_token.resource_address(), } .instantiate() .globalize(); (component, my_token) } }}2
Select the following type that should be returned on line 1:
pub fn mint_one(&self) -> [?] { // Mint and return a single token let resource_manager = borrow_resource_manager!(self.resource_address); let one_token = resource_manager.mint(1); return one_token}3
Select the following true statement(s) about native resources on Radix.
Select all that apply
4
In Scrypto, how are resources passed between components?
5
A Vault is a permanent resource container that can hold multiple resource types.
6
Select the following type that should be returned on line 19:
#[blueprint]mod blueprint_module { struct MyBlueprint { my_token_vault: Vault, } impl MyBlueprint { pub fn instantiate_my_blueprint() -> ComponentAddress { let my_token: Bucket = ResourceBuilder::new_fungible() .divisibility(DIVISIBILITY_NONE) .metadata("name", "My Token") .metadata("symbol", "MT") .metadata("url", "https://radixdlt.com ") .mint_initial_supply(1000); Self { my_token_vault: [?], } .instantiate() .globalize() } }}7
If the complete supply of a particular resource is burnt, its ResourceManager no longer exist.
8
What is returned when you create a resource with no initial supply:
9
Select the following true statement(s) about creating a NonFungible resource with an initial supply.
Select all that apply
9 remaining