bobanetwork / safe-wallet-web

Boba Network multisig fork - Safe{WALLET} – smart contract wallet for Ethereum (ex-Gnosis Safe multisig)
https://app.safe.global
GNU General Public License v3.0
0 stars 8 forks source link

Simple request proxy for Tenderly simulations #1

Closed InoMurko closed 12 months ago

InoMurko commented 12 months ago

Safe frontend allows Tenderly integration. It does the following request:

curl -X POST -H "Content-Type: application/json" -d @./data.json https://api.tenderly.co/api/v1/account/boba/project/gnosis-multisig-frontend/simulate 

What this request is missing is an access token

-H 'X-Access-Key: lalalala' 

data.json looks like:

{"block_number": 1070096,"to":"0xf5C6B9758085285874b238a99584Ad3264C53835","input":"0x6a761202000000000000000000000000f5c6b9758085285874b238a99584ad3264c5383500000000000000000000000000000000000000000000000004a628b99fc180000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000000000000000000000000e840e445a7a9e2652e8c124ac39642cc2766605f00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000","network_id":"288","from":"0xe840E445a7a9e2652E8c124ac39642CC2766605f","gas":11000000,"gas_price":"0","state_objects":{"0xf5C6B9758085285874b238a99584Ad3264C53835":{"storage":{"0x0000000000000000000000000000000000000000000000000000000000000004":"0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000005":"0x0000000000000000000000000000000000000000000000000000000000000007"}}},"save":true,"save_if_fails":true}

The solution should be a publicly accessible Lambda service that takes the complete request, adds a header -H 'X-Access-Key: lalalala' , forwards it to https://api.tenderly.co/api/v1/account/boba/project/gnosis-multisig-frontend/simulate and returns the response to the requestor. Make sure the service has a reasonable rate limit. Within enya-tooling.

InoMurko commented 12 months ago

Actually, this is better https://aws.amazon.com/api-gateway/

wsdt commented 12 months ago

ideally behind https://simulation.boba.network/