rainlanguage / rain.orderbook

Rain orderbook libraries, subgraph and contract implementation.
Other
11 stars 7 forks source link

Add official RP4 addresses to deployment CI as env #901

Open rouzwelt opened 2 months ago

rouzwelt commented 2 months ago

sushi lib uses official RP contract addresses internally, some routes may include them depending on the route, and since our CI deploy a fresh RP contract everytime, at times we might get some unexpected reverts if such routes are given to the bot to process.

solution1: add official RP4 address as env to the CI/ gh secrets and remove RP deployment from suites, here is the list of RP4 contract per chain: https://github.com/rainlanguage/sushiswap/blob/34fbe7d482e43cdb847b8a5116d0d2b6e18e6d18/packages/sushi/src/config/route-processor.ts#L304

solution2: write a simple script that fetches the address from the above link given a chainid and run it in the Deploy script using foundry ffi. this seems to be better overall, sine it will support any new network that isnt supported by sushi lib atm

hardyjosh commented 2 months ago
image
thedavidmeister commented 5 days ago

yeah @rouzwelt i'm not sure if i got an answer to that question in the screenshot @hardyjosh posted

if the sushi router is hardcoded to the singular RP4 contract, why don't we see it break already, because we've been deploying and using our own copy of RP4 for a long time now

rouzwelt commented 5 days ago

yeah @rouzwelt i'm not sure if i got an answer to that question in the screenshot @hardyjosh posted

if the sushi router is hardcoded to the singular RP4 contract, why don't we see it break already, because we've been deploying and using our own copy of RP4 for a long time now

@thedavidmeister we discussed this on chat, the reason is that, not all produced routes contain a piece to the RP4 contract address, some more complex routes do, but not all, mostly the simple ones containing 1 or 2 pool