Skip to content
Merged

Dev #74

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
7928088
add deploy workflow
lachlanglen Apr 29, 2024
c7569ec
fix workflows location
lachlanglen Apr 29, 2024
1087fd5
fix ec2 directory path
lachlanglen Apr 29, 2024
4bd0940
add workflow debug logs
lachlanglen Apr 29, 2024
648e5b8
change env. to vars.
lachlanglen Apr 29, 2024
5f6c725
change all env. to vars.
lachlanglen Apr 29, 2024
152cb35
add appspec
lachlanglen Apr 29, 2024
f740c64
update workflow to use codedeploy
lachlanglen Apr 30, 2024
757f774
remove whitespace in deploy workflow
lachlanglen Apr 30, 2024
5eff58c
update after_install script
lachlanglen Apr 30, 2024
160af1a
set correct file permissions in after_install.sh
lachlanglen Apr 30, 2024
9661137
add timetstamp to after_install logs
lachlanglen Apr 30, 2024
a811354
add log to after_install
lachlanglen Apr 30, 2024
88a8cd3
fix permissions settings in after_install
lachlanglen Apr 30, 2024
4715bc6
add elastic IP to allowed hosts
lachlanglen Apr 30, 2024
948a52e
remove permissions logging from after_install
lachlanglen Apr 30, 2024
42a976f
update nginx group permissions
lachlanglen Apr 30, 2024
fea902f
add poetry install to after_install.sh
lachlanglen Apr 30, 2024
3d2fbc0
remove old code from after_install
lachlanglen Apr 30, 2024
5f06c5d
update donation admin to fix n+1 query issue
lachlanglen Apr 30, 2024
e2ad39c
use tz aware datetime
lachlanglen Apr 30, 2024
b9dddc5
specify start block for debugging
lachlanglen Apr 30, 2024
1221100
trigger redeployment
lachlanglen May 1, 2024
8aeb330
fix settings.py for local celery
lachlanglen May 1, 2024
1c69d33
refactor batch function, edit model
Prometheo May 2, 2024
a04c04f
correct start block
Prometheo May 2, 2024
60801ac
feat: make donation entries update_or_create
Prometheo May 3, 2024
d03c11a
update start block for debugging
lachlanglen May 3, 2024
a615839
Merge pull request #20 from PotLock/refactor-batch-dpnation
lachlanglen May 3, 2024
5f66bc4
debug logs for after_install migration check
lachlanglen May 3, 2024
7024a41
migration check debugging
lachlanglen May 3, 2024
002d94b
load env vars in after_install
lachlanglen May 3, 2024
6d4e576
remove old code
lachlanglen May 3, 2024
b05e457
display donation id on admin
lachlanglen May 3, 2024
544e2c0
fix donation id on admin dashboard
lachlanglen May 3, 2024
6337caa
fix typo in after_install
lachlanglen May 3, 2024
5647bb2
fix TokenHistoricalPrice price_usd null issue
lachlanglen May 3, 2024
9550888
add more debug logs
lachlanglen May 3, 2024
567292b
change debug to info
lachlanglen May 3, 2024
dce6e72
fix typo
lachlanglen May 3, 2024
680d5a0
use logger.debug
lachlanglen May 3, 2024
6ce7d63
revert to logger.info
lachlanglen May 3, 2024
e13d469
fix coingecko api error handling
lachlanglen May 3, 2024
34b86d5
add error test
lachlanglen May 3, 2024
e54861a
remove ERROR test
lachlanglen May 3, 2024
c8583c1
save correct timestamp on TokenHistoricalPrice record
lachlanglen May 3, 2024
03559c7
get start block from cache
lachlanglen May 3, 2024
a226c70
fix None to decimal conversion bug
lachlanglen May 6, 2024
a75da81
add action_result & type unique_together constraint on Activity
lachlanglen May 6, 2024
da4ca37
create or update activity even if donation already exists
lachlanglen May 6, 2024
077090d
await aupdate_or_create Activity call
lachlanglen May 6, 2024
c4afcf1
remove manual start block setting
lachlanglen May 6, 2024
739df78
restart indexer at 105_159_364
lachlanglen May 6, 2024
9ecc002
restart indexer at 105,363,093
lachlanglen May 6, 2024
1fb42f7
restart indexer at 105534694
lachlanglen May 6, 2024
0a2de4b
restart indexer from current block height
lachlanglen May 6, 2024
649e9dc
add celery recurring task for account totals
lachlanglen May 6, 2024
51cb828
update after_install to include celery beat service
lachlanglen May 6, 2024
f6883e4
use logger in update_account_statistics
lachlanglen May 6, 2024
39dd68d
add jobs logger
lachlanglen May 6, 2024
04a4619
debugging account stats task
lachlanglen May 6, 2024
02f6157
fix typo in account stats job
lachlanglen May 6, 2024
b1d07c4
remove transaction.atomic in account stats task
lachlanglen May 6, 2024
d803716
update after_install and celery scripts to handle beat start/stop
lachlanglen May 7, 2024
0583635
remove excess logs for update_account_statistics job
lachlanglen May 7, 2024
c5df889
add celery-beat to restart in after_install
lachlanglen May 7, 2024
2c243f6
remove celery-beat from after_install
lachlanglen May 7, 2024
048ea99
move fetch_usd_prices to Donation model method
lachlanglen May 7, 2024
de07644
add fetch_usd_prices to celery beat schedule
lachlanglen May 7, 2024
96c4afe
add celery-beat stop/restart to after_install
lachlanglen May 7, 2024
d1180aa
make fetch_usd_prices task synchronous
lachlanglen May 7, 2024
92c1915
use sync db methods in Donation model methods
lachlanglen May 7, 2024
d0f384d
allow None chef_fee on Donation
lachlanglen May 7, 2024
1e52096
add migration to set chef_fee to None for existing donations
lachlanglen May 7, 2024
58d560c
fix int None issue in fetch_usd_prices
lachlanglen May 7, 2024
12dc03b
return decimal from Token.format_price
lachlanglen May 7, 2024
3ca9a75
remove redundant log from fetch_usd_prices
lachlanglen May 7, 2024
2d0ddaf
fix decimal * flot issue & restart indexer from block 105_854_538
lachlanglen May 8, 2024
27ac54c
update usd prices job to check for no protocol_fee_usd value
lachlanglen May 8, 2024
d296674
remove manual start block setting
lachlanglen May 8, 2024
4f1ce84
fix donations query in fetch_usd_prices
lachlanglen May 8, 2024
e9eb35a
Backfill compatible (#23)
Prometheo May 9, 2024
a7de2d4
restart at block 106388588
lachlanglen May 10, 2024
1959ca0
restart at block 106388588
lachlanglen May 10, 2024
d653498
restart indexer at 106431915
lachlanglen May 10, 2024
aa6a467
restart at 106435734
lachlanglen May 10, 2024
875bdb7
add pattern matching for pot subaccount
lachlanglen May 13, 2024
fd0e2d2
add cors headers & localhost support
lachlanglen May 15, 2024
137e348
fix virtual env usage in after_install.sh
lachlanglen May 15, 2024
466c093
update after_install.sh
lachlanglen May 15, 2024
7d83b98
revert after_install
lachlanglen May 20, 2024
7b8f79a
update start block to 110046700
lachlanglen May 20, 2024
b8f87aa
avoid logging WorkerLostErrors to Sentry
lachlanglen May 20, 2024
fa5c4bc
update start block to 111941200
lachlanglen May 20, 2024
e83dda8
update start block to 112034320
lachlanglen May 20, 2024
f61cc0d
update start block to 112158850
lachlanglen May 20, 2024
eaf0cf3
update start block to 112461673
lachlanglen May 20, 2024
c2cc367
fix display of admins & wl deployers in PotFactory detail (admin)
lachlanglen May 20, 2024
6456274
update verbose name plurals
lachlanglen May 20, 2024
eeeb00e
add Pot custom form
lachlanglen May 20, 2024
898a512
add admin for PotApplicationReview
lachlanglen May 20, 2024
16e0468
comment out worker_shutdown_handler
lachlanglen May 20, 2024
fb4614f
fix tuple error when creating pot, update start block to 112961757 to…
lachlanglen May 21, 2024
e160c50
update start block to 112920268
lachlanglen May 22, 2024
cb8ed9b
update start block to 113030298
lachlanglen May 22, 2024
3e4678b
update start block to 113042335
lachlanglen May 22, 2024
fcd90b8
update start block to 113058915
lachlanglen May 22, 2024
12e0db4
update start block to 113066329
lachlanglen May 22, 2024
6307a89
update start block to 113155075
lachlanglen May 22, 2024
19e1916
update start block to 113284717
lachlanglen May 22, 2024
93db4c0
update start block to 113455493
lachlanglen May 22, 2024
ee1827d
update start block to 113613466
lachlanglen May 22, 2024
ff92358
update start block to 113614770
lachlanglen May 22, 2024
fc024b9
update start block to 114027103
lachlanglen May 22, 2024
a7f097a
update start block to 114037338
lachlanglen May 22, 2024
c827597
update start block to 114056625
lachlanglen May 22, 2024
ba8c3e9
handle None pot application & update start block
lachlanglen May 23, 2024
48b20ec
use coingecko pro api
lachlanglen May 23, 2024
c7274aa
choose LakeConfig network based on PL_ENVIRONMENT
lachlanglen May 29, 2024
a8fd173
Testnet -> Dev (#26)
lachlanglen May 31, 2024
a95d83e
add debug logs
lachlanglen May 31, 2024
cd2f0b2
add logs
lachlanglen May 31, 2024
7d770ab
fix appspec destination for dev
lachlanglen May 31, 2024
1d81df1
clean up destination directory before installing in deployment (only …
lachlanglen May 31, 2024
41217ed
add clean_destination scripts
lachlanglen May 31, 2024
0bf1a26
remove BeforeInstall clean destination step
lachlanglen Jun 1, 2024
224125b
Testnet (#27)
lachlanglen Jun 4, 2024
2e159f9
Testnet (#28)
lachlanglen Jun 4, 2024
4d2fdb7
handle None new pot owner
lachlanglen Jun 4, 2024
7adb8ce
fix owner_id in new pot
lachlanglen Jun 4, 2024
79eb67a
fix keyerrors in pots admin
lachlanglen Jun 4, 2024
2358477
add swagger (drf-spectacular)
lachlanglen Jun 4, 2024
2c4737f
add api response examples
lachlanglen Jun 5, 2024
e445440
add social profile data indexing (#31)
lachlanglen Jun 6, 2024
5b7c576
Testnet (#30)
lachlanglen Jun 6, 2024
2ea615e
add near_social_profile_data to accounts admin
lachlanglen Jun 6, 2024
cf89c72
add fetchsocialprofiledata command
lachlanglen Jun 6, 2024
f2ca3d0
add fetch_near_social_profile_data_async
lachlanglen Jun 6, 2024
1ebd577
update SIMPLE_ACCOUNT_EXAMPLE in OpenAPI schema to include near_socia…
lachlanglen Jun 6, 2024
74e98ad
fix pot pattern matching
lachlanglen Jun 7, 2024
fdc27c5
fix fastnear rpc url
lachlanglen Jun 7, 2024
bc1fcea
fix async error in handle_social_profile_update
lachlanglen Jun 7, 2024
d854ff3
allow write admin actions for Accounts & Activities
lachlanglen Jun 10, 2024
ec06d1e
add autocomplete field for applicant
lachlanglen Jun 10, 2024
1c6be16
add application applicant id to admin
lachlanglen Jun 10, 2024
c8e0c6c
add application autocomplete field to PotApplicationReviewAdmin
lachlanglen Jun 10, 2024
688d013
update PotApplicationAdmin
lachlanglen Jun 10, 2024
e489488
update PotApplication __str__
lachlanglen Jun 10, 2024
51b257b
fix bad queries in admin
lachlanglen Jun 10, 2024
84c3559
add reviewer autocomplete
lachlanglen Jun 10, 2024
c0c36f0
add autocomplete for activities admin
lachlanglen Jun 10, 2024
13769f4
add pot__id to Donation admin list filter
lachlanglen Jun 10, 2024
981bae7
switch order of handle_protocol_fee_callback and donate handlers
lachlanglen Jun 10, 2024
ae8a241
add debug logs for pot donations
lachlanglen Jun 10, 2024
1d88f43
remove use of deprecated create_defaults in new pot donation
lachlanglen Jun 10, 2024
db66d5f
rework donations handling
lachlanglen Jun 11, 2024
7efe70a
fix unsupported operand type error
lachlanglen Jun 11, 2024
264cf4b
fix operand issue again
lachlanglen Jun 11, 2024
6d48589
update donation handler
lachlanglen Jun 11, 2024
148707d
add near social profile data schema
lachlanglen Jun 12, 2024
237df53
fix Donation aupdate_or_create query to include pot
lachlanglen Jun 13, 2024
66a0ffe
add populatedata script
lachlanglen Jun 14, 2024
b16658c
add donations_received & donations_sent endpoints
lachlanglen Jun 14, 2024
1cb8ca1
fix caching
lachlanglen Jun 14, 2024
182732e
update readme
lachlanglen Jun 14, 2024
6ff9be3
populate lists data
lachlanglen Jun 14, 2024
a6ed924
add pot_applications endpoint for accounts
lachlanglen Jun 19, 2024
0f30d2b
fix readme typo
lachlanglen Jun 19, 2024
c3936a4
add related pot record to PotApplicationSerializer
lachlanglen Jun 19, 2024
0bec9a1
add cache back in
lachlanglen Jun 19, 2024
03fdf76
add pagination to openAPI schema
lachlanglen Jun 19, 2024
2eb9376
fix api schema pagination
lachlanglen Jun 19, 2024
7fba810
add payouts for acct endpoint; change ft FK to token
lachlanglen Jun 20, 2024
90c023b
fix remaining references to donation.ft
lachlanglen Jun 20, 2024
1876ea1
add related records to API responses
lachlanglen Jun 20, 2024
cbc8497
add update_pot_statistics task
lachlanglen Jun 20, 2024
a5aab5d
fetch usd prices for payouts
lachlanglen Jun 20, 2024
18b47fc
add amount_paid_usd to payout admin
lachlanglen Jun 20, 2024
935e1a1
add donate_contract_config endpoint
lachlanglen Jun 20, 2024
c9c9d77
fix paginated response schemas
lachlanglen Jun 21, 2024
6c21a4b
fix related records in OpenAPI schema
lachlanglen Jun 21, 2024
ed33537
add random_registration endpoint
lachlanglen Jun 24, 2024
8d6c562
fix price_data reference error
lachlanglen Jun 24, 2024
3f54b31
add debug log for payout processing paid_at: None issue
lachlanglen Jun 24, 2024
d2a0aad
fix project_id error in new pot application
lachlanglen Jun 24, 2024
974ace3
add debug logs for new list registrations
lachlanglen Jun 24, 2024
d0fa8b0
attempt to resolve None error on new Donation
lachlanglen Jun 24, 2024
b0258bb
fix error Failed to create/update donation: 'pot'
lachlanglen Jun 24, 2024
8669901
update populatedata command
lachlanglen Jun 24, 2024
202d77a
add break to null donation result handling
lachlanglen Jun 25, 2024
14bf197
add spotindexer
lachlanglen Jun 26, 2024
d55f392
add alpha.potlock.io to allowed hosts
lachlanglen Jun 26, 2024
af83d4f
add alpha.potlock.io to cors allowed origins
lachlanglen Jun 26, 2024
bb6f19f
Increase rate limit (#33)
Prometheo Jul 1, 2024
f99f868
filter registration by plCategories (#35)
Prometheo Jul 2, 2024
9dbe9a6
extend schema (#36)
Prometheo Jul 3, 2024
2f15218
add other tlds to cors whitelist (#38)
Prometheo Jul 4, 2024
7ed1403
add dev.local to cors allowed origins
lachlanglen Jul 8, 2024
12607cf
fix payout-setting error
lachlanglen Jul 8, 2024
897df4c
make PotPayout.paid_at nullable
lachlanglen Jul 8, 2024
0a0db66
fix sync db calls
lachlanglen Jul 8, 2024
b480a85
add awaits to async db methods
lachlanglen Jul 8, 2024
1556511
remove debug logs
lachlanglen Jul 8, 2024
d5871ea
add https://dev.local to cors allowed origins
lachlanglen Jul 8, 2024
1a19b17
Paginate by page (#39)
Prometheo Jul 8, 2024
9ea4d98
gunicorn graceful reload
lachlanglen Jul 8, 2024
c0008b3
fix after install script
lachlanglen Jul 8, 2024
ecd1ebe
add graceful gunicorn restart to testnet after install script
lachlanglen Jul 8, 2024
60a430a
avoid stopping services before migrations in after_install scripts
lachlanglen Jul 8, 2024
59dc627
Pagination limit and readme update (#40)
Prometheo Jul 9, 2024
6a07395
add https://dev.local back to cors allowed origins
lachlanglen Jul 10, 2024
0a78f1a
handle pot config update (#37)
Prometheo Jul 10, 2024
e52f2d9
New nadabot index (#34)
Prometheo Jul 15, 2024
f6745dc
add chains app & Chain model (#41)
lachlanglen Jul 15, 2024
fab5381
default to NEAR chain when creating new account
lachlanglen Jul 16, 2024
8040b0b
add debug logging to handler.py for memory usage & timing
lachlanglen Jul 17, 2024
d6d54d7
add additional debug logs for streamer processing time
lachlanglen Jul 17, 2024
80831d5
remove BlockHeight db write in cache_block_height
lachlanglen Jul 17, 2024
0bea04f
set cache key in asyncio task
lachlanglen Jul 17, 2024
b5f8cfe
remove excess debug logs
lachlanglen Jul 17, 2024
1da5fd2
add BlockHeight record update back
lachlanglen Jul 17, 2024
602fa99
add debug log
lachlanglen Jul 17, 2024
1efa815
create util function for common price fetching (#43)
Prometheo Jul 17, 2024
8b6f650
handle zero net amount and migration script (#45)
Prometheo Jul 18, 2024
da77c50
add coingecko_id to token admin
lachlanglen Jul 18, 2024
167bc4d
make coingecko_id nullable
lachlanglen Jul 18, 2024
2b57240
add blank=True to nullable Token fields for admin
lachlanglen Jul 18, 2024
b78e822
fix payouts paid_at not being set
lachlanglen Jul 22, 2024
5fc8134
save pot.all_paid_out
lachlanglen Jul 22, 2024
317d311
change account to id (#51)
Prometheo Jul 22, 2024
f713408
Whitelist deployer index (#54)
Prometheo Jul 23, 2024
a3e861b
api endpoint for pot factories (#55)
Prometheo Jul 23, 2024
0832134
get cooldown end while setting oayout (#58)
Prometheo Jul 23, 2024
f43324d
use default PageNumberPagination (#59)
lachlanglen Jul 23, 2024
ec9bb25
factory update configs (#60)
Prometheo Jul 25, 2024
8c2b249
remove caching of blockheight (just save in db) (#61)
lachlanglen Jul 25, 2024
9514e49
add asyncio handling of blockheight saving (#62)
lachlanglen Jul 25, 2024
d73321d
add block_timestamp to BlockHeightAdmin
lachlanglen Jul 25, 2024
aacaf29
add balnk field to nullable fields (#63)
Prometheo Jul 25, 2024
b789482
customize pagination size (#65)
Prometheo Jul 27, 2024
f5dc1f7
use id to assign response admin (#66)
Prometheo Jul 29, 2024
cf5ced4
pot config update (#64)
Prometheo Jul 29, 2024
8e4a8b0
get all list registrations for an account (#68)
Prometheo Jul 29, 2024
fdc3079
Fix payout challenge indexing (#67)
Prometheo Jul 29, 2024
d46d9a8
fix cooldown update in pot method (#69)
Prometheo Jul 29, 2024
8f00c7d
replace unserializable timestamp (#72)
Prometheo Jul 31, 2024
c5d69df
Merge branch 'main' into dev
lachlanglen Jul 31, 2024
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ media/

# Celery beat schedule file
celerybeat-schedule
dump.rdb

# Flask stuff:
instance/
Expand Down Expand Up @@ -99,7 +100,7 @@ poetry.lock
# dotenv
.env
.env.*

pyrightconfig.json
# virtualenv
.venv/
venv/
Expand Down Expand Up @@ -133,4 +134,4 @@ dmypy.json

# static

/static/
/static/
49 changes: 43 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@
- [Steps to run:](#steps-to-run)
- [Env vars example](#env-vars-example)
- [API Basics](#api-basics)
- [Base URL](#base-url)
- [Authorization](#authorization)
- [Error Responses](#error-responses)
- [Pagination](#pagination)
- [Base URL](#base-url)
- [Authorization](#authorization)
- [Error Responses](#error-responses)
- [Pagination](#pagination)
- [API Endpoints](#api-endpoints)
- [`Account` endpoints](#account-endpoints)
- [✅ Get all accounts: `GET /accounts` (paginated)](#-get-all-accounts-get-accounts-paginated)
- [✅ Get account by ID (address): `GET /accounts/{ACCOUNT_ID}`](#-get-account-by-id-address-get-accountsaccount_id)
- [✅ Get donations received for account: `GET /accounts/{ACCOUNT_ID}/donations_received` (paginated)](#-get-donations-received-for-account-get-accountsaccount_iddonations_received-paginated)
- [✅ Get donations sent for account: `GET /accounts/{ACCOUNT_ID}/donations_sent` (paginated)](#-get-donations-sent-for-account-get-accountsaccount_iddonations_sent-paginated)
- [✅ Get pots for account: `GET /accounts/{ACCOUNT_ID}/active_pots` (paginated)](#-get-pots-for-account-get-accountsaccount_idactive_pots-paginated)
- [✅ Get applications for account: `GET /accounts/{ACCOUNT_ID}/pot_applications` (paginated)](#-get-applications-for-account-get-accountsaccount_idpot_applications-paginated)
- [✅ Get registrations to lists by account: `GET /accounts/{ACCOUNT_ID}/list-registrations` (paginated)](#-get-registrations-to-lists-by-account-get-accountsaccount_idlist-registrations-paginated)
- [`List` endpoints](#list-endpoints)
- [✅ Get all lists: `GET /lists` (paginated)](#-get-all-lists-get-lists-paginated)
- [✅ Get list by ID: `GET /lists/{LIST_ID}` (paginated)](#-get-list-by-id-get-listslist_id-paginated)
- [✅ Get registrations for list: `GET /lists/{LIST_ID}/registrations` (paginated)](#-get-registrations-for-list-get-listslist_idregistrations-paginated)
- [✅ Get random registration for list: `GET /lists/{LIST_ID}/random_registration`](#-get-random-registration-for-list-get-listslist_idrandom_registration)
- [Donate Contract Config endpoint](#donate-contract-config-endpoint)
- [✅ Get donate contract config: `GET /donate_contract_config`](#-get-donate-contract-config-get-donate_contract_config)
- [`Donors` endpoints](#donors-endpoints)
- [✅ Get all donors: `GET /donors` (paginated)](#-get-all-donors-get-donors-paginated)
- [`Pots` endpoints](#pots-endpoints)
Expand Down Expand Up @@ -85,7 +92,7 @@ export PL_SENTRY_DSN=

This is a public, read-only API and as such does not currently implement authentication or authorization.

Rate limits of 100 requests/min are enforced to ensure service for all users.
Rate limits of 500 requests/min are enforced to ensure service for all users.

#### Error Responses

Expand All @@ -102,7 +109,7 @@ Possible Error Codes:

#### Pagination

Pagination available using `limit` and `offset` query params on endpoints that specify `paginated`. Default `limit` is 30.
Pagination available using `page` and `page_size` as query param on endpoints that specify `paginated`. Default `page_size` is 30.

Endpoints that support pagination will return a success response containing the following:

Expand All @@ -121,10 +128,31 @@ _NB: These endpoints are what is required to integrate with BOS app & replace cu

#### ✅ Get account by ID (address): `GET /accounts/{ACCOUNT_ID}`

#### ✅ Get donations received for account: `GET /accounts/{ACCOUNT_ID}/donations_received` (paginated)

#### ✅ Get donations sent for account: `GET /accounts/{ACCOUNT_ID}/donations_sent` (paginated)

#### ✅ Get pots for account: `GET /accounts/{ACCOUNT_ID}/active_pots` (paginated)

Can specify `status=live` query param to retrieve only pots that are currently active (live matching round)

#### ✅ Get applications for account: `GET /accounts/{ACCOUNT_ID}/pot_applications` (paginated)

Can specify `status={PotApplicationStatus}` query param to retrieve applications with a given status:

```py
enum PotApplicationStatus {
Pending,
Approved,
Rejected,
InReview,
}
```

#### ✅ Get registrations to lists by account: `GET /accounts/{ACCOUNT_ID}/list-registrations` (paginated)

Can specify status to filter by using `status` query param if desired, e.g. `status=Approved`

### `List` endpoints

#### ✅ Get all lists: `GET /lists` (paginated)
Expand All @@ -134,6 +162,15 @@ Can specify `status=live` query param to retrieve only pots that are currently a
#### ✅ Get registrations for list: `GET /lists/{LIST_ID}/registrations` (paginated)

Can specify status to filter by using `status` query param if desired, e.g. `status=Approved`
Can also specify project category to filter by using `category` query param if desired, e.g. `category=Education`

#### ✅ Get random registration for list: `GET /lists/{LIST_ID}/random_registration`

Can specify status to filter by using `status` query param if desired, e.g. `status=Approved`

### Donate Contract Config endpoint

#### ✅ Get donate contract config: `GET /donate_contract_config`

### `Donors` endpoints

Expand Down
13 changes: 7 additions & 6 deletions accounts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class AccountAdmin(admin.ModelAdmin):
"total_donations_out_usd",
"total_matching_pool_allocations_usd",
"donors_count",
"near_social_profile_data",
)
search_fields = ("id",) # Allow searching by account address
list_filter = (
Expand Down Expand Up @@ -42,11 +43,11 @@ def total_matching_pool_allocations_usd_display(self, obj):
"Total Matching Pool Allocations (USD)"
)

def has_add_permission(self, request):
return False
# def has_add_permission(self, request):
# return False

def has_change_permission(self, request, obj=None):
return False
# def has_change_permission(self, request, obj=None):
# return False

def has_delete_permission(self, request, obj=None):
return False
# def has_delete_permission(self, request, obj=None):
# return False
Loading