UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
367 stars 179 forks source link

feat(api): add boilerplate for osnap tenderly sim #4680

Closed daywiss closed 9 months ago

daywiss commented 9 months ago

Motivation We want to add a serverless function for tenderly simulation with osnap proposals. this feature will be broken up into mutliple prs. first we need to make a space to put this function.

Summary

The path of least resistance is to put this in the exisitng API server. this is already running on gcp serverless infrastructure and its set up to add arbitrary new functions. We add an optional route for tenderly simulations which are enabled with 3 optional environment variables: TENDERLY_ACCOUNT_NAME, TENDERLY_PROJECT_NAME, TENDERLY_ACCESS_KEY. Once set, a osnap route will be enabled. Here is where we will ultimately put simulation logic in future PR.

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

linear[bot] commented 9 months ago

UMA-2174 add tenderly sim calls and express boilerplate to uma api

daywiss commented 9 months ago

LGTM! One question: are we able to run this API separately from the other stuff that already exists in this API?

For instance, if we wanted to only offer the tenderly endpoint, would that be possible? Or would we have to offer all of it?

Its possible, theres 2 ways to do this. if we no longer need the old endpoints, we can just remove them from being mounted in the app and nother else changes. if we want to maintain those separately ( like different domains ) , we probably need a new serverless deployment and some code changes.