MCPcopy Create free account

hub / github.com/degatchi/mev-template-rs / functions

Functions17 in github.com/degatchi/mev-template-rs

↓ 2 callersFunctionaddress
Converts &str to Address.
src/helpers.rs:4
↓ 1 callersMethodcreate_dex
(&self, factory: Address, router: Address)
src/lib.rs:40
↓ 1 callersMethodget_pairs
Attempts to retrieve the total pairs created from the dex's factory.
src/dex.rs:39
↓ 1 callersFunctionloop_blocks
(http_provider: Arc<SignerMiddleware<Provider<Http>, Wallet<SigningKey>>>)
src/block_scanner.rs:6
↓ 1 callersFunctionloop_mempool
(ws_provider: Arc<Provider<Ws>>)
src/mempool.rs:10
↓ 1 callersFunctionrun
Run the strategy here.
src/lib.rs:46
↓ 1 callersFunctionsetup_signer
Sets up middleware w/ our private key env var.
src/helpers.rs:16
Functionalert
Alerts discord channel, via webhook, we found an opportunity.
src/alert.rs:4
Functionbind
Creates a binding for an ABI. Example: bind("Example", "src/abi/example.json");
src/helpers.rs:36
Methoddecode_router_tx_data
A quick way to decode tx hex data.
src/dex.rs:32
Functionget_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
Functionget_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
Functionmain
()
src/main.rs:4
Methodnew
()
src/lib.rs:27
Methodnew
( middleware: Arc<SignerMiddleware<Provider<Http>, Wallet<SigningKey>>>, factory_address: Addr
src/dex.rs:16
Methodstream_pairs_created
Streams the "PairCreated" event from the `factory_address`.
src/dex.rs:52
Functionto_1e18
Converts normal input into 1e18.
src/helpers.rs:9