Skip to content

Instantly share code, notes, and snippets.

@anastasiarods
anastasiarods / index.ts
Created October 20, 2024 19:37
Example of decoding EVM Gnosis Safe Calldata with Loop Decoder
import { createPublicClient, http } from 'viem'
// Create a public client for the Ethereum Mainnet network
const getPublicClient = (chainId: number) => {
return {
client: createPublicClient({
transport: http('https://rpc.ankr.com/eth'),
}),
}
}
@anastasiarods
anastasiarods / index.ts
Created October 20, 2024 19:12
Example of decoding EVM tx with Loop Decoder
import { createPublicClient, http } from 'viem'
// Create a public client for the Ethereum Mainnet network
const getPublicClient = (chainId: number) => {
return {
client: createPublicClient({
transport: http('https://rpc.ankr.com/eth'),
}),
}
}
@anastasiarods
anastasiarods / index.ts
Last active November 21, 2024 06:17
Create Farcaster signer
//@ts-nocheck
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable no-console */
import {
createWalletClient,
http,
toHex,
encodeAbiParameters,
type EncodeAbiParametersReturnType,
type Hex,