A place for the community to upload example Scrypto code

Overview

community-scrypto

A place for the community to upload example Scrypto code.

Please fork from main, work out of a sub-directory of your choosing, and then open a PR when ready. We're happy to accept pull requests of incomplete ideas that are still in progress.

Feel free to create additional top- or mid-level directories if that feels appropriate.

Don't forget to visit the main Scrypto repository to get started!

Comments
  • Added defi/single-token-amm-dex to use Scrypto v0.2.0

    Added defi/single-token-amm-dex to use Scrypto v0.2.0

    Hi there, hoping to have managed things well with Git as a newbie. Otherwise apologies in advance. I have manually formatted trying use rustfmt guidelines 'cause the latter seemed not too happy to work on my system. Hoping have managed this one acceptably too.
    Cheers.

    opened by alanci17 22
  • marketplace example

    marketplace example

    First try at a simple marketplace dApp.

    image

    The screenshot above is the result of running the demo which is doing the following:

    $XRD_MARKET = resim call-function $PACKAGE Market open $XRD
    
    resim call-method $XRD_MARKET buy $USDT 3.21 1000,$XRD
    resim call-method $XRD_MARKET buy $USDT 3.27 200,$XRD
    resim call-method $XRD_MARKET sell 90,$USDT 3.26
    resim call-method $XRD_MARKET sell 100,$USDT 3.29
    resim call-method $XRD_MARKET sell 400,$USDT 3.33
    
    resim call-method $XRD_MARKET fill_orders
    
    resim call-method $XRD_MARKET print_order_book
    

    Still have to write the actual tests beyond the demo.

    opened by machisuji 9
  • First pass at a UBI token in Scrypto.

    First pass at a UBI token in Scrypto.

    A UBI token that allocates 1 token per person per epoch. Ideally there would be a 20% burn on each transaction but currently the burn is optional. Will enforce when RECALLABLE support is added.

    It was fun to learn and refreshing to get introduced to Scrypto!

    opened by michaelwoodson 5
  • Marketplace NFT update

    Marketplace NFT update

    Expanding on @cbisaillon's proposal in #45 this updates the marketplace example such that it uses NFTs for the order tickets.

    While at it I also refactored the code a bit to remove the unnecessary separation of buy and sell orders and the resulting code duplication.

    opened by machisuji 5
  • update amms/bonding for Scrypto v0.3.0

    update amms/bonding for Scrypto v0.3.0

    • [X] mutability updates and reference correct dependencies in Cargo.toml
    • [X] scrypto_statictypes support for Scrypto v0.3.0 (exists as of tag v0.4.0)
    • [x] scrypto-unit support for Scrypto v0.3.0

    Some minor testing changes will likely also be needed here too after scrypto-unit is updated

    opened by devmannic 3
  • Created a Payment Splitter example

    Created a Payment Splitter example

    Hi!

    I've created a payment splitter example using Scrypto which is inspired by the OpenZeppelin implementation of a Payment Splitter.

    This PaymentSplitter uses NFTs to authenticate shareholders and to keep track of the amount of shares that a shareholder owns, the amount of XRD the payment splitter owes them in total, and the amount that has been given so far.

    I've added an example.py file to run this example quickly using python and resim and have also included a detailed example in the README.md file.

    opened by 0xOmarA 3
  • No loss lottery

    No loss lottery

    In this example, the lottery will use staking rewards as a winning pool

    Players will be able to withdraw the amount they used to purchase tickets once the lottery is ended.

    opened by BlindDev 3
  • scrypto-bonding bonding curve amm initial release

    scrypto-bonding bonding curve amm initial release

    An AMM based on bonding curves. Enjoy!

    See the README.md for details. Note this is compatible with main branch pre-Alexandria (right now!) :). Some minor changes will be needed here and to one of the dependency libraries (which I'm also the author of)

    opened by devmannic 3
  • First Commit on Chama Investments

    First Commit on Chama Investments

    A Chama is an informal cooperative society that is normally used to pool and invest savings by people in East Africa, and particularly Kenya.

    Of late Chama's relied on the personal trust vested in the member to keep the funds. But as history has shown, that trust is usually broken. My aim is to try and solve the problems inherent in the Chama societies using Radix.

    opened by Phineas94 3
  • Time-lock example

    Time-lock example

    Hey, everyone.

    This is our first attempt in Scrypto and RUST.

    In this example, we added an ability to lock XRD with a certain duration (will be added to the current epoch).

    opened by BlindDev 3
  • Real Estate Manager: Permissioned, Secure Real Estate Management Protocol for Authorities

    Real Estate Manager: Permissioned, Secure Real Estate Management Protocol for Authorities

    I'd like to merge this package into radix community example repo. This would be a great example for people who are looking for:

    • How to connect, link 2 type of NFT which are highly integrated with each other (in this case are the land NFT and building NFT).
    • How to use a simple SBT for on-chain verification (in this case is the citizen verification).
    • How to manage some other properties that linked with a real-asset NFT (in this case are land modification and building construction).
    • How to use a transient resource for an access_rule (in this case is the move_badge).
    • How to use access_rule restrict_withdraw and restrict_deposit effectively.
    opened by unghuuduc 2
Owner
Radix DLT
Radix DLT
Example sqlite3 Dynamic Loadable Extension in Rust - vfs and vtab modules - port of vfsstat.c

Example sqlite3 Dynamic Loadable Extension in Rust - vfs and vtab modules The vfs and vtab This is a port of the official ext/misc/vfsstat.c sqlite3 e

Manos Pitsidianakis 28 Oct 10, 2022
CRUD example with Rocket, Toql and MySQL

Todo (Rocket, Toql, MySQL) This is a little REST server built with Rocket, Toql and MySQL. The server allows to call CRUD functions on a Todo item. It

Artos 7 Jan 5, 2022
A collection of example project using Njord.

Example Projects A collection of example project using Njord. Contributors The following contributors have either helped to start this project, have c

Njord 3 Dec 6, 2023
Macros that allow for implicit await in your async code.

suspend fn Disclaimer: this was mostly made as a proof of concept for the proposal below. I haven't tested if there is a performance cost to this macr

null 6 Dec 22, 2021
rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

Foretag 3 Mar 24, 2022
Command-line tool to make Rust source code entities from Postgres tables.

pg2rs Command-line tool to make Rust source code entities from Postgres tables. Generates: enums structs which can be then used like mod structs; use

Stanislav 10 May 20, 2022
This code features a viper-client, which can connect to a viper-server, a custom interface made for Comelit devices.

Viper Client ?? (WIP) This is code for my intercom; specifically for the Comelit Mini Wi-Fi MSFV. This features a ViperClient which can talk to the Co

Gerard 4 Feb 20, 2023
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Unify your game sources in one place and aquire more of them, using modules made by the community.

Project Black Pearl Unify your game sources in one place by using modules made by the community. What is Project Black Pearl? Project Black Pearl (or

Project Black Pearl 8 Jan 15, 2023
Scrypto Advent Calendar. Learn the new programming langage to build quick and secure DeFi applications.

Scrypto Advent Calendar I am publishing new Christmas related Scrypto examples every day from Dec 1st to Dec 25th. "Watch" this project to get notifie

Clement Bisaillon 26 Nov 13, 2022
Use explicit container types with Scrypto! Leverage the Rust compiler's type checking to increase security and productivity when developing Radix blueprints.

Scrypto Static Types Use explicit container types with Scrypto! Leverage the Rust compiler's type checking to increase security and productivity when

null 7 Aug 5, 2022
A cli tool to automatically download and upload advent of code problems.

Advent of Code CLI CLI client for advent of code. The purpose of this tool is so you don't have to leave your editor while participating (if you are l

Tobias Walle 43 Dec 7, 2023
This repo contains crates that are used to create the micro services and keep shared code in a common place.

MyEmma Helper Crates This repo contains crates that can are reused over different services. These crate are used in projects at MyEmma. But these crat

MyEmma 1 Jan 14, 2022
Rustypaste is a minimal file upload/pastebin service.

Rustypaste is a minimal file upload/pastebin service.

Orhun Parmaksız 169 Jan 1, 2023
A CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes

This is a CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes, as well as download any pastes you want.

Gabriel Fontes 1 Jan 26, 2022
A rust library + CLI tool that tells you when swas will upload new video through complex calculations

A rust library + CLI tool that tells you when swas will upload new video through complex calculations. It also lets you search and play youtube videos of swas and other channels. Searching about youtube channels is also an option. Basically it's a youtube search cli tool written in rust.

midnightFirefly 4 Jun 10, 2022
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

SteveLau 11 Aug 17, 2022
A simple cross-platform remote file management tool to upload and download files over HTTP/S

A simple cross-platform remote file management tool to upload and download files over HTTP/S

sexnine 13 Dec 30, 2022
A simple command line program to upload file or directory to web3.storage with optional encryption and compression

w3s-cli A simple command line program to upload file or directory to web3.storage with optional encryption and compression. Features Uploads single fi

qdwang 5 Oct 22, 2022
A simple menu to keep all your most used one-liners and scripts in one place

Dama Desktop Agnostic Menu Aggregate This program aims to be a hackable, easy to use menu that can be paired to lightweight window managers in order t

null 47 Jul 23, 2022