CosmWasm smart contract to bundle up cw assets (cw20, cw721, cw1155)

Overview

CosmWasm CW Bundler

This repo is a CosmWasm smart contract that allows users and other contracts to bundle any combination of cw20, cw721, cw1155 tokens under a single cw721 token.

Disclaimer: This smart contract has not been audited. Please use and fork at your own risk.

Compatibility

This repo has originally been written to be compatible with the Terra ecosystem, but can be updated to be compatible with other CosmWasm enabled chains.

  • Current CosmWasm version: 0.16.3

Using

Instantiate the contract with the minter address you want to mint new bundles with.

Execute messages

  • Mint - Mint a new cw721 bundle.
  • Receive - Receive and deposit cw20 token sent to the contract into bundle.
  • ReceiveNft - Receive and deposit cw721 token sent to the contract into bundle.
  • BatchReceive - Receive and deposit cw1155 token sent to the contract into bundle.
  • Withdraw - Withdraw all tokens from a bundle.

Potential use cases

  • Allow users to bundle NFTs (cw721) together as collateral and take a loan out on them.
  • Allow users to fractionalize assets e.g. real estate using cw20 tokens and have the entire asset be represented by a NFT (cw721).
  • Allow hierarchical groupings of assets e.g. song NFTs (cw721) under an album NFT (cw721).
  • Allow users to buy or sell bundles of assets

To do

  • More robust testing using mocks to simulate contract to contract interactions.
  • Custom query messages that provide detailed information on asset bundles.
  • Demo app with frontend showcasing asset bundling for any user with a wallet using Terrain.
  • Compatibility for CosmWasm enabled chains other than Terra.

Contributions

  • Contributions are welcome, please file an issue or a PR.
You might also like...
CosmWasm Multisend Contract on Terra Blockchain
CosmWasm Multisend Contract on Terra Blockchain

CosmWasm Multisend Contract on Terra Blockchain This is a multisend smart contracts in Rust built to run on Cosmos SDK module on all chains that enabl

CosmWasm multi-contract testing framework

Multi Test: Test helpers for multi-contract interactions Warning: Alpha Software Designed for internal use only. This is used for testing cw-plus cont

Template for multi-contract CosmWasm projects

CosmWasm Template Template for multi-contract CosmWasm projects How to Use Install cargo-make: cargo install --force cargo-make Run formatter: cargo m

An example CosmWasm contract for connecting contracts over IBC.

CosmWasm IBC Example This is a simple IBC enabled CosmWasm smart contract. It expects to be deployed on two chains and, when prompted, will send messa

My code for the terra.academy course on CosmWasm smart contracts

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

A gRPC-based scripting library for interacting with CosmWasm smart-contracts.

Cosmos Rust Script Smart contract scripting library to ease CosmWasm smart contract development and deployment. cosm-script is inspired by terra-rust-

An all-environment scripting library for interacting with CosmWasm smart-contracts.
An all-environment scripting library for interacting with CosmWasm smart-contracts.

BOOT Smart contract scripting library to ease CosmWasm smart contract deployment and testing. BOOT is inspired by terra-rust-api and uses cosmos-rust

A blazingly fast compiling & optimization tool for CosmWasm smart contracts.
A blazingly fast compiling & optimization tool for CosmWasm smart contracts.

cw-optimizoor A blazingly fast alternative to CosmWasm/rust-optimizer for compiling & optimizing CW smart contracts. It's primarily meant to speed up

A quick way to decode a contract's transaction data with only the contract address and abi.

tx-decoder A quick way to decode a contract's transaction data with only the contract address and abi. E.g, let tx_data = "0xe70dd2fc00000000000000000

Bundle Cargo crates for use with macOS/iOS in Xcode

cargo-cocoapods - Build Rust code for Xcode integration Installing cargo install cargo-cocoapods You'll also need to install all the toolchains you i

A cw20 based DAO.

cw20 DAO NOT PRODUCTION READY This builds on cw3-flex-multisig and instead has the voting set maintained by cw20 tokens. This allows for the cw20s to

A cw20 based DAO.

cw20 DAO NOT PRODUCTION READY This builds on cw3-flex-multisig and instead has the voting set maintained by cw20 tokens. This allows for the cw20s to

A simple and convenient way to bundle owned data with a borrowing type.

A simple and convenient way to bundle owned data with a borrowing type. The Problem One of the main selling points of Rust is its borrow checker, whic

Build, bundle & ship your Rust WASM application to the web.

Trunk Build, bundle & ship your Rust WASM application to the web. ”Pack your things, we’re going on an adventure!” ~ Ferris Trunk is a WASM web applic

Examples of cw20 usage, extracted from cw-plus, maintained by the community

CosmWasm Tokens This is a collection of cw20-related contracts extracted from cw-plus. These serve as examples of what is possible to build and as sta

Bundle Shiny Applications for serving with WebR.

WebR Bundle A tool for bundling Shiny Apps with WebAssembly. R Package Installation Install the package from GitHub: # install.packages("pak") pak::pa

Bundle Shiny Applications for serving with WebR.

WebR Bundle A tool for bundling Shiny Apps with WebAssembly. R Package Installation Install the package from GitHub: # install.packages("pak") pak::pa

Substrate NFT !ink smart contract base

Substrate !ink NFT simple implementation This is a simple working version of base NFT smart contract written using latest (as of this date) !ink 3.0.0

Showing how to deploy a Terra smart contract using Chainlink Data Feeds

Chainlink Terra Developing Requirements This demo requires the following components: Rust: rustup with cargo 1.44.1+. rustc and cargo 1.44.1+. Install

Owner
Peter Kim
currently exploring the web, previously cofounder of SBLY.com
Peter Kim
Bundle Shiny Applications for serving with WebR.

WebR Bundle A tool for bundling Shiny Apps with WebAssembly. R Package Installation Install the package from GitHub: # install.packages("pak") pak::pa

Andrés Felipe Quintero Moreano 12 Oct 5, 2023
Bundle Shiny Applications for serving with WebR.

WebR Bundle A tool for bundling Shiny Apps with WebAssembly. R Package Installation Install the package from GitHub: # install.packages("pak") pak::pa

Appsilon 14 Oct 29, 2023
CosmWasm Contract for Dynamic CW721 NFTs on Terra

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

null 9 Sep 12, 2022
Cosmwasm in Cosmwasm through ComposableFi/cosmwasm-vm

Cosmwasmception Running Fastest way to run this contract would be through our vm. But note that our vm runs an already built version this contract, so

Abdullah Eryuzlu 3 Oct 5, 2022
CosmWasm/Sylvia counting contract w/ IBC enabled (Cosmos, Rust, CosmWasm, Sylvia)

CosmWasm/Sylvia counting contract w/ IBC enabled (Cosmos, Rust, CosmWasm, Sylvia) This repository contains counting contract created during the study

Alex Cryp 3 Nov 13, 2023
Helper library for interacting with Terra assets (SDK coins and CW20 tokens)

terra-asset Helpers for interacting with Terra assets, including native coins and CW20 tokens Usage This crate contains two struct types: AssetInfo st

larry 9 Jan 3, 2022
A simple example demonstrating cross-contract calls in CosmWasm smart contracts

Cross-contract calls This tutorial demonstrates cross-contract calls with CosmWasm v1. Overview An end user calls the reservation contract to register

csli Tools 3 Sep 12, 2022
This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address

Token Vesting This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address. Instan

yys 7 Oct 7, 2022
CosmWasm-Examples is a collection of example contracts and applications built using the CosmWasm framework

CosmWasm-Examples is a collection of example contracts and applications built using the CosmWasm framework. CosmWasm is a secure and efficient smart contract platform designed specifically for the Cosmos ecosystem.

Vitalii Tsyhulov 20 Jun 9, 2023
An extended CW721 (v0.9.2) with update, burn, freeze, set_minter functionalities.

Extended CW721 Extended CW721 NFT with update, burn, freeze, set_minter functionalities

null 12 Oct 1, 2022