Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #201 from omgnetwork/circulating-supply-api
Browse files Browse the repository at this point in the history
add endpoint for circulating supply
  • Loading branch information
boyuan-chen authored Dec 2, 2021
2 parents 7232aac + 208861b commit 748368b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ops_boba/api/token-api/serverless-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,21 @@ functions:
cors: true
layers:
- ${file(env-mainnet.yml):LAYERS}

token_getCirculatingSupply:
handler: token_getCirculatingSupply.token_getCirculatingSupply
memorySize: 10240 # optional, in MB, default is 1024
timeout: 60 # optional, in seconds, default is 6
vpc:
securityGroupIds:
- ${file(env-mainnet.yml):SECURITY_GROUPS}
subnetIds:
- ${file(env-mainnet.yml):SUBNET_ID_1}
- ${file(env-mainnet.yml):SUBNET_ID_2}
events:
- http:
path: get.circulatingSupply
method: get
cors: true
layers:
- ${file(env-mainnet.yml):LAYERS}
18 changes: 18 additions & 0 deletions ops_boba/api/token-api/token_getCirculatingSupply.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import json

def token_getCirculatingSupply(event, context):

return {
"statusCode": 200,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": True,
"Strict-Transport-Security": "max-age=63072000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "same-origin",
"Permissions-Policy": "*",
},
"body": "155003271.00",
}

0 comments on commit 748368b

Please sign in to comment.