03 Resources
3.2 Summary
This section covers how fungible resource is created with the
ResourceBuilder. We can create resources with no initial supply, which will return to us a ResourceManager. However, creating resources with an initial supply will return us a bucket containing those resources, which we must deposit into a vault. Additionally, the ResourceBuilder provides lots methods to customize our resource such as adding resource behaviors, attributes like metadata, and more.- We use the
ResourceBuilderto create fungible and non-fungible resources. - Creating a resource without an initial supply will return us a
ResourceManager. - Creating a resource with an initial supply will return us a bucket.The bucket of newly created resource must then be deposited into a vault.
- We can fractionalize our resource with
.divisibility()from 0 (non-divisible) to 18 (the maximum amount of decimal points we can fractionalize our resource). - We can create metadata to our resource to describe and personalize our resource.
Need Help?Do you have a question and need assistance while working on your project? Then join the RDX Works team and community members on the #Scrypto channel of our Discord server, where you can ask as many questions as you like and we will gladly help you!