Skip to content

Instantly share code, notes, and snippets.

View kmjones1979's full-sized avatar
🌴
Vibe Coding

Kevin J kmjones1979

🌴
Vibe Coding
View GitHub Profile
@technophile-04
technophile-04 / scaffold.config.ts
Last active September 22, 2024 12:49
SE-2 frontend config custom chain
import * as chains from "viem/chains";
// Blast chain
export const blast = {
id: 81457,
name: "Blast",
network: "blast",
nativeCurrency: { name: "Blast", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.blast.io"] },
@hrkrshnn
hrkrshnn / generic.org
Last active March 19, 2025 23:52
Some generic writeup about common gas optimizations, etc.

Upgrade to at least 0.8.4

Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!

The advantages of versions 0.8.* over <0.8.0 are:

  • Safemath by default from 0.8.0 (can be more gas efficient than some library based safemath).
  • Low level inliner from 0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
package main
import (
"encoding/json"
"errors"
"fmt"
"github.com/cactus/go-statsd-client/statsd"
"io/ioutil"
"log"
"net/http"