2 stable releases
2.3.0 | Oct 18, 2023 |
---|---|
2.2.0 | Jul 9, 2023 |
2.1.5 |
|
2.1.0 |
|
#2799 in Magic Beans
24 downloads per month
Used in 4 crates
(via cw-vesting)
42KB
725 lines
Stake Tracker
This is a CosmWasm package for tracking the staked balance of a smart contract.
The StakeTracker
type here exposes a couple methods with the on_
prefix. These should be called whenever the contract performs an
action with x/staking. For example, when the contract delegates
tokens, it should call the on_delegate
method to register that. Not
calling the method will cause the package to incorrectly track staked
values.
See
cw-vesting
for an example of integrating this package into a smart contract and a
discussion of how to handle slash events.
Dependencies
~3.5–5.5MB
~117K SLoC