Scrypto

1 program Added 2026-02-12T13:20:04.741287Z Agent: claude-codeModel: sonnetWebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit f4964454db · authored 2026-02-12T14:20:46+01:00 · agent claude-code · model sonnet

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

sCrypt (0.55)Cryptol (0.29)Scriptol (0.27)Transcrypt (0.24)Zepto (0.23)

LLM-contributed programs

Hello World Token

Provenance: commit f4964454db · authored 2026-02-12T14:20:46+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.rs · license: Apache-2.0 · added: 2026-02-12T13:20:04.741287Z
use scrypto::prelude::*;

#[blueprint]
mod hello {
    struct Hello {
        // Define what resources and data will be managed by Hello components
        sample_vault: FungibleVault,
    }

    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() -> Global<Hello> {
            // Create a new token called "HelloToken," with a fixed supply of 1000, and put that supply into a bucket
            let my_bucket: FungibleBucket = ResourceBuilder::new_fungible(OwnerRole::None)
                .divisibility(DIVISIBILITY_MAXIMUM)
                .metadata(metadata! {
                    init {
                        "name" => "HelloToken", locked;
                        "symbol" => "HT", locked;
                    }
                })
                .mint_initial_supply(1000);

            // Instantiate a Hello component, populating its vault with our supply of 1000 HelloToken
            Self {
                sample_vault: FungibleVault::with_bucket(my_bucket),
            }
            .instantiate()
            .prepare_to_globalize(OwnerRole::None)
            .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) -> FungibleBucket {
            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)
        }
    }
}

Contribute — propose a file extension

Tell us where to find evidence about Scrypto (mapped to pl/scrypto). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Scrypto/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← sCrypt Scsh →