{"id":23679018,"url":"https://github.com/uxdprotocol/uxd-cw20-token","last_synced_at":"2025-06-24T04:06:14.792Z","repository":{"id":103609429,"uuid":"511199815","full_name":"UXDProtocol/uxd-cw20-token","owner":"UXDProtocol","description":"Contract for UXD's cw20-compatible token. Called and instantiated by uxd-contract","archived":false,"fork":false,"pushed_at":"2022-08-02T09:28:09.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-21T17:11:28.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UXDProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-06T15:48:50.000Z","updated_at":"2022-08-02T09:19:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c5657a6-ca48-43af-9e73-e1136266dfc5","html_url":"https://github.com/UXDProtocol/uxd-cw20-token","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UXDProtocol/uxd-cw20-token","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UXDProtocol%2Fuxd-cw20-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UXDProtocol%2Fuxd-cw20-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UXDProtocol%2Fuxd-cw20-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UXDProtocol%2Fuxd-cw20-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UXDProtocol","download_url":"https://codeload.github.com/UXDProtocol/uxd-cw20-token/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UXDProtocol%2Fuxd-cw20-token/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601480,"owners_count":23183092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T16:59:55.606Z","updated_at":"2025-06-24T04:06:14.782Z","avatar_url":"https://github.com/UXDProtocol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UXD cw20-compatible token contract\n\n- will be instantiated and called by uxd-contract (main contract)\n- base on cw20-base. in fact calling delegating to cw20-base for all but instantiate\n- built using cw-template\n\n# CW20 Basic\n\nThis is a basic implementation of a cw20 contract. It implements\nthe [CW20 spec](https://github.com/CosmWasm/cw-plus/blob/main/packages/cw20/README.md) and is designed to\nbe deployed as is, or imported into other contracts to easily build\ncw20-compatible tokens with custom logic.\n\nImplements:\n\n- [x] CW20 Base\n- [x] Mintable extension\n- [x] Allowances extension\n\n## Running this contract\n\nYou will need Rust 1.44.1+ with `wasm32-unknown-unknown` target installed.\n\nYou can run unit tests on this via: \n\n`cargo test`\n\nOnce you are happy with the content, you can compile it to wasm via:\n\n```\nRUSTFLAGS='-C link-arg=-s' cargo wasm\ncp ../../target/wasm32-unknown-unknown/release/cw20_base.wasm .\nls -l cw20_base.wasm\nsha256sum cw20_base.wasm\n```\n\nOr for a production-ready (optimized) build, run a build command in the\nthe repository root: https://github.com/CosmWasm/cw-plus#compiling.\n\n## Importing this contract\n\nYou can also import much of the logic of this contract to build another\nERC20-contract, such as a bonding curve, overiding or extending what you\nneed.\n\nBasically, you just need to write your handle function and import \n`cw20_base::contract::handle_transfer`, etc and dispatch to them.\nThis allows you to use custom `ExecuteMsg` and `QueryMsg` with your additional\ncalls, but then use the underlying implementation for the standard cw20\nmessages you want to support. The same with `QueryMsg`. You *could* reuse `instantiate`\nas it, but it is likely you will want to change it. And it is rather simple.\n\nLook at [`cw20-staking`](https://github.com/CosmWasm/cw-tokens/tree/main/contracts/cw20-staking) for an example of how to \"inherit\"\nall this token functionality and combine it with custom logic.\n\n\n\n## CosmWasm Starter Pack\n\nThis is a template to build smart contracts in Rust to run inside a\n[Cosmos SDK](https://github.com/cosmos/cosmos-sdk) module on all chains that enable it.\nTo understand the framework better, please read the overview in the\n[cosmwasm repo](https://github.com/CosmWasm/cosmwasm/blob/master/README.md),\nand dig into the [cosmwasm docs](https://www.cosmwasm.com).\nThis assumes you understand the theory and just want to get coding.\n\n## Creating a new repo from template\n\nAssuming you have a recent version of rust and cargo (v1.58.1+) installed\n(via [rustup](https://rustup.rs/)),\nthen the following should get you a new repo to start a contract:\n\nInstall [cargo-generate](https://github.com/ashleygwilliams/cargo-generate) and cargo-run-script.\nUnless you did that before, run this line now:\n\n```sh\ncargo install cargo-generate --features vendored-openssl\ncargo install cargo-run-script\n```\n\nNow, use it to create your new contract.\nGo to the folder in which you want to place it and run:\n\n\n**Latest: 1.0.0-beta6**\n\n```sh\ncargo generate --git https://github.com/CosmWasm/cw-template.git --name PROJECT_NAME\n````\n\n**Older Version**\n\nPass version as branch flag:\n\n```sh\ncargo generate --git https://github.com/CosmWasm/cw-template.git --branch \u003cversion\u003e --name PROJECT_NAME\n````\n\nExample:\n\n```sh\ncargo generate --git https://github.com/CosmWasm/cw-template.git --branch 0.16 --name PROJECT_NAME\n```\n\nYou will now have a new folder called `PROJECT_NAME` (I hope you changed that to something else)\ncontaining a simple working contract and build system that you can customize.\n\n## Create a Repo\n\nAfter generating, you have a initialized local git repo, but no commits, and no remote.\nGo to a server (eg. github) and create a new upstream repo (called `YOUR-GIT-URL` below).\nThen run the following:\n\n```sh\n# this is needed to create a valid Cargo.lock file (see below)\ncargo check\ngit branch -M main\ngit add .\ngit commit -m 'Initial Commit'\ngit remote add origin YOUR-GIT-URL\ngit push -u origin main\n```\n\n## CI Support\n\nWe have template configurations for both [GitHub Actions](.github/workflows/Basic.yml)\nand [Circle CI](.circleci/config.yml) in the generated project, so you can\nget up and running with CI right away.\n\nOne note is that the CI runs all `cargo` commands\nwith `--locked` to ensure it uses the exact same versions as you have locally. This also means\nyou must have an up-to-date `Cargo.lock` file, which is not auto-generated.\nThe first time you set up the project (or after adding any dep), you should ensure the\n`Cargo.lock` file is updated, so the CI will test properly. This can be done simply by\nrunning `cargo check` or `cargo unit-test`.\n\n## Using your project\n\nOnce you have your custom repo, you should check out [Developing](./Developing.md) to explain\nmore on how to run tests and develop code. Or go through the\n[online tutorial](https://docs.cosmwasm.com/) to get a better feel\nof how to develop.\n\n[Publishing](./Publishing.md) contains useful information on how to publish your contract\nto the world, once you are ready to deploy it on a running blockchain. And\n[Importing](./Importing.md) contains information about pulling in other contracts or crates\nthat have been published.\n\nPlease replace this README file with information about your specific project. You can keep\nthe `Developing.md` and `Publishing.md` files as useful referenced, but please set some\nproper description in the README.\n\n## Gitpod integration\n\n[Gitpod](https://www.gitpod.io/) container-based development platform will be enabled on your project by default.\n\nWorkspace contains:\n - **rust**: for builds\n - [wasmd](https://github.com/CosmWasm/wasmd): for local node setup and client\n - **jq**: shell JSON manipulation tool\n\nFollow [Gitpod Getting Started](https://www.gitpod.io/docs/getting-started) and launch your workspace.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxdprotocol%2Fuxd-cw20-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuxdprotocol%2Fuxd-cw20-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxdprotocol%2Fuxd-cw20-token/lists"}