Skip to content

Instantly share code, notes, and snippets.

View denniswon's full-sized avatar

Dennis Won denniswon

View GitHub Profile
@denniswon
denniswon / beeper-minimal.css
Last active October 18, 2024 00:01
beeper-minimal.css
body {
font-family: 'Space Grotesk';
}
/******************************************************************/
/* Ensure 'report bug' dialog doesn't take over the entire screen */
/******************************************************************/
#mx_Dialog_Container div[aria-describedby="report_bug"] {
/* Don't take up the entire screen */
width: fit-content;
body {
font-family: 'Space Grotesk';
}
.rooms_filters p {
font-size: 11px;
}
.favourites__row {
padding-top: 12px;

How to Add a Precompile to Geth

In this tutorial, we will walk through how to create your own precompile and add it to Geth.

What Is a Precompile in Geth?

In Geth, precompiles are a set of stateless contracts. But unlike Solidity code, their logic isn't in the smart contract code itself—they are part of the Geth client. You can think of a precompile as an interface that can execute Go code that resides within the Geth client.

How Precompiles Are Implemented in Geth

The logic for precompiles in Geth is located in the core/vm/contracts.go file.

@denniswon
denniswon / ts
Last active April 26, 2024 03:32
split-rpc-client.ts
const client = createBundlerClient({
chain,
transport: (opts) => {
const bundlerRpc = http(`${BUNDLER_RPC}`)(opts);
const paymasterRpc = http(`${PAYMASTER_RPC}`)(opts);
const publicRpc = http(`${PUBLIC_RPC}`)(
opts
);
return custom({
@denniswon
denniswon / gist:27a928775468564ecd3f872f48ebedb6
Created April 26, 2024 03:24
split rpc for bundler, paymater and public rpc
const client = createBundlerClient({
chain,
transport: (opts) => {
const bundlerRpc = http(`${rpcUrl}/${API_KEY_STAGING}`)(opts);
const publicRpc = http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY}`)(
opts
);
return custom({
request: async (args) => {
brew bundle
Tapping homebrew/cask
Error: Tapping homebrew/cask is no longer typically necessary.
Add --force if you are sure you need it done.
Tapping homebrew/cask has failed!
Using homebrew/cask-fonts
Using pulumi/tap
Using rosetta2
Using alchemy-homebrew
Using alchemy-gh
@denniswon
denniswon / 0001-fix-viem-patch-for-unblocking-aa-sdk.patch
Last active November 2, 2023 02:00
uniswap + acocuntkit: viem patch
From 7d6d248f48f387d121a312d61948ee017cbca861 Mon Sep 17 00:00:00 2001
From: Dennis Won <[email protected]>
Date: Wed, 1 Nov 2023 17:50:39 -0700
Subject: [PATCH] fix: viem patch for unblocking aa-sdk
---
package.json | 3 +-
patches/viem+1.18.1.patch | 1292 +++++++++++++++++++++++++++++++++++++
yarn.lock | 66 +-
3 files changed, 1356 insertions(+), 5 deletions(-)
@denniswon
denniswon / .zshrc
Created October 14, 2023 22:16
denniswon .zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# arm64 homebrew in /opt/homebrew is the default option
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
did:3:bafyreihe2gk2k56jefakpwn4beft3sjnbycrfkvlnfpeqevj52y6x2dluu
@denniswon
denniswon / gist:cf350f6899df147911aa670f485b501b
Created August 10, 2020 21:11
node 1 connected to coordinator node
ubuntu@ip-172-31-21-226:~/sentinel-ai/node (master) $ Connected to IPFS v0.4.23
Connected to IPFS v0.4.23
Connected to Web3 v5.2.0
Connected to Web3 v5.2.0
Connected to IPFS v0.4.23
Connecting to Coordinator
{'eth_address': '0xBeb71662FF9c08aFeF3866f85A6591D4aeBE6e4E',
'ip': 'http://204.236.188.162:5001'}
Connected to Coordinator Node
Connecting to Coordinator