Skip to content

Latest commit

 

History

History
166 lines (94 loc) · 3.44 KB

SandwichDetector.md

File metadata and controls

166 lines (94 loc) · 3.44 KB

sandwich-scanner / SandwichDetector

Class: SandwichDetector

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SandwichDetector(provider, covalentApiKey, backupProviders?)

Parameters

Name Type
provider JsonRpcProvider
covalentApiKey string
backupProviders? JsonRpcProvider[]

Defined in

SandwichDetector.ts:24

Properties

classifierProvider

Private classifierProvider: ClassifierProvider

Defined in

SandwichDetector.ts:20


detector

Private detector: Detector

Defined in

SandwichDetector.ts:22


fetcher

Private fetcher: Fetcher

Defined in

SandwichDetector.ts:21

Methods

getBlocksFromSwaps

Private getBlocksFromSwaps(swaps): number[]

Parameters

Name Type
swaps Swap[]

Returns

number[]

Defined in

SandwichDetector.ts:118


getSandwichesForAddress

getSandwichesForAddress(address, dex): Promise<Sandwich[]>

Parameters

Name Type
address string
dex DexType

Returns

Promise<Sandwich[]>

Implementation of

ISandwichDetector.getSandwichesForAddress

Defined in

SandwichDetector.ts:54


getSandwichesForBlock

getSandwichesForBlock(blockNo, dexType): Promise<Sandwich[]>

Parameters

Name Type
blockNo number
dexType DexType

Returns

Promise<Sandwich[]>

Implementation of

ISandwichDetector.getSandwichesForBlock

Defined in

SandwichDetector.ts:34


getSwandwichesforAddressWithOffset

getSwandwichesforAddressWithOffset(address, offset, dex): Promise<any>

Parameters

Name Type
address string
offset number
dex DexType

Returns

Promise<any>

Defined in

SandwichDetector.ts:86