Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/degatchi/mev-template-rs
/ functions
Functions
17 in github.com/degatchi/mev-template-rs
⨍
Functions
17
◇
Types & classes
2
↓ 2 callers
Function
address
Converts &str to Address.
src/helpers.rs:4
↓ 1 callers
Method
create_dex
(&self, factory: Address, router: Address)
src/lib.rs:40
↓ 1 callers
Method
get_pairs
Attempts to retrieve the total pairs created from the dex's factory.
src/dex.rs:39
↓ 1 callers
Function
loop_blocks
(http_provider: Arc<SignerMiddleware<Provider<Http>, Wallet<SigningKey>>>)
src/block_scanner.rs:6
↓ 1 callers
Function
loop_mempool
(ws_provider: Arc<Provider<Ws>>)
src/mempool.rs:10
↓ 1 callers
Function
run
Run the strategy here.
src/lib.rs:46
↓ 1 callers
Function
setup_signer
Sets up middleware w/ our private key env var.
src/helpers.rs:16
Function
alert
Alerts discord channel, via webhook, we found an opportunity.
src/alert.rs:4
Function
bind
Creates a binding for an ABI. Example: bind("Example", "src/abi/example.json");
src/helpers.rs:36
Method
decode_router_tx_data
A quick way to decode tx hex data.
src/dex.rs:32
Function
get_amount_in
Returns the minimum input asset amount required to buy the given output asset amount (accounting for fees) given reserves. Uniswap v2; x * y = k formu
src/uni.rs:36
Function
get_amount_out
Given an input asset amount, returns the maximum output amount of the other asset (accounting for fees) given reserves. Uniswap v2; x * y = k formula
src/uni.rs:12
Function
main
()
src/main.rs:4
Method
new
()
src/lib.rs:27
Method
new
( middleware: Arc<SignerMiddleware<Provider<Http>, Wallet<SigningKey>>>, factory_address: Addr
src/dex.rs:16
Method
stream_pairs_created
Streams the "PairCreated" event from the `factory_address`.
src/dex.rs:52
Function
to_1e18
Converts normal input into 1e18.
src/helpers.rs:9