Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Latest commit

 

History

History

terraswap_token

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

TerraSwap Token

CW20 Basic with expanded name and symbol range

This is a basic implementation of a cw20 contract. It implements the CW20 spec and is designed to be deloyed as is, or imported into other contracts to easily build cw20-compatible tokens with custom logic.

Implements:

  • CW20 Base
  • Mintable extension
  • Allowances extension

Running this contract

You will need Rust 1.44.1+ with wasm32-unknown-unknown target installed.

You can run unit tests on this via:

cargo test

Once you are happy with the content, you can compile it to wasm via:

RUSTFLAGS='-C link-arg=-s' cargo wasm
cp ../../target/wasm32-unknown-unknown/release/cw20_base.wasm .
ls -l cw20_base.wasm
sha256sum cw20_base.wasm

Or for a production-ready (compressed) build, run the following from the repository root:

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/workspace-optimizer:0.12.6

The optimized contracts are generated in the artifacts/ directory.