Skip to content

Instantly share code, notes, and snippets.

View kallydev's full-sized avatar
🦊
Web3 Fox

KallyDev kallydev

🦊
Web3 Fox
View GitHub Profile
@kallydev
kallydev / Cargo.toml
Last active May 14, 2024 11:19
Alloy log subscriber.
[package]
name = "playground"
version = "0.1.0"
edition = "2021"
[dependencies]
alloy = { git = "https://github.com/alloy-rs/alloy.git", features = ["contract", "provider-ws", "rpc-types-eth"] }
anyhow = "1.0.82"
tokio = { version = "1.37.0", features = ["full"] }
tracing = "0.1.40"
@kallydev
kallydev / dns_client.rs
Last active May 7, 2024 04:34
Hickory DNS UDP client.
use std::str::FromStr;
use hickory_client::client::{AsyncClient, ClientHandle};
use hickory_client::rr::{DNSClass, Name, RecordType};
use hickory_client::udp::UdpClientStream;
use tokio::net::UdpSocket;
#[tokio::test]
async fn test() -> anyhow::Result<()> {
let dns_socket_addr = ([223, 5, 5, 5], 53).into();
@kallydev
kallydev / Cargo.toml
Last active May 7, 2024 04:35
Use Alloy to trace transactions of a block.
[package]
name = "example"
version = "0.1.0"
edition = "2021"
[dependencies]
tokio = { version = "1.37.0", features = ["full"] }
anyhow = "1.0.82"
alloy = { git = "https://github.com/alloy-rs/alloy", features = ["provider-ws", "transport-ws", "rpc-types-trace", "eips"] }
futures = "0.3.30"

Languages

Frontend

Backend

DEST-PORT,9000,DIRECT
DEST-PORT,12000,DIRECT
DEST-PORT,13000,DIRECT
DEST-PORT,30301,DIRECT
DEST-PORT,30303,DIRECT
DEST-PORT,30304,DIRECT
DEST-PORT,30311,DIRECT
DEST-PORT,30404,DIRECT
@kallydev
kallydev / docker-compose.yaml
Created March 21, 2023 15:05
Arbitrum Nitro node
services:
nitro-node:
image: offchainlabs/nitro-node:v2.0.11-8e786ec
volumes:
- /data/arbitrum:/home/user/.arbitrum
ports:
- "8547:8547"
- "8548:8548"
- "9642:9642"
command:
@kallydev
kallydev / languages.png
Last active October 21, 2024 04:21
Languages
languages.png
@kallydev
kallydev / redis_test.go
Last active March 1, 2022 04:38
Using SSH Tunnel to connect to Redis in Go.
package redis_test
import (
"github.com/go-redis/redis"
"golang.org/x/crypto/ssh"
"io/ioutil"
"net"
"testing"
)
package subscriber
import (
"context"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/go-redis/redis/v8"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@kallydev
kallydev / main.go
Last active December 4, 2021 12:16
Generates an ETH address in a specific format.
package main
import (
"crypto/ecdsa"
"fmt"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/sirupsen/logrus"
"os"
"strings"