Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manifoldfinance/libsushi
libsushi - sushiswap sushi guard library
https://github.com/manifoldfinance/libsushi
ethereum ethers flashbots openmev sushiswap web3 web3-provider
Last synced: 30 days ago
JSON representation
libsushi - sushiswap sushi guard library
- Host: GitHub
- URL: https://github.com/manifoldfinance/libsushi
- Owner: manifoldfinance
- Created: 2022-03-25T09:15:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-14T04:30:26.000Z (over 2 years ago)
- Last Synced: 2024-05-19T00:36:41.969Z (7 months ago)
- Topics: ethereum, ethers, flashbots, openmev, sushiswap, web3, web3-provider
- Language: JavaScript
- Homepage: https://manifoldfinance.github.io/libsushi/
- Size: 847 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [libsushi](#)
![npm](https://img.shields.io/npm/v/libsushi?label=libsushi)
[![typedoc - v0.1.0](https://img.shields.io/badge/typedoc-v0.1.0-blue)](https://manifoldfinance.github.io/libsushi/)> OpenMEV Library for SushiSwap's SushiGuard
## Potential statuses
- `PENDING` - The transaction was received and is currently being submitted to miners
- `INCLUDED` - The transaction was included on-chain
- `FAILED` - The transaction was submitted for 25 blocks and failed to be included on-chain
- `CANCELLED` - The transaction was cancelled by the user and not included on-chain
- `UNKNOWN` - The transaction was not received## Typescript Library
```typescript
// @see {@link https://github.com/manifoldfinance/libsushi/blob/master/src/SushiGuard/index.ts}
/**
* @package OpenMevTxState
* @version 2022.04
* @see {@link docs.openmev.org}
* @notice This is a flashbots-api compatible interface ( ~v0.6 )
*
* - UNCHECKED -> Tx status has not been checked and there's no information about it.
* - PROCESSING -> Tx checks are in place until a resolution happens: OK, INDETERMINATE, ERROR.
* - OK -> Relay received the Tx && all downstream miners accepted without complains && tx mined successfully
* - INDETERMINATE -> Relay received correctly the Tx && at least one miner accepted the TX && TX potentially mineable
* - ERROR -> Relay hasn't received the TX || none of the miners accepted the Tx || Tx was not mined successfully
*
*/export enum PrivateTxState {
UNCHECKED = 'UNCHECKED',
PROCESSING = 'PROCESSING',
OK = 'OK',
INDETERMINATE = 'INDETERMINATE',
ERROR = 'ERROR',
}export type RelayResponses = Record;
export interface RelayResponse {
response: JsonRpcResponse;
error?: string;
}export interface PrivateTxStatus {
transactionHash: string;
receivedAt: string;
relayedAt?: string;
minedAt?: string;
relayFailure?: boolean;
relayResponses?: RelayResponses;
}
```