Skip to content

Instantly share code, notes, and snippets.

from web3 import Web3, HTTPProvider
endpoint = 'YOUR_ENDPOINT_URL_HERE'
connection = Web3(HTTPProvider(endpoint))
address = input("Enter ETH wallet address: ")
balance = connection.fromWei(
connection.eth.getBalance(address, 'latest'), 'ether')
print(f"Balance: {balance} ether")
from web3 import Web3, HTTPProvider
import streamlit as st
w3 = Web3(HTTPProvider(YOUR_QUICKNODE_ENDPOINT_URL))
st.header("Ethereum Address Explorer")
address = st.text_input("Wallet Address")
submit = st.button("Fetch Txs")
@a26nine
a26nine / sp-qn.js
Created November 4, 2022 13:39
A simple script to test the response time of two node providers.
const solanaWeb3 = require('@solana/web3.js');
(async () => {
const SP = <YOUR_URL>;
const QN = <QN_ENDPOINT>;
const testCount = 7;
const establishConnection = async (rpcProvider) => {
const connection = new solanaWeb3.Connection(rpcProvider, 'confirmed');
@a26nine
a26nine / alt-vt.js
Last active October 16, 2022 11:36
Address Lookup Tables and Versioned Transactions on Solana (from blog.a269nine.dev)
// Import required modules
const solana = require('@solana/web3.js');
const bs58 = require('bs58');
// Set required variables
const PRIVATE_KEY = [YOUR_PRIVATE_KEY_FROM_PHANTOM_WALLET];
const ENDPOINT = [YOUR_QUICKNODE_ENDPOINT_URL];
// List of account addresses for lookup table
let tableEntries = [
Filter ID: 0x82
Transactions: 6
Filter ID: 0x83
Transactions: 0
Filter ID: 0x84
Transactions: 1
Filter ID: 0x85
Transactions: 4
Filter ID: 0x86
Transactions: 0