darkforestry / amms-rs

A Rust library to interact with automated market makers across EVM chains.
458 stars 124 forks source link

429 rpc error #128

Closed Klugekluge67 closed 5 months ago

Klugekluge67 commented 7 months ago

Describe the feature you would like

tried as is with Alchemy and Quicknode rpc. Got 429 error on artemis/collector.rs file Any way to fix.

Additional context

No response

0xKitsune commented 7 months ago

Thanks for opening an issue!

429 is likely indicating that there are too many requests being sent in a short time horizon. In the example, the amms are first synced, however the middleware that is used does not have a throttle.

The easiest fix should be to use a throttled provider. Feel free to give it a shot or open a PR with this if you would like and let me know if you run into anything else.

kvnkmth commented 4 weeks ago

this is an issue in alloy too. but throttled provider is in ethers