Skip to content

Instantly share code, notes, and snippets.

View ether-wan's full-sized avatar
🎯
Focusing

ether-wan

🎯
Focusing
View GitHub Profile
[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"address","name":"_feeWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"FailedDeployment"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"InsufficientBalance"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[],"type":"error","name":"ReentrancyGuardReentrantCall"},{"inputs":[{"internalType":"address","name":"provider","type":"address","indexed":true},{"internalType":"uint256","name":"tokenAmount","type":"uint256","indexed":false},{"internalType":"uint256","name":"taraAmount","type":"uint256","indexed":false}],"type":"event","name":"LiquidityAd
@ether-wan
ether-wan / overrideBalance.ts
Last active August 1, 2024 20:54
Override ERC-20 balance for an address using Viem & simulateContract
import { createPublicClient, keccak256, numberToHex, pad, toHex, erc20Abi } from "viem";
import { mainnet } from 'viem/chains'
const publicClient = createPublicClient({
chain: mainnet,
transport: http()
});
const overrideBalance = async (balanceSlotIndex : number, walletToOverride : `0x${string}`, newBalanceAmount : bigint, tokenAddress : string) => {
// Convert the address to a 32-byte hex string
@ether-wan
ether-wan / hello.js
Created October 12, 2023 10:07
hello world
console.log("Hello World !");