Skip to content

Instantly share code, notes, and snippets.

@technophile-04
technophile-04 / scaffold.config.ts
Last active March 10, 2024 09:32
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 April 21, 2024 01:51
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"