Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Process contract/token webhooks #971

Closed
Uxio0 opened this issue Sep 28, 2022 · 4 comments
Closed

Process contract/token webhooks #971

Uxio0 opened this issue Sep 28, 2022 · 4 comments

Comments

@Uxio0
Copy link
Member

Uxio0 commented Sep 28, 2022

Contract and token webhooks should be processed invalidating contract/token cache when transaction service starts sending them.

Related to safe-global/safe-transaction-service#1082

@fmrsabino
Copy link
Contributor

For invalidating all the contracts cache this is already possible by doing something like:

curl --location --request POST 'https://localhost:8080/v2/flush' \
--header 'Content-Type: application/json' \
--data-raw '{
    "invalidate": "Contracts"
}'

And for invalidating the token related cache you can do the following:

curl --location --request POST 'https://[safe-client.staging.gnosisdev.com](localhost:8080)/v2/flush' \
--header 'Content-Type: application/json' \
--data-raw '{
    "invalidate": "Tokens",
    "pattern_details": {
        "chain_id": "4"
    }
}'

@Uxio0
Copy link
Member Author

Uxio0 commented Sep 28, 2022

Sure @fmrsabino , but I was talking about processing webhooks the same way we do it with new transactions or new confirmations, not using admin endpoints 😉

@fmrsabino
Copy link
Contributor

Sure @fmrsabino , but I was talking about processing webhooks the same way we do it with new transactions or new confirmations, not using admin endpoints 😉

I don't think these are considered admin endpoints. The Config Service uses these for the hooks. But if we want to change that we can discuss!

@fmrsabino
Copy link
Contributor

Closing this issue as it no longer applies in this context. But we can open a new discussion under https://github.com/safe-global/safe-client-gateway-nest if it makes sense.

@fmrsabino fmrsabino closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants