0g-chain/x/cdp/keeper
Derrick Lee f84a8b0be0
Add /cdp/totalPrincipal and /cdp/totalCollateral Endpoints (#1027)
* Add cdp/totals rest endpoint for aggregated principal and fees

* Add total collateral to aggregated cdp

* Add pagination

* Update totalPrincipal endpoint to use keeper GetTotalPrincipal

* Update documentation for queryGetTotalPrincipal

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>

* Remove unused AggregatedCDP types

* Make CDP type optional, return all if not provided

* add total collateral endpoint that efficient fetches collateral
for a types, only iterating cdps for types b, etc

* correctly and efficienlty filter for a single collateral type

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2021-10-23 13:09:59 -05:00
..
auctions_test.go Add collateral type to cdp (#629) 2020-08-21 15:42:46 -04:00
auctions.go Add collateral type to cdp (#629) 2020-08-21 15:42:46 -04:00
cdp_test.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
cdp.go Prevent panic-causing param values (#875) 2021-03-15 08:44:23 -06:00
deposit_test.go Add collateral type to cdp (#629) 2020-08-21 15:42:46 -04:00
deposit.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
draw_test.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
draw.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
hooks.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
integration_test.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
interest_test.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
interest.go Call incentive hooks before CDPs are modified in begin blocker (#897) 2021-05-28 14:32:19 +01:00
keeper_bench_test.go Add collateral type to cdp (#629) 2020-08-21 15:42:46 -04:00
keeper_test.go Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
keeper.go Swap users accumulate rewards (#950) 2021-07-13 13:35:02 +01:00
params.go Querier improvements: CDP and Auction priority 1 queries (#644) 2020-09-16 20:45:10 -04:00
querier_test.go Add /cdp/totalPrincipal and /cdp/totalCollateral Endpoints (#1027) 2021-10-23 13:09:59 -05:00
querier.go Add /cdp/totalPrincipal and /cdp/totalCollateral Endpoints (#1027) 2021-10-23 13:09:59 -05:00
seize_test.go fix: enforce max number of liquidations in cdp begin blocker (#849) 2021-02-23 12:39:39 -07:00
seize.go fix: enforce max number of liquidations in cdp begin blocker (#849) 2021-02-23 12:39:39 -07:00