-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: new function to update token metadata on s3 #174
Conversation
serverless.yml
Outdated
@@ -23,6 +23,10 @@ provider: | |||
- ${env:AWS_SUBNET_ID_1} | |||
- ${env:AWS_SUBNET_ID_2} | |||
- ${env:AWS_SUBNET_ID_3} | |||
apiGateway: | |||
apiKeys: | |||
- name: updateS3Key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the stage on the apikey name.
This will make serverless create a different apikey for each stage (like described here).
And should the apikey be an updateS3Key
or should we name it like an admin key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a recent design change, this functionality will be used directly via lambda call, bypassing the apiGateway
. So the keys were removed.
serverless.yml
Outdated
@@ -71,6 +75,7 @@ custom: | |||
s3: | |||
host: localhost | |||
directory: /tmp | |||
buckets: hathor-explorer-metadata-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev? Why not hathor-explorer-metadata
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed on e5ba6ac to use the METADATA_BUCKET
environment variable, changing with the run context.
handler: handlers/get_dag_metadata_handler.handle | ||
handler: handlers/dag_metadata_handler.handle_get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the get_dag_metadata_handler.py
file was renamed to dag_metadata_handler.py
to accomodate both the get
and put
operations on S3.
Reduces the risk of accidental deletion of metadata properties
This PR aims to build a new route with the functionality to update the token metadata on S3.
It is a dependency of HathorNetwork/hathor-wallet-service#235, which listens to new transactions, identifies NFT's and calls the
explorer-service
lambda to create/update the S3 metadata for them.Acceptance Criteria
put_dag_metadata_handler
receiving the token's metadata as a JSON on the payload