Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'subcategory'})
This happened while the json dataset builder was generating data using
hf://datasets/Jcrandall541/ethereum-arbitrage/train_0000.jsonl (at revision 5eedc175d72f2b115c391306569e81cc43a2d746)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
id: string
source: string
file: string
chunk_id: int64
category: string
language: string
title: string
content: string
token_estimate: int64
subcategory: string
to
{'id': Value('string'), 'source': Value('string'), 'file': Value('string'), 'chunk_id': Value('int64'), 'category': Value('string'), 'language': Value('string'), 'title': Value('string'), 'content': Value('string'), 'token_estimate': Value('int64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1455, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1054, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'subcategory'})
This happened while the json dataset builder was generating data using
hf://datasets/Jcrandall541/ethereum-arbitrage/train_0000.jsonl (at revision 5eedc175d72f2b115c391306569e81cc43a2d746)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id string | source string | file string | chunk_id int64 | category string | language string | title string | content string | token_estimate int64 |
|---|---|---|---|---|---|---|---|---|
424ee32c9726ed02 | https://github.com/RenatoDev3/rusty-john | src/dex_factory.rs | 1 | code | rust | ```rs
pub struct DexFactory<'a, M> {
factory_contract: UniV2Factory<M>,
flash_query_contract: &'a UniQuery<M>,
}
impl<'a, M> DexFactory<'a, M>
where
M: Middleware,
{
pub fn new(
pair_address: Address,
flash_query_contract: &'a UniQuery<M>,
client: Arc<M>,
) -> Self {
... | 126 | |
88fc94a779db5d9f | https://github.com/RenatoDev3/rusty-john | examples/query_test.rs | 0 | code | rust | ```rs
#![allow(unused)]
use ethers::prelude::*;
use rusty_john::{utils::*, dex_factory::*, address_book::*};
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let factory_addresses = vec![
UNISWAP_FACTORY,
... | 57 | |
8a32f748916fde67 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 12 | code | javascript | ```json
"name": "path",
"type": "address[]"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
... | 111 | |
133d32d665f83e51 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 8 | code | javascript | ```json
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bool",
"name": "approveMax",
... | 122 | |
eef9e6150601deaa | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 4 | code | javascript | ```json
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountAMin",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountBMin",
"type": "uint256"
... | 121 | |
f1424bf7ee87e209 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Factory.json | 0 | code | javascript | ```json
[
{
"inputs": [
{
"internalType": "address",
"name": "_feeToSetter",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs"... | 134 | |
f74a06bd0e1058e9 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Factory.json | 1 | code | javascript | ```json
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenA",
"type": "address"
},
{
"int... | 139 | |
1233f05ca4de9bfe | https://github.com/RenatoDev3/rusty-john | README.md | 1 | code | markdown | ```md
## Improvements
If you wish to contribute to the repo, some features that could be implemented are:
- A better optimal profit function
- Estimate an array of profitable tokens instead of 1 by 1
- Make the execute function more gas efficient
## Notice
If any bugs or optimizations are found, feel free to create a ... | 134 | |
9f9f264e1394ccd0 | https://github.com/RenatoDev3/rusty-john | src/crossed_pair.rs | 2 | code | rust | ```rs
#[derive(Debug)]
pub struct TokenMarket<'a> {
token: &'a H160,
pairs: Vec<Pair>,
}
impl<'a> TokenMarket<'a> {
pub fn find_arbitrage_opportunity(&self) {
for pair_a in &self.pairs {
for pair_b in &self.pairs {
if let Some((x, _alt_amount, profit)) = profit(
... | 135 | |
afe3c7c7d4e6eb7c | https://github.com/RenatoDev3/rusty-john | examples/uni_v2_mempool.rs | 0 | code | rust | ```rs
use ethers::prelude::*;
use ethers::abi::AbiDecode;
use rusty_john::{address_book::*, utils::*};
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let stream = config.wss.subscribe_pending_txs().await?;
let m... | 58 | |
11e28554d6bce53d | https://github.com/RenatoDev3/rusty-john | src/abi/MEV.json | 0 | code | javascript | ```json
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType... | 123 | |
6f5543bbbf141696 | https://github.com/RenatoDev3/rusty-john | README.md | 0 | code | markdown | ```md
# Dex Arbitrage - MEV Bot 
Open sourcing a MEV Arbitrage Bot written in blazing fast Rust.
## Before Starting
This repo should be used as reference material for aspiring searchers looking to get into the world of MEV.
I removed more com... | 326 | |
717eaa9e62a3d03b | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 10 | code | javascript | ```json
"type": "uint256"
},
{
"internalType": "address[]",
"name": "path",
"type": "address[]"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
... | 121 | |
12e721f3295fbc79 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 3 | code | javascript | ```json
"name": "getAmountsIn",
"outputs": [
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
... | 128 | |
e00256a782251255 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 4 | code | javascript | ```json
{ "internalType": "address", "name": "spender", "type": "address" },
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
{ "internalType": "uint8", "name": "v", "type": "uint8" },
{ "internalType": "byte... | 206 | |
a6345e0380c7fe4f | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 11 | code | javascript | ```json
"internalType": "address[]",
"name": "path",
"type": "address[]"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
... | 119 | |
c4c266d8b31b7097 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 1 | code | javascript | ```json
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount1In",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount0Out",
"type": "uint256"
},
{
"indexed": false,
... | 174 | |
1762827c4db1bcce | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 2 | code | javascript | ```json
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountOut",
... | 127 | |
13024df3adb44811 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 5 | code | javascript | ```json
"inputs": [],
"name": "sync",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "token0",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"payable": false,
"... | 173 | |
17475f893575dd0b | https://github.com/RenatoDev3/rusty-john | src/abi/UniQuery.json | 0 | code | javascript | ```json
[
{
"inputs": [
{
"internalType": "contract UniswapV2Factory",
"name": "_uniswapFactory",
"type": "address"
},
{
"internalType": "uint256",
"name": "_start",
"type": "u... | 82 | |
2226ffbfe2e9b68b | https://github.com/RenatoDev3/rusty-john | contract/Arb.sol | 0 | code | solidity | ```sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "hardhat/console.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address... | 184 | |
7baa51dd35c22c33 | https://github.com/RenatoDev3/rusty-john | src/utils.rs | 0 | code | rust | ```rs
use ethers::prelude::{k256::ecdsa::SigningKey, *};
use std::sync::Arc;
pub struct Config {
#[allow(dead_code)]
pub http: Arc<SignerMiddleware<Provider<Http>, Wallet<SigningKey>>>,
#[allow(dead_code)]
pub wss: Arc<Provider<Ws>>,
}
impl Config {
pub async fn new() -> Self {
dotenv::dot... | 130 | |
b8afc6372677e796 | https://github.com/RenatoDev3/rusty-john | src/crossed_pair.rs | 3 | code | rust | ```rs
}
}
}
}
}
}
use std::{sync::Arc, ops::Add};
pub async fn calculate(
token_2: H160,
amount: U256
) -> Option<U256> {
let config = Config::new().await;
let contract_addr = address(MEV_ADDRESS);
let mevbot = MevBot::new(
contract_addr,
... | 144 | |
fe9068ef467a37a8 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 5 | code | javascript | ```json
"internalType": "uint256",
"name": "amountToken",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountETH",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
... | 119 | |
b35d67ed637fa8ea | https://github.com/RenatoDev3/rusty-john | src/dex_factory.rs | 0 | code | rust | ```rs
use itertools::Itertools;
use std::sync::Arc;
use crate::
address_book::{UniQuery, UniV2Factory, WETH_ADDRESS
};
use ethers::prelude::*;
pub async fn get_markets_by_token<M>(
factory_addresses: Vec<Address>,
flash_query_contract: &UniQuery<M>,
client: Arc<M>,
) -> Vec<(H160, Vec<[H160; 3]>)>... | 154 | |
7b59c3a6be52d2f0 | https://github.com/RenatoDev3/rusty-john | src/crossed_pair.rs | 4 | code | rust | ```rs
#[derive(Debug)]
#[allow(dead_code)]
pub struct Pair {
address: H160,
token0: H160,
token1: H160,
reserve: Option<Reserve>,
}
#[derive(Debug)]
pub struct Reserve {
reserve0: U256,
reserve1: U256,
}
impl Reserve {
pub fn new(reserve0: U256, reserve1: U256) -> Self {
Self { res... | 174 | |
ded463892fee7f10 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 2 | code | javascript | ```json
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "address", "name": "", "type": "address" },
{ "internalType": "address", "name": "",... | 209 | |
c0ca59f4e04daa83 | https://github.com/RenatoDev3/rusty-john | src/crossed_pair.rs | 0 | code | rust | ```rs
#![allow(unused)]
use crate::address_book::{UniQuery, MevBot, UNISWAP_ROUTER, SUSHISWAP_ROUTER, WETH_ADDRESS, MEV_ADDRESS};
use crate::utils::*;
use ethers::{abi::ethereum_types::U512, prelude::*, utils::{format_ether, parse_ether}};
#[derive(Debug)]
pub struct CrossedPairManager<'a, M>
where
M: Middleware,
... | 142 | |
95b12b254e04d6bc | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 0 | code | javascript | ```json
[
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed":... | 170 | |
4f7c0e5e1b3a22a5 | https://github.com/RenatoDev3/rusty-john | src/abi/MEV.json | 2 | code | javascript | ```json
},
{
"inputs": [],
"name": "recoverEth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenAddress",
"type": "addre... | 76 | |
b59a27eacbbc2090 | https://github.com/RenatoDev3/rusty-john | src/lib.rs | 0 | code | rust | ```rs
pub mod address_book;
pub mod utils;
pub mod dex_factory;
pub mod crossed_pair;
``` | 14 | |
f7c9a9a74851ba36 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 1 | code | javascript | ```json
"name": "amountA",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "liquidity",
... | 123 | |
fcd584ff151804c2 | https://github.com/RenatoDev3/rusty-john | examples/mempool_pending_txs.rs | 0 | code | rust | ```rs
use ethers::prelude::*;
use rusty_john::utils::*;
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let stream = config.wss.subscribe_pending_txs().await?;
let mut tx_stream = stream.transactions_unordered(us... | 47 | |
9e1c63e9884e32de | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 6 | code | javascript | ```json
},
{
"internalType": "uint256",
"name": "amountETHMin",
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
... | 118 | |
4bb72411069bc42f | https://github.com/RenatoDev3/rusty-john | src/address_book.rs | 0 | code | rust | ```rs
use ethers::prelude::*;
pub const UNISWAP_ROUTER: &str = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D";
pub const UNISWAP_FACTORY: &str = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f";
pub const SUSHISWAP_ROUTER: &str = "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F";
pub const SUSHISWAP_FACTORY: &str = "0xC0AEe478e... | 63 | |
4eb6df5a043788aa | https://github.com/RenatoDev3/rusty-john | contract/UniswapFlashQuery.sol | 0 | code | solidity | ```sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 re... | 194 | |
5504df273da80d48 | https://github.com/RenatoDev3/rusty-john | examples/crossed_pairs.rs | 0 | code | rust | ```rs
#![allow(unused)]
use ethers::prelude::*;
use rusty_john::{utils::*, crossed_pair::*, dex_factory::*, address_book::*};
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let factory_addresses = vec![
UNI... | 65 | |
a5141967293126b7 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 9 | code | javascript | ```json
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountOutMin",
"type": "uint256"
},
{
"internalType": "address[]",
... | 123 | |
5d090ca9495efeb8 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Factory.json | 2 | code | javascript | ```json
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_feeTo",
"type": "address"
}
... | 56 | |
83c4bba902658dc8 | https://github.com/RenatoDev3/rusty-john | src/abi/MEV.json | 1 | code | javascript | ```json
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "estimateDualDexTrade",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
... | 132 | |
c28d20b142734d4e | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 7 | code | javascript | ```json
"type": "uint256"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
... | 118 | |
4dddfcd9ead069a5 | https://github.com/RenatoDev3/rusty-john | Cargo.toml | 0 | code | toml | ```toml
[package]
name = "rusty-john"
version = "0.1.0"
edition = "2021"
[dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws", "rustls", "abigen"] }
eyre = { version = "0.6" }
dotenv = "0.15.0"
tokio = { version = "1.5", features = ["macros", "rt-multi-thread"] }
itertools = "0.10.2... | 49 | |
ec89f19be712840c | https://github.com/RenatoDev3/rusty-john | src/crossed_pair.rs | 1 | code | rust | ```rs
let min_weth = parse_ether(500).unwrap(); // Filter out pairs that have more than 500 WETH
for (new_reserve, pair) in std::iter::zip(&reserves, self.get_all_pair_addresses()) {
let weth_address = &WETH_ADDRESS.parse::<Address>().unwrap();
let (reserve0, reserve1) = if &pair.toke... | 116 | |
ab371ac2cc9b3278 | https://github.com/RenatoDev3/rusty-john | contract/Arb.sol | 1 | code | solidity | ```sol
function getAmountOutMin(address router, address _tokenIn, address _tokenOut, uint256 _amount) public view returns (uint256) {
address[] memory path;
path = new address[](2);
path[0] = _tokenIn;
path[1] = _tokenOut;
uint256[] memory amountOutMins = IUniswapV2Router(router).getAmountsOut(_amount, path);... | 162 | |
9785d6118eb8f8aa | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Router.json | 0 | code | javascript | ```json
[
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
},
{
"internalType": "address",
"name": "_WETH",
"type": "address"
}
... | 124 | |
9cfadd2bbc2053aa | https://github.com/RenatoDev3/rusty-john | src/main.rs | 0 | code | rust | ```rs
#![allow(unused)]
use ethers::prelude::*;
use rusty_john::{utils::*, crossed_pair::*, dex_factory::*, address_book::*};
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let factory_addresses = vec![
UNI... | 83 | |
682a1947ad981e74 | https://github.com/RenatoDev3/rusty-john | src/abi/UniV2Pair.json | 3 | code | javascript | ```json
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getReserves",
"outputs": [
{ "internalType": "uint112", "name": "_reserve0", "type": "uint112" },
{ "internalType": "uint112", "name": "_reserve1", "type": "uint112" },
{
... | 202 | |
228eba146c2312ad | https://github.com/RenatoDev3/rusty-john | examples/subscribe_blocks.rs | 0 | code | rust | ```rs
use ethers::prelude::*;
use rusty_john::utils::*;
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().ok();
let config = Config::new().await;
println!("[STARTING]");
let mut stream = config.wss.subscribe_blocks().await?;
while let Some(block) = stream.next().await {
... | 38 | |
cfe1cd7ee9a2ed01 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,058 | code | javascript | ```json
0x244dfc8712ad40ca19b5fe674ddf5fd4b7cc978e","reserveETH":2e-18,"token0":{"id":"0x3c62660fbae5099180ffcc2d17f25f066bc64825","symbol":"PET"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0x244fd26071952390a7bb40fb4ec2f2fce886d7d5","r... | 3 | |
6324de5dc24a1f7e | https://github.com/Uniswap/smart-order-router | v2pools.json | 4,533 | code | javascript | ```json
:0,"trackedReserveETH":4.8e-17},{"id":"0x983a8e9531e6f7071d484f81db89f82db85e9562","reserveETH":2.6e-17,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xd906e1588cf974d3217ef1d4d1a0c0aa8665566e","symbol":"COLL"},"totalSupply":0,"trackedReserveETH":2.6e-17},{"id":"0x... | 3 | |
9c592212c5c38a19 | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,393 | code | javascript | ```json
5.3215464734037145e-9},{"id":"0x71d7246ace427457f2bc802e3e1a4a658a5a3364","reserveETH":4.294172750140732,"token0":{"id":"0xa543427f52bbd3acb7f8ef0d42a4302176bd264b","symbol":"POGGER20"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":76.99350621968063,"trackedReserveET... | 3 | |
d561e9f6e82c1ce0 | https://github.com/Uniswap/smart-order-router | test/unit/providers/v4/subgraph-provider.test.ts | 4 | code | typescript | ```ts
const zoraResponse = {
pools: [
// This pool would be returned by the Zora query but should be filtered out by safety check
{
...constructPool('0xZoraLow', '1000000', '0.0005'), // Below Zora threshold
hooks: '0xd61a675f8a0c67a73dc3b54fb7318b4d91409040' // Zora Creator Ho... | 204 | |
38406c165a50cf99 | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,864 | code | javascript | ```json
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":3.4e-17},{"id":"0x81e5989d2d4fe50d57506577a8fe4489af7e897c","reserveETH":3.92e-16,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xd2c3f9d4a1791e07d07df17b8084488d522f44... | 3 | |
56ff2b6a67821ae2 | https://github.com/Uniswap/smart-order-router | v2pools.json | 826 | code | javascript | ```json
PAMP"},"totalSupply":12.847090373610452,"trackedReserveETH":0.002648676636572292},{"id":"0x1c62544147c7eb4d1d2da7fe61d0efdee3c28237","reserveETH":3.7950867313693566,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xc6ca6144ca5a560b71f166ef822d175d89382324","symbol":"... | 3 | |
912b54361c62070a | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,217 | code | javascript | ```json
totalSupply":0,"trackedReserveETH":0.7},{"id":"0x6b745a160527df45255b44233cbd73a1d3f20b39","reserveETH":3.52e-16,"token0":{"id":"0x7f073cba008af03a2bbca090661d788436fc71d2","symbol":"YFWF"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":3.52e-16}... | 3 | |
d0f018c660da9348 | https://github.com/Uniswap/smart-order-router | v2pools.json | 458 | code | javascript | ```json
-18},{"id":"0x0fd3d52bdba4d5ed4d1e1a0edcea2442fc89e4c1","reserveETH":9.4e-17,"token0":{"id":"0x264bb245c7e791a65b6d858f9b3e5f9156ce8f9c","symbol":"NYANV2"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":9.4e-17},{"id":"0x0fd523d6945dcf6cbde9b28d7... | 4 | |
783a6714a0207a1e | https://github.com/Uniswap/smart-order-router | v2pools.json | 6,242 | code | javascript | ```json
totalSupply":0,"trackedReserveETH":2e-18},{"id":"0xd1888ad9f1dabaa6c8914ca8a689f7acaeff86fa","reserveETH":4e-18,"token0":{"id":"0x70c6da17d0e9381319b913d85729451852f689fd","symbol":"SAITO"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":4e-18},{"... | 3 | |
38efbadc3624c2a4 | https://github.com/Uniswap/smart-order-router | src/util/chains.ts | 1 | code | typescript | ```ts
export const HAS_L1_FEE = [
ChainId.OPTIMISM,
ChainId.OPTIMISM_GOERLI,
ChainId.OPTIMISM_SEPOLIA,
ChainId.ARBITRUM_ONE,
ChainId.ARBITRUM_GOERLI,
ChainId.ARBITRUM_SEPOLIA,
ChainId.BASE,
ChainId.BASE_GOERLI,
ChainId.BLAST,
ChainId.ZORA,
ChainId.WORLDCHAIN,
ChainId.UNICHAIN_SEPOLIA,
ChainId.... | 36 | |
df6e8cc1a24278af | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,613 | code | javascript | ```json
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":1.26e-16},{"id":"0x7936b04e225833b344e81bcfeb5de7fa59bd6b70","reserveETH":2.6e-17,"token0":{"id":"0x7f97fbdc47cc5b5a3666a2e9143a36e46991af27","symbol":"MOD"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc... | 3 | |
d0bf7c2131aede09 | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,368 | code | javascript | ```json
symbol":"ELE"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0.02320691876551488,"trackedReserveETH":4.996939008193509},{"id":"0x70e688b7ff542bac51ee0e65b77f2f1096e2a361","reserveETH":0.9174020821048045,"token0":{"id":"0x5197fbe1a86679ff1360e27862bf88b0c5119bd8","sym... | 3 | |
8f7b7bc8f8cb1748 | https://github.com/Uniswap/smart-order-router | v2pools.json | 7,123 | code | javascript | ```json
symbol":"WETH"},"totalSupply":582.7620597413921,"trackedReserveETH":0.399558689125704},{"id":"0xef8275cc444ed18df106dc272c07138a20b4a7d8","reserveETH":2.94e-16,"token0":{"id":"0x933714786a4b2efbb68daa3320bf2beaa8049b90","symbol":"FIN"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"}... | 4 | |
59e52772fb68cbfc | https://github.com/Uniswap/smart-order-router | v2pools.json | 6,608 | code | javascript | ```json
token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":4.12e-16},{"id":"0xde26d72fcf376a8a98560c8d57b1465715037851","reserveETH":139.48215908930024,"token0":{"id":"0x9c2dc0c3cc2badde84b0025cf4df1c5af288d835","symbol":"COR"},"token1":{"id":"0xc02aaa39b223f... | 3 | |
4853666b82020c9f | https://github.com/Uniswap/smart-order-router | v2pools.json | 4,799 | code | javascript | ```json
0xa1536ab1cc1b6e828cf08fc9747938c2d419d07c","reserveETH":1.22e-16,"token0":{"id":"0x7d5f6956cbcfbea6e92f8a37cf6d7a206cfffcfd","symbol":"YMAX"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":1.22e-16},{"id":"0xa1546c206a537f8d9e0c2a0c348ad4492a167... | 3 | |
1cecbb228643f2e2 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,568 | code | javascript | ```json
0x3551430efc035fd5b7a8ff60d89e3a5e296c77a4","reserveETH":1.2e-17,"token0":{"id":"0x79f4fb9de652dd6a3ace7d25bb085072c727b373","symbol":"GTU"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":1.2e-17},{"id":"0x35519ec3433d1538e3892f412a0910a638623743... | 4 | |
be06bee4b46019f0 | https://github.com/Uniswap/smart-order-router | v2pools.json | 5,311 | code | javascript | ```json
0xb297b66d2edd9e576dd19b674bb4422283b3ea61","reserveETH":3.7556257151921596e-14,"token0":{"id":"0x49e833337ece7afe375e44f4e3e8481029218e5c","symbol":"VALUE"},"token1":{"id":"0xc299004a310303d1c0005cb14c70ccc02863924d","symbol":"TRI"},"totalSupply":0,"trackedReserveETH":0},{"id":"0xb298d6b389305fe1dac0e92d6198cc... | 5 | |
8b50b0067b1f303d | https://github.com/Uniswap/smart-order-router | v2pools.json | 4,406 | code | javascript | ```json
0x9415cb23607b4b29bfa29c9b223ace9dfebc056e","reserveETH":0.059702631457975976,"token0":{"id":"0x697ef32b4a3f5a4c39de1cb7563f24ca7bfc5947","symbol":"ISLA"},"token1":{"id":"0xec67005c4e498ec7f55e092bd1d35cbc47c91892","symbol":"MLN"},"totalSupply":8.663784029866397,"trackedReserveETH":0},{"id":"0x9416f632fc8cabe12... | 3 | |
3d49224df1992f28 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,024 | code | javascript | ```json
0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","symbol":"WBTC"},"token1":{"id":"0x6b175474e89094c44da98b954eedeac495271d0f","symbol":"DAI"},"totalSupply":0.010035324580868778,"trackedReserveETH":138.94867236925634},{"id":"0x231bcf15b2ca2bb3b533d6b1780346dab2fb2e25","reserveETH":1.2,"token0":{"id":"0x9a1f436d9c8098... | 3 | |
dbb74ffa2a306f3b | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,715 | code | javascript | ```json
0.000006961656879139,"trackedReserveETH":0.40075742277987114},{"id":"0x3a1cd24b566c8fefd488fd722f54fe51185e75de","reserveETH":2e-18,"token0":{"id":"0xa5834a8ebbcf434c1a303da940d181daf2ad2ce5","symbol":"BullDeFi"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"track... | 3 | |
90dc9a9d957c9d16 | https://github.com/Uniswap/smart-order-router | v2pools.json | 6,011 | code | javascript | ```json
0x74751e9bbb55c283c8d1d665a0acebd236f5195a","symbol":"HMT"},"token1":{"id":"0xdac17f958d2ee523a2206206994597c13d831ec7","symbol":"USDT"},"totalSupply":0,"trackedReserveETH":5.187930253528955e-9},{"id":"0xc9e17e789a1cf9136d63ba9a7a9dc3c5506690cf","reserveETH":6.38e-16,"token0":{"id":"0x85e528af869f49df43aea32f50... | 3 | |
375ae099cfb93f17 | https://github.com/Uniswap/smart-order-router | v2pools.json | 2,158 | code | javascript | ```json
0x488678f0d1237713aaa50c341159e15caf9afac8","reserveETH":5.8e-17,"token0":{"id":"0x971bcc7da750a36739d052526c079769dc8abca2","symbol":"HYVE"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":5.8e-17},{"id":"0x48867ef0bca2e58eeea864aa4ff3fcf532e6c28... | 3 | |
1b80b012774217a2 | https://github.com/Uniswap/smart-order-router | v2pools.json | 4,051 | code | javascript | ```json
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0x8817acb4040b031af7235f2cb28e4f8c24eefbbb","reserveETH":1.8e-17,"token0":{"id":"0x8f065a8634bd9a6da53df88f69de826b5d4d52a3","symbol":"GRT"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",... | 3 | |
7d714e808c6b7389 | https://github.com/Uniswap/smart-order-router | v2pools.json | 2,831 | code | javascript | ```json
"0x6b3595068778dd592e39a122f4f5a5cf09c90fe2","symbol":"SUSHI"},"token1":{"id":"0xef69b5697f2fb0345cc680210fd39b593a2f9684","symbol":"MOUTAI"},"totalSupply":1098.147524721987,"trackedReserveETH":0},{"id":"0x5eb858ff9489ec47ec87c44c311216f5032e0fda","reserveETH":7e-17,"token0":{"id":"0x1c0b55a5dfbd1b4724d2b0de052... | 3 | |
f006da315f5015de | https://github.com/Uniswap/smart-order-router | v2pools.json | 161 | code | javascript | ```json
":0,"trackedReserveETH":1.08e-16},{"id":"0x05922b8d0e0a7e6099807ac5fabaf60abc82fbc3","reserveETH":0.000026053569678210098,"token0":{"id":"0x02eca910cb3a7d43ebc7e8028652ed5c6b70259b","symbol":"PTERIA"},"token1":{"id":"0xdac17f958d2ee523a2206206994597c13d831ec7","symbol":"USDT"},"totalSupply":9.47683e-13,"tracked... | 3 | |
589646c4071ea328 | https://github.com/Uniswap/smart-order-router | v2pools.json | 2,137 | code | javascript | ```json
":13.564659966250534,"trackedReserveETH":0.06212205691863787},{"id":"0x47e30a47e7216fb09f60f7aa53f429895c2152cf","reserveETH":2e-18,"token0":{"id":"0x551eff40deacfe40942cae07a2f587b13ca90153","symbol":"Floki"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedR... | 4 | |
da8adffed2a72311 | https://github.com/Uniswap/smart-order-router | v2pools.json | 2,311 | code | javascript | ```json
trackedReserveETH":5.399380465551116e-9},{"id":"0x4d7ee4c763b1c2927f9cce6223a859010d7cb721","reserveETH":2.19824e-13,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xe4d072d3417ddb5243f5bf1a3bc3f2f734dbc679","symbol":"FEX"},"totalSupply":0,"trackedReserveETH":2.1982... | 3 | |
97390d027c7736df | https://github.com/Uniswap/smart-order-router | v2pools.json | 5,747 | code | javascript | ```json
"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0xc15c96ab02dd2b7ae341bc9ee4c091b16391274f","reserveETH":2e-18,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xffb99d91441e8b47208c1b07... | 3 | |
f941876cd926f88a | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,603 | code | javascript | ```json
"trackedReserveETH":1.92e-16},{"id":"0x36705d91cf4409435eb502ffc1c8fff713798943","reserveETH":0.002541953723365751,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xf33c7be3acbec7f0e0397785b56de3dc0eda0809","symbol":"YARN"},"totalSupply":1.348743939395007,"trackedRes... | 5 | |
9207779e3f493050 | https://github.com/Uniswap/smart-order-router | v2pools.json | 269 | code | javascript | ```json
1085.0960043054938,"trackedReserveETH":1.5635087601855355},{"id":"0x0935bcd1f08d41b3f136d4fa126a6bbe14790111","reserveETH":0.44805828612113563,"token0":{"id":"0xa91c82b6933105c23298e631a0c1be751d239162","symbol":"SOTU"},"token1":{"id":"0xbd2f0cd039e0bfcf88901c98c0bfac5ab27566e3","symbol":"DSD"},"totalSupply":4.... | 4 | |
458510b818f00cc7 | https://github.com/Uniswap/smart-order-router | v2pools.json | 26 | code | javascript | ```json
reserveETH":4.8e-17,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xd546db3282b77b3e71cb287061422dc9310fbeed","symbol":"YFIV"},"totalSupply":0,"trackedReserveETH":4.8e-17},{"id":"0x00f902c92e93dbd4ea623f51150678bcb4b1f24f","reserveETH":1.2e-17,"token0":{"id":"0xc02... | 5 | |
1ed0e5691a658c4c | https://github.com/Uniswap/smart-order-router | test/test-util/mock-data.ts | 0 | code | typescript | ```ts
import { BigNumber } from '@ethersproject/bignumber';
import { ChainId, Currency, Ether, Token } from '@uniswap/sdk-core';
import { TokenList } from '@uniswap/token-lists';
import { Pair } from '@uniswap/v2-sdk';
import { encodeSqrtRatioX96, FeeAmount, Pool as V3Pool } from '@uniswap/v3-sdk';
import { Pool as V4P... | 201 | |
47adcecef2f20133 | https://github.com/Uniswap/smart-order-router | v2pools.json | 2,807 | code | javascript | ```json
id":"0x5ddec4b162549d7b1e2dadd88c7666f7894e606e","reserveETH":6.405642755734987e-10,"token0":{"id":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","symbol":"USDC"},"token1":{"id":"0xd919fd88d44f6500cd33b534d27e367a950ef5a3","symbol":"LOOT"},"totalSupply":0,"trackedReserveETH":6.405642755734987e-10},{"id":"0x5de0c0... | 3 | |
242b90ac4cb4c8d7 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,667 | code | javascript | ```json
0x387a7cd55422102d41670a9dce0094665cdc10d2","reserveETH":1e-18,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xd87a4d7ac19626abefa47c1d4ed17e282af70a3d","symbol":"ELON"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0x387bd5f43ed3f5902c4ed2481cf4dce50e274b58","... | 3 | |
011a2c2841a16ecd | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,923 | code | javascript | ```json
reserveETH":2e-18,"token0":{"id":"0x509c9929120cca9d0d246329ac0b8233dc4ccc04","symbol":"ZOOTSWAP"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0x408b019006cd1b2df33961f2e3aeb6c8978bb2ba","reserveETH":2e-18,"token0":{"id":"0xc02aa... | 3 | |
583e3a5de845258e | https://github.com/Uniswap/smart-order-router | v2pools.json | 5,614 | code | javascript | ```json
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalSupply":217.52530677165137,"trackedReserveETH":22.72052554984058},{"id":"0xbceeef99e9b4e8835aa3bef10acacf9ebe7a250e","reserveETH":1e-18,"token0":{"id":"0xb008856fd7617ff284883812000844e912c3bdbd","symbol":"FBM"},"token1":{"id":"0xc02aaa39b223fe8... | 3 | |
45b50522a6cee7af | https://github.com/Uniswap/smart-order-router | v2pools.json | 3,083 | code | javascript | ```json
trackedReserveETH":0.08421412958481266},{"id":"0x6719a3c91478a3543434472984b5813fea96ed05","reserveETH":4.4e-17,"token0":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xe60d63ce4283fa9efe31c75af4e7d255578309ce","symbol":"MASK"},"totalSupply":0,"trackedReserveETH":4.4e-17},{... | 3 | |
1c57c2756ef91616 | https://github.com/Uniswap/smart-order-router | src/providers/v2/caching-subgraph-provider.ts | 0 | code | typescript | ```ts
import { Protocol } from '@uniswap/router-sdk';
import { ChainId } from '@uniswap/sdk-core';
import { CachingSubgraphProvider } from '../caching-subgraph-provider';
import { ICache } from './../cache';
import { IV2SubgraphProvider, V2SubgraphPool } from './subgraph-provider';
/**
* Provider for getting V2 poo... | 118 | |
eb31ec8c7917b2e0 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,833 | code | javascript | ```json
totalSupply":578791.8451395113,"trackedReserveETH":0.000274686594854678},{"id":"0x3dceb5151d63d5b5eb51d0253e9bb4fcc4525eca","reserveETH":1.980345e-12,"token0":{"id":"0xba38b3cdf513979f7d7b9281832fb13388818196","symbol":"MOSHI"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"totalS... | 3 | |
200b56fb96396ba1 | https://github.com/Uniswap/smart-order-router | src/routers/alpha-router/alpha-router.ts | 69 | code | typescript | ```ts
public async userHasSufficientBalance(
fromAddress: string,
tradeType: TradeType,
amount: CurrencyAmount,
quote: CurrencyAmount
): Promise<boolean> {
try {
const neededBalance =
tradeType === TradeType.EXACT_INPUT ? amount : quote;
let balance;
if (neededBalance.cur... | 133 | |
3206ea7e7f8dde8b | https://github.com/Uniswap/smart-order-router | v2pools.json | 5,946 | code | javascript | ```json
0xc7cf2bcea25883dfe2bc59d42846d1fac93b3b25","reserveETH":1.6784338041943991e-9,"token0":{"id":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","symbol":"USDC"},"token1":{"id":"0xa35b0af07180c6e63df129aa6c662014e266b338","symbol":"IBK"},"totalSupply":0,"trackedReserveETH":1.6784338041943991e-9},{"id":"0xc7d04ceef2e0... | 3 | |
4b3e232773e466a4 | https://github.com/Uniswap/smart-order-router | v2pools.json | 6,631 | code | javascript | ```json
token1":{"id":"0xe7fb8aa6593ff2b1da6254d536b63284f16896b5","symbol":"COWS"},"totalSupply":0,"trackedReserveETH":4.8e-17},{"id":"0xdefb33bf923c2810b12d2aab22f20438de99268e","reserveETH":2e-18,"token0":{"id":"0x6a95902b34202cc88e0654cf5d17d9dc8aa2f93c","symbol":"HoSHIB🏆"},"token1":{"id":"0xc02aaa39b223fe8d0a0e5c... | 3 | |
ee2de5faef318f71 | https://github.com/Uniswap/smart-order-router | v2pools.json | 1,822 | code | javascript | ```json
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","symbol":"WETH"},"token1":{"id":"0xdbb990d2eabb687514b5ff4f63b21bfbf5b1f3a7","symbol":"POKERSTARS"},"totalSupply":0,"trackedReserveETH":2e-18},{"id":"0x3d804c8a27c52eab21eccc98a0648bdddc4c814d","reserveETH":3.3e-17,"token0":{"id":"0xa654dcdacae141152df50132f2f37a1b372... | 3 |
End of preview.
Crypto & DeFi Documentation Dataset
A comprehensive dataset of cryptocurrency, DeFi, and blockchain documentation and code suitable for LLM training.
Dataset Description
This dataset contains scraped and processed documentation from various crypto/DeFi sources including:
- Rust Ethereum libraries (ethers-rs, etc.)
- Solidity documentation (official Solidity language docs)
- Smart contracts (Uniswap, Aave, Balancer, SushiSwap, etc.)
- Trading bots (MEV, flashloans, arbitrage)
- Protocol documentation (Tenderly, Alchemy, etc.)
Dataset Statistics
- Total Records: 794,655
- Estimated Tokens: 75,890,740
- Created: 2025-11-23T02:36:21.391841
By Category
| Category | Count |
|---|---|
| code | 9,153 |
| data | 885 |
| documentation | 698,443 |
| infrastructure | 5,954 |
| smart_contract | 76,307 |
| trading_bot | 3,913 |
By Language
| Language | Count |
|---|---|
| rust | 483,803 |
| unknown | 177,872 |
| javascript | 71,476 |
| solidity | 47,370 |
| typescript | 9,912 |
| python | 2,871 |
| markdown | 1,235 |
| toml | 76 |
| console | 22 |
| ts14 | 5 |
| json | 3 |
| b | 3 |
| md | 1 |
| ts90 | 1 |
| ts304 | 1 |
Data Format
Each record is a JSON object with the following fields:
{
"id": "unique_hash_id",
"source": "https://github.com/...",
"file": "original_filename.sol",
"chunk_id": 0,
"category": "smart_contract",
"language": "solidity",
"content": "// SPDX-License-Identifier...",
"token_estimate": 150
}
Usage
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("your-username/crypto-defi-docs", split="train")
# Filter by category
contracts = dataset.filter(lambda x: x['category'] == 'smart_contract')
# Filter by language
solidity = dataset.filter(lambda x: x['language'] == 'solidity')
Sources
- docs.rs (Rust crate documentation)
- docs.soliditylang.org (Solidity official docs)
- GitHub repositories (Uniswap, Flashbots, etc.)
- Protocol documentation (Tenderly, Alchemy, Balancer, etc.)
License
This dataset is provided for educational and research purposes. Individual components may have their own licenses. Please check the original sources for licensing information.
- Downloads last month
- 33