gnosisguild / zodiac-modifier-roles

Smart account toolkit for role-based access control
https://roles.gnosisguild.org
GNU Lesser General Public License v3.0
80 stars 39 forks source link

Reliable abi fetch #252

Closed jfschwarz closed 7 months ago

jfschwarz commented 7 months ago

Finally figured out a way to cache ABIs on the server. It uses experimental Next APIs but does the trick.

Large sets of permissions cause errors so far: https://roles.gnosisguild.org/permissions/eth/N8TqX00eJZBy91jP3xdXzXbR2fKcl5dDefZUAgHsGZY

While initial requests might still run into Vercel timeout they do populate the cache so that subsequent retries should succeed: https://zodiac-roles-hff5w3ayv-gnosis-guild.vercel.app/permissions/eth/N8TqX00eJZBy91jP3xdXzXbR2fKcl5dDefZUAgHsGZY

In case of a cache miss, we fetch from the Etherscan API in a throttled fashion to avoid running into their rate limit (5 requests/sec).

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
zodiac-roles-app ✅ Ready (Inspect) Visit Preview Mar 20, 2024 1:39pm
zodiac-roles-docs ✅ Ready (Inspect) Visit Preview Mar 20, 2024 1:39pm