repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/tests/protocol/request_response.rs
tests/protocol/request_response.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
true
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/fuzz/structure-aware/src/main.rs
fuzz/structure-aware/src/main.rs
// Copyright 2025 Security Research Labs GmbH // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/fuzz/simple/src/protocol.rs
fuzz/simple/src/protocol.rs
// Copyright 2025 Security Research Labs GmbH // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/fuzz/simple/src/main.rs
fuzz/simple/src/main.rs
// Copyright 2025 Security Research Labs GmbH // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/syncing.rs
examples/syncing.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/custom_protocol.rs
examples/custom_protocol.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/custom_executor.rs
examples/custom_executor.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/echo_notification.rs
examples/echo_notification.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/mdns_and_ping.rs
examples/mdns_and_ping.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
paritytech/litep2p
https://github.com/paritytech/litep2p/blob/991aa12f60db41543735394bf71fba09332752f8/examples/gossiping.rs
examples/gossiping.rs
// Copyright 2023 litep2p developers // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish...
rust
MIT
991aa12f60db41543735394bf71fba09332752f8
2026-01-04T20:20:42.179941Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/html.rs
src/html.rs
use parser::Block; use parser::Block::{ Blockquote, CodeBlock, Header, Hr, LinkReference, OrderedList, Paragraph, Raw, UnorderedList, }; use parser::Span::{Break, Code, Emphasis, Image, Link, Literal, RefLink, Strong, Text}; use parser::{ListItem, OrderedListType, Span}; use regex::Regex; use std::collections::Hash...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/lib.rs
src/lib.rs
//! A crate for parsing Markdown in Rust #![crate_name = "markdown"] #![deny(missing_docs)] #![deny(warnings)] extern crate regex; #[macro_use] extern crate pipeline; #[macro_use] extern crate lazy_static; use std::fs::File; use std::io::{self, Read}; use std::path::Path; mod html; mod markdown_generator; mod pars...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/main.rs
src/main.rs
extern crate markdown; use std::env; use std::path::Path; fn main() { let args: Vec<String> = env::args().collect(); println!("{:?}", args); let path = Path::new(&args[1]); // let display = path.display(); println!("{}", markdown::file_to_html(&path).unwrap()); }
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/markdown_generator/mod.rs
src/markdown_generator/mod.rs
use super::{Block, ListItem, Span}; trait JoinHelper<I> where I: Iterator, { fn j(self, sep: &'static str) -> String; } impl<I> JoinHelper<I> for I where I: Iterator<Item = String>, { fn j(self, sep: &'static str) -> String { self.collect::<Vec<String>>().join(sep) } } fn gen_block(b: Blo...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/mod.rs
src/parser/mod.rs
mod block; mod span; #[allow(missing_docs)] #[derive(Debug, PartialEq, Eq, Clone)] pub enum OrderedListType { Numeric, Lowercase, Uppercase, LowercaseRoman, UppercaseRoman, } impl OrderedListType { pub fn from_str(type_str: &str) -> OrderedListType { match type_str { "a" =>...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/blockquote.rs
src/parser/block/blockquote.rs
use parser::block::parse_blocks; use parser::Block; use parser::Block::Blockquote; pub fn parse_blockquote(lines: &[&str]) -> Option<(Block, usize)> { // if the first char isnt a blockquote don't even bother if lines[0].is_empty() || !lines[0].starts_with(">") { return None; } // the content o...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/unordered_list.rs
src/parser/block/unordered_list.rs
use parser::block::parse_blocks; use parser::Block; use parser::Block::{Paragraph, UnorderedList}; use parser::ListItem; use regex::Regex; pub fn parse_unordered_list(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref LIST_BEGIN: Regex = Regex::new(r"^(?P<indent> *)(-|\+|\*) ...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/hr.rs
src/parser/block/hr.rs
use parser::Block; use parser::Block::Hr; use regex::Regex; pub fn parse_hr(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref HORIZONTAL_RULE: Regex = Regex::new(r"^(===+)$|^(---+)$").unwrap(); } if HORIZONTAL_RULE.is_match(lines[0]) { return Some((Hr, 1)); } No...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/mod.rs
src/parser/block/mod.rs
use parser::span::parse_spans; use parser::Block; use parser::Block::Paragraph; use parser::Span::{Break, Text}; mod atx_header; mod blockquote; mod code_block; mod hr; mod link_reference; mod ordered_list; mod setext_header; mod unordered_list; use self::atx_header::parse_atx_header; use self::blockquote::parse_block...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/ordered_list.rs
src/parser/block/ordered_list.rs
use parser::block::parse_blocks; use parser::Block; use parser::Block::{OrderedList, Paragraph}; use parser::{ListItem, OrderedListType}; use regex::Regex; pub fn parse_ordered_list(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref LIST_BEGIN: Regex = Regex::new(r"^(?P<inden...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/link_reference.rs
src/parser/block/link_reference.rs
use parser::Block; use parser::Block::LinkReference; use regex::Regex; pub fn parse_link_reference(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref LINK_REFERENCE_SINGLE_LINE: Regex = Regex::new("^\\s*\\[(?P<id>[^\\[\\]]+)\\]:\\s*(?P<url>\\S+)(?:\\s+(?:'(?P<title1>.*)'|\"(?P<title2>.*)...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/setext_header.rs
src/parser/block/setext_header.rs
use parser::span::parse_spans; use parser::Block; use parser::Block::Header; use regex::Regex; pub fn parse_setext_header(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref HORIZONTAL_RULE_1: Regex = Regex::new(r"^===+$").unwrap(); static ref HORIZONTAL_RULE_2: Regex = Regex::new...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/atx_header.rs
src/parser/block/atx_header.rs
use parser::span::parse_spans; use parser::Block; use parser::Block::Header; use regex::Regex; pub fn parse_atx_header(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref ATX_HEADER_RE: Regex = Regex::new(r"^(?P<level>#{1,6})\s(?P<text>.*?)(?:\s#*)?$").unwrap(); } if ...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/block/code_block.rs
src/parser/block/code_block.rs
use parser::Block; use parser::Block::CodeBlock; use regex::Regex; pub fn parse_code_block(lines: &[&str]) -> Option<(Block, usize)> { lazy_static! { static ref CODE_BLOCK_SPACES: Regex = Regex::new(r"^ {4}").unwrap(); static ref CODE_BLOCK_TABS: Regex = Regex::new(r"^\t").unwrap(); static ...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/br.rs
src/parser/span/br.rs
use parser::Span; use parser::Span::Break; use regex::Regex; pub fn parse_break(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref BR: Regex = Regex::new(r"^ {2}$").unwrap(); } if BR.is_match(text) { return Some((Break, 2)); } None } #[cfg(test)] mod test { use s...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/link.rs
src/parser/span/link.rs
use parser::span::parse_spans; use parser::Span; use parser::Span::{Link, RefLink}; use regex::Regex; pub fn parse_link(text: &str) -> Option<(Span, usize)> { lazy_static! { // This is the second part of the regex, that matches the reference or url and title. static ref LINK_ATTR_STR: &'static str ...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/image.rs
src/parser/span/image.rs
use parser::Span; use parser::Span::Image; use regex::Regex; pub fn parse_image(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref IMAGE: Regex = Regex::new("^!\\[(?P<text>.*?)\\]\\((?P<url>.*?)(?:\\s\"(?P<title>.*?)\")?\\)") .unwrap(); } if IMAGE.is_match...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/code.rs
src/parser/span/code.rs
use parser::Span; use parser::Span::Code; use regex::Regex; pub fn parse_code(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref CODE_SINGLE: Regex = Regex::new(r"^`(?P<text>.+?)`").unwrap(); static ref CODE_DOUBLE: Regex = Regex::new(r"^``(?P<text>.+?)``").unwrap(); } if COD...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/emphasis.rs
src/parser/span/emphasis.rs
use parser::span::parse_spans; use parser::Span; use parser::Span::Emphasis; use regex::Regex; pub fn parse_emphasis(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref EMPHASIS_UNDERSCORE: Regex = Regex::new(r"^_(?P<text>.+?)_").unwrap(); static ref EMPHASIS_STAR: Regex = Regex::new(r...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/strong.rs
src/parser/span/strong.rs
use parser::span::parse_spans; use parser::Span; use parser::Span::Strong; use regex::Regex; pub fn parse_strong(text: &str) -> Option<(Span, usize)> { lazy_static! { static ref STRONG_UNDERSCORE: Regex = Regex::new(r"^__(?P<text>.+?)__").unwrap(); static ref STRONG_STAR: Regex = Regex::new(r"^\*\*...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/src/parser/span/mod.rs
src/parser/span/mod.rs
use parser::Span; use parser::Span::{Literal, Text}; mod br; mod code; mod emphasis; mod image; mod link; mod strong; use self::br::parse_break; use self::code::parse_code; use self::emphasis::parse_emphasis; use self::image::parse_image; use self::link::parse_link; use self::strong::parse_strong; pub fn parse_spans(...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/tests/lib.rs
tests/lib.rs
extern crate difference; extern crate markdown; mod fixtures;
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
johannhof/markdown.rs
https://github.com/johannhof/markdown.rs/blob/68ff3f837a24e47219e204b2c420a4f008951387/tests/fixtures/mod.rs
tests/fixtures/mod.rs
use difference; use markdown; use std::fs::File; use std::io::Read; use std::path::Path; fn compare(name: &str) { let html = format!("tests/fixtures/files/{}.html", name); let text = format!("tests/fixtures/files/{}.text", name); let mut comp = String::new(); File::open(Path::new(&html)) .unwra...
rust
Apache-2.0
68ff3f837a24e47219e204b2c420a4f008951387
2026-01-04T20:20:52.013926Z
false
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/ezpdb/src/symbol_types.rs
crates/ezpdb/src/symbol_types.rs
use crate::type_info::Type; use log::warn; use pdb::{FallibleIterator, TypeIndex}; #[cfg(feature = "serde")] use serde::Serialize; use std::cell::RefCell; use std::collections::HashMap; use std::convert::{From, TryFrom}; use std::path::PathBuf; use std::rc::Rc; pub type TypeRef = Rc<RefCell<Type>>; pub type TypeIndexN...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
false
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/ezpdb/src/lib.rs
crates/ezpdb/src/lib.rs
use crate::error::Error; use crate::symbol_types::*; use log::{debug, warn}; use pdb::{ AddressMap, AnnotationReferenceSymbol, FallibleIterator, IdIndex, ItemFinder, Symbol, SymbolData, TypeData, TypeIndex, PDB, }; use std::cell::RefCell; use std::convert::TryInto; use std::fs::File; use std::path::Path; use st...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
false
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/ezpdb/src/error.rs
crates/ezpdb/src/error.rs
use thiserror::Error; use crate::symbol_types::TypeIndexNumber; #[derive(Error, Debug)] pub enum Error { #[error("the PDB parsing library encountered an error: {0}")] PdbCrateError(#[from] pdb::Error), #[error("dependency `{0}` required for parsing is unavailable")] MissingDependency(&'static str), ...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
false
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/ezpdb/src/type_info.rs
crates/ezpdb/src/type_info.rs
use crate::error::Error; use crate::symbol_types::ParsedPdb; use crate::symbol_types::TypeRef; #[cfg(feature = "serde")] use serde::Serialize; use std::convert::{From, TryFrom, TryInto}; use std::rc::Rc; use log::warn; pub trait Typed { /// Returns the size (in bytes) of this type fn type_size(&self, pdb: &Par...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
true
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/bin/main.rs
crates/bin/main.rs
use std::path::PathBuf; use std::str::FromStr; use structopt::StructOpt; use thiserror::Error; mod output; #[derive(Error, Debug)] pub enum CliArgumentError { #[error("the value `{1}` is not valid for the parameter `{0}`")] InvalidValue(&'static str, String), } #[derive(StructOpt, Debug)] #[structopt(name = ...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
false
landaire/pdbview
https://github.com/landaire/pdbview/blob/f9be6c394d93e8f2fd415df6ee15495aac316648/crates/bin/output.rs
crates/bin/output.rs
use ezpdb::symbol_types::*; use ezpdb::type_info::*; use log::{debug, warn}; use std::io::{self, Write}; pub fn print_plain(output: &mut impl Write, pdb_info: &ParsedPdb) -> io::Result<()> { // region: Header info // Print header information writeln!(output, "{:?}:", &pdb_info.path)?; writeln!(output,...
rust
MIT
f9be6c394d93e8f2fd415df6ee15495aac316648
2026-01-04T20:20:57.282285Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/lib.rs
src/lib.rs
//! Library for NBody simulation using the Barnes-Hut algorithm. pub mod vector; pub mod nbody; pub mod quadtree; pub use nbody::{nbody_direct, nbody_barnes_hut};
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/main.rs
src/main.rs
//! Executable to run the simulation locally in a Piston GUI window. extern crate glutin_window; extern crate graphics; extern crate opengl_graphics; extern crate piston; use glutin_window::GlutinWindow as Window; use opengl_graphics::{GlGraphics, OpenGL}; use piston::event_loop::*; use piston::input::*; use piston::w...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/vector/base.rs
src/vector/base.rs
//! Custom 3D vector struct. use std::ops::{Add, AddAssign, Mul, MulAssign, Sub, SubAssign}; use std::fmt::Debug; /// Scalar type: configure floating point precision here. pub type Scalar = f32; /// Vector type that supports linear combinations, cloning, and l2 norm. pub trait Vector: Sized + Copy + ...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/vector/vector3d.rs
src/vector/vector3d.rs
//! Custom 3D vector struct. use std::fmt::Debug; use std::ops::{Add, AddAssign, Mul, MulAssign, Sub, SubAssign}; use super::{Scalar, Vector}; /// Generic 3D vector. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Vector3D { pub x: Scalar, pub y: Scalar, pub z: Scalar, } impl Mul<Scalar> for Vector3D ...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/vector/mod.rs
src/vector/mod.rs
//! Shared utilities. pub mod base; pub mod vector3d; pub use self::base::{Scalar, Vector}; pub use self::vector3d::Vector3D;
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/simulation.rs
src/nbody/simulation.rs
//! Module for defining simulation of bodies (planets, etc.) use rand::Rng; use super::bodies::{Scalar, Vector, Vector3D, MovingBody}; use super::generators::{generate_satellite}; /// Class to configure a simulation #[derive(Debug)] pub struct NBodyConfig<V: Vector> { pub min_dist: Scalar, pub min_dist_sqrd: S...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/direct.rs
src/nbody/direct.rs
//! Direct algorithm using all-pairs force accumulation use super::{NBodySimulation}; use crate::vector::{Scalar, Vector}; use std::f32; /// Runs a single timestep of the simulation using the all-pairs calculation. #[allow(dead_code)] pub fn nbody_direct<V: Vector>(sim: &mut NBodySimulation<V>, dt: Scalar) { for...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/barnes_hut.rs
src/nbody/barnes_hut.rs
//! Barnes hut algorithm use super::{NBodySimulation3D}; use crate::vector::{Scalar, Vector, Vector3D}; use crate::quadtree::{BoundingBox2D, MassQuadtree, MassQuadtreeIterator}; /// Runs a single timestep of the simulation using the Barnes-Hut algorithm. pub fn nbody_barnes_hut(sim: &mut NBodySimulation3D, dt: Scalar,...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/bodies.rs
src/nbody/bodies.rs
// Generic body definitions. pub use crate::vector::{Scalar, Vector, Vector3D}; #[derive(Debug)] pub struct Body<V: Vector> { pub m: Scalar, pub r: V, } #[derive(Debug)] pub struct MovingBody<V: Vector> { pub m: Scalar, pub r: V, pub v: V, } pub type MovingBody3D = MovingBody<Vector3D>;
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/mod.rs
src/nbody/mod.rs
//! N Body simulation pub mod barnes_hut; pub mod bodies; pub mod direct; pub mod generators; pub mod simulation; pub use crate::vector::Vector3D; pub use self::barnes_hut::nbody_barnes_hut; pub use self::bodies::{Body, MovingBody, MovingBody3D}; pub use self::direct::{nbody_direct}; pub use self::generators::{gener...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/nbody/generators.rs
src/nbody/generators.rs
use rand_distr::{Uniform, Distribution, Normal}; use std::f32::{consts::PI}; use super::simulation::{NBodySimulation}; use super::bodies::{Scalar, Vector, MovingBody}; // Generates a satelite around the galaxy center. pub fn generate_satellite<V: Vector>(c: &MovingBody<V>) -> MovingBody<V> { // Generate a randon ...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/quadtree/tree.rs
src/quadtree/tree.rs
//! Quadtree that keeps track of centers of mass. use super::BoundingBox2D; use crate::vector::{Scalar, Vector3D}; const EPSILON: Scalar = 1e-4; /// Computes the l2 norm of a 2d vector represented by x1, y1, x2, y2 fn l2(x1: Scalar, y1: Scalar, x2: Scalar, y2: Scalar) -> Scalar { let dx: Scalar = x2 - x1; let...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/quadtree/mod.rs
src/quadtree/mod.rs
//! TODO mod bb; mod tree; pub use self::bb::{BoundingBox2D}; pub use self::tree::{MassQuadtree, MassQuadtreeIterator}; // pub use plot; // pub use build;
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
Katsutoshii/barnes-hut-rs
https://github.com/Katsutoshii/barnes-hut-rs/blob/2e91f934e8feefac69c4a5d9a568a48e798084d8/src/quadtree/bb.rs
src/quadtree/bb.rs
//! Defines a splitable bounding box use crate::vector::Scalar; /// Splitable bounding box in 2 dimensions. #[derive(Debug, Clone, Copy)] pub struct BoundingBox2D { pub min_x: Scalar, pub max_x: Scalar, pub min_y: Scalar, pub max_y: Scalar } /// implementation for a splitable bounding box in 2 dimensi...
rust
MIT
2e91f934e8feefac69c4a5d9a568a48e798084d8
2026-01-04T20:20:58.527532Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/config.rs
src/config.rs
use eyre::eyre; use starknet::core::types::Felt; use std::env::var; use url::Url; fn env_var_to_field_element(var_name: &str) -> Result<Felt, eyre::Error> { let env_var = var(var_name).map_err(|_| eyre!("missing env var: {var_name}"))?; Ok(Felt::from_hex(&env_var)?) } #[derive(Clone, Debug)] /// Configuratio...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/lib.rs
src/lib.rs
#![cfg_attr(not(any(test, feature = "testing")), warn(unused_crate_dependencies))] use opentelemetry as _; use opentelemetry_otlp as _; use opentelemetry_sdk as _; use tracing_opentelemetry as _; use tracing_subscriber as _; pub mod providers { pub mod alchemy_provider; pub mod debug_provider; pub mod eth_...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/main.rs
src/main.rs
use dotenvy::dotenv; use eyre::Result; use kakarot_rpc::{ client::EthClient, constants::{KAKAROT_RPC_CONFIG, KKRT_BLOCK_GAS_LIMIT, RPC_CONFIG}, eth_rpc::{rpc::KakarotRpcModuleBuilder, run_server}, pool::{ constants::PRUNE_DURATION, mempool::{maintain_transaction_pool, AccountManager}, ...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/constants.rs
src/constants.rs
use crate::{config::KakarotRpcConfig, eth_rpc::config::RPCConfig}; use num_traits::ToPrimitive; use starknet::{ core::types::{Felt, NonZeroFelt}, providers::{jsonrpc::HttpTransport, JsonRpcClient, Provider}, }; use std::sync::LazyLock; /// The max chain id allowed by [Metamask](https://gist.github.com/rekmarks...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/pool/mod.rs
src/pool/mod.rs
pub mod constants; pub mod mempool; pub mod validate;
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/pool/mempool.rs
src/pool/mempool.rs
#![allow(clippy::significant_drop_tightening)] use super::validate::KakarotTransactionValidator; use crate::{ client::EthClient, constants::{KAKAROT_RPC_CONFIG, KKRT_BLOCK_GAS_LIMIT}, into_via_try_wrapper, pool::constants::ONE_TENTH_ETH, providers::eth_provider::{database::state::EthDatabase, stark...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/pool/constants.rs
src/pool/constants.rs
use std::time::Duration; pub(super) static ONE_TENTH_ETH: u64 = 10u64.pow(17); // Transactions should be pruned after 5 minutes in the mempool pub const PRUNE_DURATION: Duration = Duration::from_secs(300);
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/pool/validate.rs
src/pool/validate.rs
#![allow(unused_variables, clippy::struct_excessive_bools)] use crate::providers::eth_provider::{ database::state::EthDatabase, provider::EthereumProvider, starknet::kakarot_core::get_white_listed_eip_155_transaction_hashes, }; use alloy_consensus::constants::{EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/tracing/builder.rs
src/tracing/builder.rs
use super::{Tracer, TracerResult}; use crate::providers::eth_provider::{ database::{ state::{EthCacheDatabase, EthDatabase}, types::transaction::ExtendedTransaction, }, error::{EthApiError, TransactionError}, provider::EthereumProvider, }; use alloy_primitives::{B256, U256}; use alloy_rp...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/tracing/mod.rs
src/tracing/mod.rs
pub mod builder; use crate::{ providers::eth_provider::{ database::state::EthCacheDatabase, error::{EthApiError, TransactionError}, provider::EthereumProvider, }, tracing::builder::TracingOptions, }; use alloy_primitives::{ruint::FromUintError, B256}; use alloy_rpc_types::{Transacti...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/models/block.rs
src/models/block.rs
use crate::{ into_via_try_wrapper, providers::eth_provider::{constant::STARKNET_MODULUS, error::EthereumDataFormatError}, }; use alloy_eips::{BlockId as EthereumBlockId, BlockNumberOrTag}; use alloy_primitives::U256; use starknet::core::types::{BlockId as StarknetBlockId, BlockTag}; #[derive(Debug)] pub struct...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/models/mod.rs
src/models/mod.rs
pub mod block; pub mod felt; pub mod token; pub mod transaction;
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/models/felt.rs
src/models/felt.rs
use crate::providers::eth_provider::error::EthereumDataFormatError; use alloy_primitives::{Address, B256, U256, U64}; use starknet::core::types::{EthAddress, Felt}; use std::ops::{Deref, DerefMut}; #[derive(Clone, Debug)] pub struct Felt252Wrapper(Felt); impl From<Felt> for Felt252Wrapper { fn from(felt: Felt) ->...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/models/transaction.rs
src/models/transaction.rs
use crate::providers::eth_provider::{ provider::EthApiResult, starknet::kakarot_core::{ETH_SEND_TRANSACTION, KAKAROT_ADDRESS}, utils::split_u256, }; use alloy_consensus::transaction::Transaction as _; use alloy_rlp::Encodable; use reth_primitives::{transaction::legacy_parity, Transaction, TransactionSigned}...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/models/token.rs
src/models/token.rs
use alloy_primitives::{Address, U256}; use serde::{Deserialize, Serialize}; /// Represents the balance of a specific ERC20 token. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct TokenBalance { /// The address of the ERC20 token. pub token_address: Address, /// The balance of the E...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/bin/hive_genesis.rs
src/bin/hive_genesis.rs
use clap::Parser; use kakarot_rpc::test_utils::{hive::HiveGenesisConfig, katana::genesis::KatanaGenesisBuilder}; use starknet::core::types::Felt; use std::path::PathBuf; #[derive(Parser)] struct Args { #[clap(long, short)] kakarot_contracts: PathBuf, #[clap(long)] hive_genesis: PathBuf, #[clap(long...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/bin/katana_genesis.rs
src/bin/katana_genesis.rs
use alloy_primitives::{B256, U256}; use dotenvy::dotenv; use kakarot_rpc::test_utils::katana::genesis::KatanaGenesisBuilder; use starknet::core::types::Felt; use std::{ env::var, path::{Path, PathBuf}, str::FromStr, sync::LazyLock, }; /// Katana genesis folder path. static GENESIS_FOLDER_PATH: LazyLock...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/bin/hive_chain.rs
src/bin/hive_chain.rs
#![allow(clippy::significant_drop_tightening)] use alloy_primitives::bytes::{Buf, BytesMut}; use alloy_rlp::Decodable; use clap::Parser; use kakarot_rpc::{ into_via_try_wrapper, providers::{eth_provider::starknet::relayer::Relayer, sn_provider::StarknetProvider}, }; use reth_primitives::{Block, BlockBody}; use...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/alchemy_provider.rs
src/providers/alchemy_provider.rs
use crate::{ models::token::{TokenBalance, TokenBalances, TokenMetadata}, providers::eth_provider::{ contracts::erc20::EthereumErc20, error::EthApiError, provider::{EthApiResult, EthereumProvider}, }, }; use alloy_eips::BlockNumberOrTag; use alloy_primitives::{Address, U256}; use asy...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/debug_provider.rs
src/providers/debug_provider.rs
use crate::{ providers::eth_provider::{ error::{EthApiError, SignatureError}, provider::{EthApiResult, EthereumProvider}, }, tracing::builder::TracerBuilder, }; use alloy_eips::{eip2718::Encodable2718, BlockId, BlockNumberOrTag}; use alloy_primitives::{Bytes, B256}; use alloy_rlp::Encodable;...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/pool_provider.rs
src/providers/pool_provider.rs
use super::eth_provider::TxPoolProvider; use crate::providers::eth_provider::{database::types::transaction::ExtendedTransaction, provider::EthApiResult}; use alloy_primitives::Address; use alloy_rpc_types_txpool::{TxpoolContent, TxpoolContentFrom, TxpoolInspect, TxpoolInspectSummary, TxpoolStatus}; use async_trait::asy...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/transactions.rs
src/providers/eth_provider/transactions.rs
use super::{ database::{ filter::EthDatabaseFilterBuilder, types::transaction::{ExtendedTransaction, StoredTransaction}, }, error::ExecutionError, starknet::kakarot_core::{account_contract::AccountContractReader, starknet_address}, utils::{contract_not_found, entrypoint_not_found}, }...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/state.rs
src/providers/eth_provider/state.rs
use super::{ database::state::{EthCacheDatabase, EthDatabase}, error::{EthApiError, ExecutionError, TransactionError}, starknet::kakarot_core::{account_contract::AccountContractReader, starknet_address}, utils::{contract_not_found, entrypoint_not_found, split_u256}, }; use crate::{ into_via_wrapper,...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/chain.rs
src/providers/eth_provider/chain.rs
use crate::providers::eth_provider::{ error::KakarotError, provider::{EthApiResult, EthDataProvider}, }; use alloy_primitives::{U256, U64}; use alloy_rpc_types::{SyncInfo, SyncStatus}; use async_trait::async_trait; use auto_impl::auto_impl; use starknet::core::types::SyncStatusType; use tracing::Instrument; #[...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/error.rs
src/providers/eth_provider/error.rs
use alloy_primitives::{Bytes, B256}; use alloy_rpc_types::BlockHashOrNumber; use alloy_sol_types::decode_revert_reason; use jsonrpsee::types::ErrorObject; use num_traits::cast::ToPrimitive; use reth_rpc_eth_types::{error::ToRpcError, EthApiError as RethEthApiError}; use reth_transaction_pool::error::PoolError; use star...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/utils.rs
src/providers/eth_provider/utils.rs
use alloy_primitives::{U128, U256}; use cainome::cairo_serde::Error; use starknet::{ core::types::{ContractErrorData, StarknetError}, providers::ProviderError, }; /// Splits a U256 value into two generic values implementing the From<u128> trait #[inline] pub fn split_u256<T: From<u128>>(value: impl Into<U256>)...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/mod.rs
src/providers/eth_provider/mod.rs
pub mod blocks; pub mod chain; pub mod constant; pub mod contracts; pub mod database; pub mod error; pub mod gas; pub mod logs; pub mod provider; pub mod receipts; pub mod starknet; pub mod state; pub mod transactions; pub mod tx_pool; pub mod utils; pub use blocks::*; pub use chain::*; pub use gas::*; pub use logs::*...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/constant.rs
src/providers/eth_provider/constant.rs
use alloy_primitives::{B256, U256}; use serde::{Deserialize, Serialize}; use starknet::core::types::Felt; use std::{str::FromStr, sync::LazyLock}; /// Maximum priority fee per gas pub static MAX_PRIORITY_FEE_PER_GAS: LazyLock<u64> = LazyLock::new(|| 0); /// Maximum number of logs that can be fetched in a single reque...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/gas.rs
src/providers/eth_provider/gas.rs
use super::{ constant::BLOCK_NUMBER_HEX_STRING_LEN, error::{ExecutionError, KakarotError}, starknet::kakarot_core::{core::KakarotCoreReader, KAKAROT_ADDRESS}, }; use crate::{ into_via_wrapper, providers::eth_provider::{ database::{filter::format_hex, types::header::StoredHeader}, pro...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/receipts.rs
src/providers/eth_provider/receipts.rs
use super::database::{filter::EthDatabaseFilterBuilder, types::receipt::StoredTransactionReceipt}; use crate::providers::eth_provider::{ database::{ ethereum::EthereumBlockStore, filter::{self}, types::receipt::ExtendedTxReceipt, }, provider::{EthApiResult, EthDataProvider}, }; use a...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/blocks.rs
src/providers/eth_provider/blocks.rs
use super::{ database::{ ethereum::EthereumBlockStore, types::{header::ExtendedBlock, transaction::ExtendedTransaction}, }, error::KakarotError, }; use crate::providers::eth_provider::{ database::ethereum::EthereumTransactionStore, provider::{EthApiResult, EthDataProvider}, }; use al...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/logs.rs
src/providers/eth_provider/logs.rs
use super::{ constant::MAX_LOGS, database::{filter::EthDatabaseFilterBuilder, types::log::StoredLog}, error::EthApiError, }; use crate::providers::eth_provider::{ database::{ filter::{self}, FindOpts, }, provider::{EthApiResult, EthDataProvider}, BlockProvider, }; use alloy_r...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/provider.rs
src/providers/eth_provider/provider.rs
use super::{ constant::CALL_REQUEST_GAS_LIMIT, database::{ethereum::EthereumBlockStore, Database}, error::{EthApiError, EvmError, ExecutionError, TransactionError}, starknet::kakarot_core::{ self, core::{CallInput, KakarotCoreReader, Uint256}, KAKAROT_ADDRESS, }, }; use crate...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/tx_pool.rs
src/providers/eth_provider/tx_pool.rs
use super::database::types::transaction::ExtendedTransaction; use crate::providers::eth_provider::provider::EthApiResult; use alloy_rpc_types_txpool::TxpoolContent; use async_trait::async_trait; use auto_impl::auto_impl; use mongodb::bson::doc; /// Ethereum provider trait. Used to abstract away the database and the ne...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/starknet/relayer.rs
src/providers/eth_provider/starknet/relayer.rs
use crate::{ constants::STARKNET_CHAIN_ID, models::transaction::transaction_data_to_starknet_calldata, providers::eth_provider::{ database::{ethereum::EthereumTransactionStore, types::transaction::EthStarknetHashes, Database}, error::{SignatureError, TransactionError}, provider::EthA...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/starknet/mod.rs
src/providers/eth_provider/starknet/mod.rs
#![allow(non_snake_case, clippy::derive_partial_eq_without_eq)] pub mod kakarot_core; pub mod relayer; use cainome::rs::abigen_legacy; use starknet::core::types::Felt; use std::sync::LazyLock; abigen_legacy!(ERC20, "./.kakarot/artifacts/ERC20.json"); /// Starknet native token address pub static STARKNET_NATIVE_TOKEN...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/starknet/kakarot_core.rs
src/providers/eth_provider/starknet/kakarot_core.rs
#![allow(clippy::too_many_arguments)] use crate::into_via_wrapper; use alloy_primitives::{Address, B256}; use cainome::rs::abigen_legacy; use dotenvy::dotenv; use starknet::{ core::{types::Felt, utils::get_contract_address}, macros::selector, }; use std::{str::FromStr, sync::LazyLock}; // Contract ABIs pub mo...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/contracts/mod.rs
src/providers/eth_provider/contracts/mod.rs
pub mod erc20;
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/contracts/erc20.rs
src/providers/eth_provider/contracts/erc20.rs
#![allow(clippy::pub_underscore_fields)] use crate::providers::eth_provider::{ error::ExecutionError, provider::{EthApiResult, EthereumProvider}, }; use alloy_dyn_abi::DynSolType; use alloy_eips::BlockId; use alloy_primitives::{Address, Bytes, TxKind, U256}; use alloy_rpc_types::{request::TransactionInput, Tra...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/ethereum.rs
src/providers/eth_provider/database/ethereum.rs
use super::{ filter, filter::EthDatabaseFilterBuilder, types::{ header::{ExtendedBlock, StoredHeader}, transaction::{ExtendedTransaction, StoredTransaction}, }, Database, }; use crate::providers::eth_provider::{ database::types::transaction::{EthStarknetHashes, StoredEthStarknetT...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/filter.rs
src/providers/eth_provider/database/filter.rs
use crate::providers::eth_provider::constant::{ ADDRESS_HEX_STRING_LEN, BLOCK_NUMBER_HEX_STRING_LEN, HASH_HEX_STRING_LEN, LOGS_TOPICS_HEX_STRING_LEN, U64_HEX_STRING_LEN, }; use alloy_primitives::{Address, B256}; use alloy_rpc_types::{BlockHashOrNumber, Index, Topic}; use mongodb::bson::{doc, Document}; use std:...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/state.rs
src/providers/eth_provider/database/state.rs
use crate::providers::eth_provider::{error::EthApiError, provider::EthereumProvider}; use alloy_primitives::{Address, B256, U256}; use alloy_rpc_types::{serde_helpers::JsonStorageKey, BlockId}; use reth_revm::{ db::CacheDB, primitives::{AccountInfo, Bytecode}, DatabaseRef, }; use tokio::runtime::Handle; #[...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/mod.rs
src/providers/eth_provider/database/mod.rs
pub mod ethereum; pub mod filter; pub mod state; pub mod types; use super::error::KakarotError; use crate::providers::eth_provider::database::types::{ header::StoredHeader, log::StoredLog, receipt::StoredTransactionReceipt, transaction::{StoredEthStarknetTransactionHash, StoredTransaction}, }; use futu...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/types/log.rs
src/providers/eth_provider/database/types/log.rs
use super::receipt::StoredTransactionReceipt; use alloy_rpc_types::Log; use serde::{Deserialize, Serialize}; use std::ops::Deref; /// A transaction receipt as stored in the database #[derive(Debug, Deserialize, Clone, PartialEq, Eq, Serialize)] pub struct StoredLog { #[serde(deserialize_with = "crate::providers::e...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/types/header.rs
src/providers/eth_provider/database/types/header.rs
use super::transaction::ExtendedTransaction; use alloy_rpc_types::{Block, Header}; use alloy_serde::WithOtherFields; use serde::{Deserialize, Serialize}; use std::ops::Deref; #[cfg(any(test, feature = "arbitrary", feature = "testing"))] use { alloy_consensus::constants::EMPTY_ROOT_HASH, alloy_primitives::{B256,...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/types/receipt.rs
src/providers/eth_provider/database/types/receipt.rs
use alloy_rpc_types::TransactionReceipt; use alloy_serde::WithOtherFields; #[cfg(any(test, feature = "arbitrary", feature = "testing"))] use reth_primitives::Receipt; use serde::{Deserialize, Serialize}; /// Type alias for a transaction receipt with additional fields. pub type ExtendedTxReceipt = WithOtherFields<Trans...
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false
kkrt-labs/kakarot-rpc
https://github.com/kkrt-labs/kakarot-rpc/blob/6b48598a85bb2598123e1be7237da9832d0d5eaa/src/providers/eth_provider/database/types/mod.rs
src/providers/eth_provider/database/types/mod.rs
pub mod header; pub mod log; pub mod receipt; pub mod serde; pub mod transaction;
rust
MIT
6b48598a85bb2598123e1be7237da9832d0d5eaa
2026-01-04T20:20:26.112976Z
false