03 Resources
3.7 Summary
The TokenSale blueprint example represents a simple, yet fundamental walkthrough how smart contract development works with Scrypto. We were able to define the component state, resources, and methods our component will have with our blueprint. This allowed our instantiated component to perform the necessary functionalities to perform a token sale based on a determined price. Because of how resource containers work, users can't accidentally send the wrong currency to purchase our tokens. Furthermore, if a user accidentally overpays, we were able to manipulate buckets to send back any potential overpayments.
This wraps up essential knowledge around how resources work with Scrypto. The next chapter will be relatively heavy as we dive into how auth works and creating permissioned systems with Scrypto.
This wraps up essential knowledge around how resources work with Scrypto. The next chapter will be relatively heavy as we dive into how auth works and creating permissioned systems with Scrypto.