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

Dev -> main #89

Open
wants to merge 411 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
411 commits
Select commit Hold shift + click to select a range
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
ba61d8e
Merge branch 'dev' into testnet
lachlanglen Jul 31, 2024
c5d69df
Merge branch 'main' into dev
lachlanglen Jul 31, 2024
f8a42ee
fix handling new list and acct creation
Prometheo Aug 7, 2024
8006ee0
Merge pull request #75 from PotLock/fix-new-list-and-acct-create
Prometheo Aug 7, 2024
0f84a02
Merge pull request #76 from PotLock/dev
Prometheo Aug 8, 2024
8c4e4e7
fix creating projects
Prometheo Aug 8, 2024
1b7644e
Merge pull request #77 from PotLock/dev
Prometheo Aug 8, 2024
a0ee8e1
fix project creation activity
Prometheo Aug 8, 2024
8de7254
Merge pull request #78 from PotLock/dev
Prometheo Aug 8, 2024
985d1ef
add preview link cors regex
Prometheo Aug 22, 2024
568e8ef
models for grant picks indexing on stellar
Prometheo Aug 27, 2024
a3556fc
fix testnet pot deployment, add cors allow
Prometheo Aug 28, 2024
322db1a
Merge pull request #82 from PotLock/dev
Prometheo Aug 28, 2024
fa92f2b
fix: update cors origins
Prometheo Sep 5, 2024
f9398a9
fix config and pot
Prometheo Sep 10, 2024
472dcc8
Merge pull request #84 from PotLock/dev
Prometheo Sep 10, 2024
d874fde
whitelist bos local
Prometheo Sep 16, 2024
d221a34
add bos to cors
Prometheo Sep 18, 2024
f98d52f
Merge pull request #85 from PotLock/dev
Prometheo Sep 18, 2024
de52767
feat: stellar indexing for grantpicks...
Prometheo Sep 18, 2024
a61d175
fix: comment hardcoded start block
Prometheo Sep 18, 2024
ead9805
Merge pull request #86 from PotLock/grantpick
Prometheo Sep 19, 2024
d1401ac
feat: add api endpoint for rounds, projects and votes
Prometheo Sep 19, 2024
8b14697
fix: stellar event ingesting
Prometheo Sep 19, 2024
a09cda3
add filtering and sorting to rounds list
Prometheo Sep 20, 2024
6418d57
update ledger always
Prometheo Sep 21, 2024
44ff64e
use ledger timestamp
Prometheo Sep 21, 2024
0dc2907
list improvement and stellar token price
Prometheo Sep 26, 2024
f3f4346
fix log error
Prometheo Sep 26, 2024
7447f70
add contact serializer to rounds
Prometheo Sep 26, 2024
7518252
add project stats, whitelist grantpicks
Prometheo Oct 3, 2024
34a5a5e
endpoint for user upvoted lists, add pairs to vote
Prometheo Oct 3, 2024
40b60b8
remove upvote
Prometheo Oct 3, 2024
3a4a31d
remove caching from lists
Prometheo Oct 7, 2024
5e3f19a
add reg count to list details
Prometheo Oct 7, 2024
f01709e
use onchain id for lists route
Prometheo Oct 8, 2024
9abb172
filter appllication by status
Prometheo Oct 9, 2024
8856e60
update admins from event and update cors
Prometheo Oct 10, 2024
16ae0a3
fix update list
Prometheo Oct 10, 2024
87c8282
fix async iteration
Prometheo Oct 10, 2024
cbabcb0
prepare prod scripts
Prometheo Oct 21, 2024
672e55e
Merge pull request #90 from PotLock/testnet
Prometheo Oct 21, 2024
441b2ea
remove file copy flow
Prometheo Oct 21, 2024
a31064d
Merge pull request #92 from PotLock/testnet
Prometheo Oct 21, 2024
ffdb806
point to correct s3
Prometheo Oct 21, 2024
613d542
Merge pull request #94 from PotLock/testnet
Prometheo Oct 21, 2024
37eedb4
update allowed host
Prometheo Oct 21, 2024
3c4a14c
Merge pull request #96 from PotLock/testnet
Prometheo Oct 21, 2024
3a63572
configure sample rate for sentry
Prometheo Oct 23, 2024
89bfed4
Merge pull request #98 from PotLock/testnet
Prometheo Oct 23, 2024
ab258d3
return from job if no contract
Prometheo Oct 23, 2024
cdcd590
Merge pull request #100 from PotLock/testnet
Prometheo Oct 23, 2024
251c52e
index near grantpicks
Prometheo Nov 5, 2024
2ff3dd7
get chain by name:
Prometheo Nov 5, 2024
c31a00b
change id to name:
Prometheo Nov 5, 2024
49f770b
use name for chain
Prometheo Nov 5, 2024
be2820c
use onchain id for project get
Prometheo Nov 5, 2024
2611037
get round details for chain:
Prometheo Nov 5, 2024
bbeb310
fix chain id indexing
Prometheo Nov 5, 2024
b06976c
sort round by chain, add constraint to round
Prometheo Nov 5, 2024
d375258
fix stellar status indexing
Prometheo Nov 5, 2024
c3afe35
serialize project
Prometheo Nov 6, 2024
140259e
default ture to near vault
Prometheo Nov 6, 2024
461b071
fix vote url
Prometheo Nov 7, 2024
6f99880
fix round complete..
Prometheo Nov 7, 2024
59da2ec
fix vote api endpoint
Prometheo Nov 15, 2024
c3db34f
use id for near project
Prometheo Nov 15, 2024
d808e68
parse vote event
Prometheo Nov 15, 2024
dfb2658
fix payout creation
Prometheo Nov 20, 2024
1dbdf61
filter by search param
Prometheo Nov 22, 2024
08899f3
Merge pull request #110 from PotLock/testnet
Prometheo Nov 27, 2024
33937b6
api endpoint for json data
Prometheo Dec 1, 2024
94682d5
fix import
Prometheo Dec 1, 2024
1939f6f
change model field type and add search
Prometheo Dec 2, 2024
eefd51e
fix search
Prometheo Dec 3, 2024
da8c6a0
fix query param:
Prometheo Dec 3, 2024
e2c28e4
fix query param name
Prometheo Dec 3, 2024
69f83f5
add staging to factory pattern
Prometheo Dec 4, 2024
86e91a2
Merge pull request #114 from PotLock/testnet
Prometheo Dec 4, 2024
5f233b3
fix regex for pot factory
Prometheo Dec 4, 2024
ea61abe
Merge pull request #115 from PotLock/testnet
Prometheo Dec 4, 2024
23d9f67
get data from dict
Prometheo Dec 4, 2024
6efe7e4
Merge pull request #116 from PotLock/testnet
Prometheo Dec 4, 2024
d27087b
cors enable staging
Prometheo Dec 9, 2024
527b498
Merge pull request #117 from PotLock/testnet
Prometheo Dec 10, 2024
23828c8
discern similar contract methods
Prometheo Dec 10, 2024
3369e36
Merge pull request #118 from PotLock/testnet
Prometheo Dec 10, 2024
734d659
fix project stat
Prometheo Dec 11, 2024
235489a
fix filter param
Prometheo Dec 11, 2024
cd7b9c4
change stellar testnet contracts
Prometheo Dec 11, 2024
82c1bf4
change static pub key due to testnet reset
Prometheo Dec 11, 2024
6fdb8f6
add chain to roundds
Prometheo Dec 11, 2024
31804c4
update response sample
Prometheo Dec 11, 2024
819abea
rounds by account:
Prometheo Dec 13, 2024
0d8846f
Merge pull request #120 from PotLock/testnet
Prometheo Dec 13, 2024
bb1c761
celery config to fix memory usage
Prometheo Dec 13, 2024
566502e
Merge pull request #122 from PotLock/testnet
Prometheo Dec 13, 2024
95edb93
move to settings
Prometheo Dec 13, 2024
e238b57
Merge pull request #124 from PotLock/testnet
Prometheo Dec 13, 2024
0c2ba9f
remove celery conf variables
Prometheo Dec 14, 2024
4ae4d10
Merge pull request #126 from PotLock/testnet
Prometheo Dec 14, 2024
ab226ba
add review_notes to application
Prometheo Dec 27, 2024
76b466b
pick reviewer id
Prometheo Dec 27, 2024
e7f37e2
Merge pull request #129 from PotLock/testnet
Prometheo Dec 27, 2024
8c8ab90
get voter's staking balance
Prometheo Dec 31, 2024
578016a
Merge pull request #132 from PotLock/testnet
Prometheo Dec 31, 2024
3b70b50
merge account data and snapshot data
Prometheo Dec 31, 2024
b779272
Merge pull request #134 from PotLock/testnet
Prometheo Dec 31, 2024
51feb33
fix check logic
Prometheo Dec 31, 2024
d4669ec
Merge pull request #136 from PotLock/testnet
Prometheo Dec 31, 2024
88c7bea
get voters from contract and add caching
Prometheo Jan 2, 2025
fb90a57
Merge pull request #138 from PotLock/testnet
Prometheo Jan 2, 2025
cdd1f73
fix schema param:
Prometheo Jan 2, 2025
ea3ab99
Merge pull request #140 from PotLock/testnet
Prometheo Jan 3, 2025
2257688
fix api schema for doc
Prometheo Jan 3, 2025
fbecb39
Merge pull request #142 from PotLock/testnet
Prometheo Jan 3, 2025
9185295
separate endpoint for list and detail
Prometheo Jan 3, 2025
7c9483d
Merge pull request #144 from PotLock/testnet
Prometheo Jan 3, 2025
23390e3
increase max page size
Prometheo Jan 5, 2025
a8de5ca
Merge pull request #146 from PotLock/testnet
Prometheo Jan 5, 2025
3c15d77
add filter by admin to list
Prometheo Jan 7, 2025
778ed69
Merge pull request #148 from PotLock/testnet
Prometheo Jan 7, 2025
a2ba5da
add is human param
Prometheo Jan 13, 2025
98f1d82
Merge pull request #150 from PotLock/testnet
Prometheo Jan 13, 2025
4fe7bba
add type
Prometheo Jan 13, 2025
57da50f
Merge pull request #151 from PotLock/testnet
Prometheo Jan 13, 2025
a88c3ed
use select and prefetch related
Prometheo Jan 18, 2025
99682da
Merge pull request #153 from PotLock/testnet
Prometheo Jan 18, 2025
4b86935
optimize list fetching query
Prometheo Jan 18, 2025
e695012
add cache
Prometheo Jan 18, 2025
c6c8b27
remove annotate
Prometheo Jan 18, 2025
d52160b
Merge pull request #155 from PotLock/testnet
Prometheo Jan 18, 2025
1408581
add list_id to serializer
Prometheo Jan 19, 2025
9636456
Merge pull request #157 from PotLock/testnet
Prometheo Jan 19, 2025
303e860
update schema:
Prometheo Jan 19, 2025
c5929ad
Merge pull request #159 from PotLock/testnet
Prometheo Jan 19, 2025
07a9f21
get details at height
Prometheo Jan 20, 2025
2406f52
Merge pull request #161 from PotLock/testnet
Prometheo Jan 20, 2025
ac140ea
change block height
Prometheo Jan 20, 2025
48a0bc2
Merge pull request #163 from PotLock/testnet
Prometheo Jan 20, 2025
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
51 changes: 51 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Prod deploy to EC2 on Push

on:
push:
branches: [prod]

env:
AWS_REGION: "us-east-1"

# Permission can be added at job level or workflow level
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
DeployToCodeDeploy:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
with:
role-to-assume: arn:aws:iam::471112976510:role/GitHubAction-AssumeRoleWithAction
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}

# - name: Generate appspec.yml for prod
# run: cp appspec.yml appspec.yml

- name: Set environment variables
id: vars
run: |
echo "DATETIME=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV
echo "FILENAME=django-indexer-prod-${DATETIME}.zip" >> $GITHUB_ENV
echo "S3_BUCKET=django-indexer-prod" >> $GITHUB_ENV

- name: Create zip of repository
run: zip -r "${{ env.FILENAME }}" .

- name: Upload repository to S3
run: aws s3 cp "${{ env.FILENAME }}" "s3://${{ env.S3_BUCKET }}/"

- name: Create CodeDeploy Deployment
id: deploy
run: |
aws deploy create-deployment \
--application-name django-indexer \
--deployment-group-name django-indexer-prod \
--deployment-config-name CodeDeployDefault.AllAtOnce \
--s3-location bucket=${{ env.S3_BUCKET }},bundleType=zip,key=${{ env.FILENAME }}
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
Loading