Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External staking rewards #182

Merged
merged 50 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9ba7f20
add and remove hooks
ben2x4 Feb 17, 2022
f188ae0
hook file
ben2x4 Feb 17, 2022
305d5ea
query hooks
ben2x4 Feb 17, 2022
bbd8fa9
admin -> owner
ben2x4 Feb 17, 2022
9fa6cf8
add owner and manager roles
ben2x4 Feb 17, 2022
b28b21d
owner and manager can update hooks
ben2x4 Feb 17, 2022
a45afc5
clippy warnings
ben2x4 Feb 17, 2022
2350d50
cargo fmt
ben2x4 Feb 17, 2022
7ada20d
cargo schema
ben2x4 Feb 17, 2022
5ba4102
cargo fmt
ben2x4 Feb 17, 2022
7863360
properly wrap hooks
ben2x4 Feb 18, 2022
f593eb1
update cargo for new file
ben2x4 Feb 18, 2022
1440368
wip
ben2x4 Feb 19, 2022
eb46c66
full contract no tests
ben2x4 Feb 22, 2022
fbd7408
cargo fix
ben2x4 Feb 22, 2022
bce3ba5
handle update rewards error
ben2x4 Feb 22, 2022
dc26797
native reward tests
ben2x4 Feb 25, 2022
f9a7d23
cw20 reward tests
ben2x4 Feb 25, 2022
9a3b174
owner and manger dual admins
ben2x4 Feb 25, 2022
1ca9963
test for edge cases when adding funds
ben2x4 Feb 26, 2022
97e9e37
import library feature stake-cw20
ben2x4 Feb 26, 2022
d11ca36
cargo schema
ben2x4 Feb 27, 2022
1d6e0d3
add response schemas
ben2x4 Feb 27, 2022
afdd8aa
test for insantiating rewards before any tokens are staked
ben2x4 Feb 28, 2022
f020bda
add debugging info to get pending rewards response
ben2x4 Feb 28, 2022
a83dcab
return error if rewards not claimable
ben2x4 Mar 2, 2022
b5c9bc1
scale before dividing and do computations in u256
ben2x4 Mar 5, 2022
eb76f95
lint: run cargo fmt + clippy
vernonjohnson Mar 13, 2022
670cb4c
rf: cleanup staking rewards contract
vernonjohnson Mar 14, 2022
d5eb1f9
fix: contract name
vernonjohnson Mar 14, 2022
5e72d72
fix: branch cleanup + fix multiplication overflow
vernonjohnson Mar 16, 2022
d71cce5
fix: add unwrap for add hook helper in tests
vernonjohnson Mar 16, 2022
3beb7af
fix: lint with clippy
vernonjohnson Mar 16, 2022
1ac9459
Merge pull request #192 from DA0-DA0/vt-staking-rewards-revisions
vernonjohnson Mar 17, 2022
2cdab1a
merge-main
ben2x4 Mar 23, 2022
3d8a109
addr -> string
ben2x4 Mar 23, 2022
e3b9b6f
tests break when rewards are over
ben2x4 Apr 4, 2022
4616d3e
fix broken tests
ben2x4 Apr 4, 2022
5a5e51f
add attributes to instatiation
ben2x4 Apr 5, 2022
d16796b
switch strings to addresses in msgs
ben2x4 Apr 5, 2022
4b0c39f
use zero as default
ben2x4 Apr 5, 2022
c8bee72
better addr validation
ben2x4 Apr 5, 2022
5ce9c4a
better fund validationf
ben2x4 Apr 5, 2022
252a305
respond to comment, better divide by zero validation
ben2x4 Apr 5, 2022
b83b83a
clean
ben2x4 Apr 5, 2022
08cdc98
remove debugging prints
ben2x4 Apr 5, 2022
4229113
add reward duration to instantiation msg
ben2x4 Apr 14, 2022
1966e18
verify contract is a staking contract at instantiation
ben2x4 Apr 14, 2022
cff1c9c
cargo fmt
ben2x4 Apr 14, 2022
3caf09e
cargo schema
ben2x4 Apr 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ incremental = false
codegen-units = 1
incremental = false


[profile.release.package.stake-cw20-external-rewards]
codegen-units = 1
incremental = false

[profile.release]
opt-level = 3
debug = false
Expand Down
4 changes: 4 additions & 0 deletions contracts/stake-cw20-external-rewards/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
Loading