#cw20 #cosmwasm #dao

stake-cw20-external-rewards

CW20 token that can be staked and staked balance can be queried at any height

1 unstable release

0.2.6 Jul 3, 2023

#4 in #cw20

Download history 41/week @ 2024-12-02 83/week @ 2024-12-09 46/week @ 2024-12-16 46/week @ 2024-12-23 11/week @ 2024-12-30 31/week @ 2025-01-06 38/week @ 2025-01-13 51/week @ 2025-01-20 22/week @ 2025-01-27 60/week @ 2025-02-03 54/week @ 2025-02-10 59/week @ 2025-02-17 111/week @ 2025-02-24 31/week @ 2025-03-03 45/week @ 2025-03-10 55/week @ 2025-03-17

245 downloads per month
Used in cw20-stake-external-rewar…

Apache-2.0

82KB
2K SLoC

Stake CW20

This is a basic implementation of a cw20 staking contract. Staked tokens can be unbonded with a configurable unbonding period. Staked balances can be queried at any arbitrary height by external contracts.

Running this contract

You will need Rust 1.58.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/stake_cw20.wasm .
ls -l stake_cw20.wasm
sha256sum stake_cw20.wasm

Or for a production-ready (optimized) build, run a build command in the the repository root: https://github.com/CosmWasm/cw-plus#compiling.

Dependencies

~7.5MB
~161K SLoC