mouseless-eth / rusty-sando

Implementation of a competitive v2/v3 multi-meat MEV sandwich bot written using Rust and Huff.
MIT License
767 stars 256 forks source link

All tests fail. #47

Closed fan333920 closed 1 year ago

fan333920 commented 1 year ago

Not issue related.

Please, mouseless-eth, don't close the issue without giving explanations or block us from adding more issues, we are not all born knowing, thanks for sharing your code but if you don't want us to ask, make it private, but don't block us every time we ask or have doubts. Several doubts are repeated among the community and all of them have been closed without leaving any comments about the solution.

The steps we follow are:

1) We deploy the contract using create2 factory -- Before that, we correctly define the SEARCHER constant in the contract and we get the contract bytecode.

2) We funded the contract with WETH

3) We define all variables in .env correctly Including SEARCHER_PRIVATE_KEY, FLASHBOTS_AUTH_KEY, SANDWICH_CONTRACT AND INCEPTION BLOCK.

WSS_RPC=ws://localhost:8545
SEARCHER_PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001
FLASHBOTS_AUTH_KEY=0000000000000000000000000000000000000000000000000000000000000002
SANDWICH_CONTRACT=0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa
SANDWICH_INCEPTION_BLOCK=...

4) When running cargo test -p strategy --release --features debug

We get:

running 4 tests
test can_sandwich_uni_v2 ... FAILED
test can_sandwich_sushi_swap ... FAILED
test can_sandwich_multi_v2_swaps ... FAILED
test can_sandwich_uni_v3 ... FAILED

failures:

---- can_sandwich_uni_v2 stdout ----
thread 'can_sandwich_uni_v2' panicked at 'called `Result::unwrap()` on an `Err` value: [huffsando: REVERT] frontrun: b"\0\0\0"', crates/strategy/tests/main.rs:102:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- can_sandwich_sushi_swap stdout ----
thread 'can_sandwich_sushi_swap' panicked at 'called `Result::unwrap()` on an `Err` value: [huffsando: REVERT] frontrun: b"\0\0\0"', crates/strategy/tests/main.rs:130:10

---- can_sandwich_multi_v2_swaps stdout ----
thread 'can_sandwich_multi_v2_swaps' panicked at 'called `Result::unwrap()` on an `Err` value: [huffsando: REVERT] frontrun: b"\0\0\0"', crates/strategy/tests/main.rs:163:10

---- can_sandwich_uni_v3 stdout ----
thread 'can_sandwich_uni_v3' panicked at 'called `Result::unwrap()` on an `Err` value: [huffsando: REVERT] frontrun: b"\0\0\0"', crates/strategy/tests/main.rs:191:10

failures:
    can_sandwich_multi_v2_swaps
    can_sandwich_sushi_swap
    can_sandwich_uni_v2
    can_sandwich_uni_v3

We appreciate any ideas or help on how to better identify the error, prior to uploading an issue, we tried to solve it on our own without success.

Thank you.