A selection of resources for developers building on Radix.
✅ Dependencies & Installation Scripts
Copy / paste the relevant script into your terminal to install the required dependencies:
MacOS
curl -sSL https://github.com/radixdlt/radixdlt-scrypto/raw/HEAD/scrypto-install-scripts/install-scrypto-macos.sh | sh
Windows (Powershell)
Invoke-RestMethod 'https://github.com/radixdlt/radixdlt-scrypto/raw/HEAD/scrypto-install-scripts/install-scrypto-windows.ps1' | Invoke-Expression
Linux
curl -sSL https://github.com/radixdlt/radixdlt-scrypto/raw/HEAD/scrypto-install-scripts/install-scrypto-debian.sh | sh
🏁 Starter Pack
The following resources are available to help you build and grow your application on Radix:
- Learn Step by Step.
- Deepen your understanding with Radix Technical Documentation.
- Get inspired by Official Code Examples.
- Play with the Transaction Manifest Builder.
- Dive into our resource-rich Discord and Telegram channels.
- Apply for the Radix Booster Grants.
🛢️ General Resources
Radix Wallet | Scrypto | Radix Engine | Radix Gateway | Radix dApps | Radix Network | ROLA | Core | Radix Node | |
Docs | |||||||||
Repos | |||||||||
APIs | |||||||||
Packages | |||||||||
Toolkits | |||||||||
SDKs |
⿻ Scrypto Resources
Example
An example Scrypto blueprint that creates a fixed supply of 1000 ‘HelloTokens’.
// Import Scrypto library. Access to types such as buckets and vaults as well as methods.
use scrypto::prelude::*;
// Blueprint macro
blueprint! {
struct Hello {
// Define what resources and data will be managed by Hello components
sample_vault: Vault
}
impl Hello {
// Implement the functions and methods which will manage those resources and data
// This is a function, and can be called directly on the blueprint once deployed
pub fn instantiate_hello() -> ComponentAddress {
// Create a new token called "HelloToken," with a fixed supply of 1000, and put that supply into a bucket
let my_bucket: Bucket = ResourceBuilder::new_fungible()
.metadata("name", "HelloToken")
.metadata("symbol", "HT")
.initial_supply(1000);
// Instantiate a Hello component, populating its vault with our supply of 1000 HelloToken.
// Initialize a state.
Self {
sample_vault: Vault::with_bucket(my_bucket)
}
// Instantiate local function and globalize it to assign an address. No semi-colon returns an address.
.instantiate().globalize()
}
// This is a method, because it needs a reference to self. Methods can only be called on components
pub fn free_token(&mut self) -> Bucket {
info!("My balance is: {} HelloToken. Now giving away a token!", self.sample_vault.amount());
// If the semi-colon is omitted on the last line, the last value seen is automatically returned
// In this case, a bucket containing 1 HelloToken is returned
self.sample_vault.take(1)
}
}
}