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

Evaluator Rewards #47

Merged
merged 27 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4a7fde5
feat(214): evaluator rewards test skeleton
JuaniRios Jun 27, 2023
4e7629d
feat(214): 2 new fields on `ProjectMetadata`:
JuaniRios Jun 27, 2023
955ebea
feat(214): Finished project now accepts empty remainder buys, and so …
JuaniRios Jun 27, 2023
caa1b53
feat(214): evaluator rewards full test written. Actual implementation…
JuaniRios Jul 3, 2023
fb34cc8
feat(214): bids at higher average price are taken at the average. Tes…
JuaniRios Jul 3, 2023
a0e74aa
wip(214): tests failing
JuaniRios Jul 4, 2023
4384b1e
wip(214)
JuaniRios Jul 5, 2023
aebd8d6
feat(214): cleanup field to keep track of success or failure remainin…
JuaniRios Jul 5, 2023
8c17c9e
wip(214): evaluation unbond and automatic cleanup function
JuaniRios Jul 5, 2023
a7bec11
wip(214): evaluation reward and unbonding generic impl
JuaniRios Jul 6, 2023
b200673
wip(214)
JuaniRios Jul 7, 2023
c6ba18e
feat(214): cleanup state machine basic implementation
JuaniRios Jul 11, 2023
8f04bbf
wip
JuaniRios Jul 11, 2023
6950a98
feat(214): Fixed most tests. Unbonding tests are now failing due to n…
JuaniRios Jul 12, 2023
aee2032
feat(214): fix failing funding of reward test
JuaniRios Jul 13, 2023
a16dcbc
feat(214): fix failing funding of reward test
JuaniRios Jul 13, 2023
58705c5
chore(214): remove warnings
JuaniRios Jul 13, 2023
9c24c8b
chore(214): cargo fmt
JuaniRios Jul 13, 2023
57bc62d
wip: save
JuaniRios Jul 14, 2023
2bdd3c2
feat(214): ProjectDetails changed. Evaluation total bond now stored i…
JuaniRios Jul 18, 2023
c3ad9e1
feat(214): bid refunds on failure due to candle end and ct soldout im…
JuaniRios Jul 19, 2023
2c3e0c5
feat(214): tried to add final price check on new_with for CommunityFu…
JuaniRios Jul 19, 2023
b7d73ce
fix(214): reflecting BidInfoFilter changes on tests
JuaniRios Jul 19, 2023
1b525ae
chore(214): fix warnings
JuaniRios Jul 21, 2023
4de9946
fix(214): broken auction unbond test fixed
JuaniRios Jul 21, 2023
b5731b1
chore(214): cargo fmt
JuaniRios Jul 21, 2023
a71195f
chore(214): unsafe math fix
JuaniRios Jul 21, 2023
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
28 changes: 19 additions & 9 deletions polimec-skeleton/Cargo.lock

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

2 changes: 2 additions & 0 deletions polimec-skeleton/pallets/funding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parity-scale-codec = { version = "3.0.0", features = [
scale-info = { version = "2.5.0", default-features = false, features = [
"derive",
] }
itertools = { version = "0.11.0", default-features = false }

# Substrate dependencies
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" }
Expand All @@ -40,6 +41,7 @@ pallet-credentials = { path = "../credentials", default-features = false }
[features]
default = ["std"]
std = [
"itertools/use_std",
"parity-scale-codec/std",
"scale-info/std",
"sp-std/std",
Expand Down
4 changes: 2 additions & 2 deletions polimec-skeleton/pallets/funding/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ benchmarks! {
verify {
let project_auctions = Bids::<T>::get(project_id, bidder_1);
assert_eq!(project_auctions.len(), 1);
assert_eq!(project_auctions[0].ct_amount, 10_000_u64.into());
assert_eq!(project_auctions[0].ct_usd_price, T::Price::saturating_from_integer(15));
assert_eq!(project_auctions[0].original_ct_amount, 10_000_u64.into());
assert_eq!(project_auctions[0].original_ct_usd_price, T::Price::saturating_from_integer(15));
let events = PolimecSystem::<T>::events();
assert!(events.iter().any(|r| {
let expected_event: <T as Config>::RuntimeEvent = Event::<T>::Bid {
Expand Down
Loading