Skip to content

Instantly share code, notes, and snippets.

View denniswon's full-sized avatar

Dennis Won denniswon

View GitHub Profile
@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 <jhwon0820@gmail.com>
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
== 7/21 ==
1. Finished the first draft of new ERC20 version of Harmony puzzle dapp: decentralized version, txns happening on client-side without the use of previous central server on Samsung galaxy S20 device with native wallet/keystore integration. https://drive.google.com/file/d/126dPqnGdYzhNrqdK62irAoVQE9kbORPH/view?usp=sharing
cc: @Nick White#8086 :ocean: @Sahil D#5463 @Li | Harmony.one 🎽#7220
This is only the first draft of ERC20 version. Submitting and will be iterating with Samsung for production on Samsung Blockchain Store/Wallet integration.
2. conducted and submitted interview feed on lever for a fullstack engineer position candidate: jenya cc: @Yuriy | Harmony#7679 @Rongjian Lan | Harmony#9543
3. Mainnet explorer HRC20 productionization: Tried to productionize hrc20 update on mainnet, and faced many set up/code incompatibility that blocked the update. Managed to resolve the set up conflicts with ssl/node/vue.js, etc. but at the end, also realized that the current code status of HRC20 branch has
Executing tasks: [clean, :libcocos2dx:assembleDebug, :HarmonyPuzzle:assembleDebug] in project /Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2djs_shared/__/__/__/Classes/AppDelegate.o'. Stop.
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/debug/obj/loc
@denniswon
denniswon / Harmony Block Explorer prod deployment
Created June 4, 2020 22:12
Harmony Block Explorer prod deployment steps
1. Coordinate with lc@harmony.one (Leo Chen) on setting up "Harmony-Dev Role" for your AWS account.
2. Here are ip addresses of explorer services (mainnet vs. testnet) that we run on AWS Oregon region
AWS_EXPLORER=35.167.126.78
AWS_EXPLORER_LRTN=44.232.43.231
3. Find these instances and make sure to add your wifi public ip to the security group so that you can ssh into the machine from your ip.
4. SSH into the machine. ex) ssh -i ~/.ssh/keys/oregon-key-benchmark.pem ec2-user@35.167.126.78