Skip to content

Instantly share code, notes, and snippets.

@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active May 20, 2024 21:04
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@hewigovens
hewigovens / ens_namehash.swift
Last active November 9, 2018 06:53
ens namehash in swift
import Foundation
import CryptoSwift
//https://github.com/ethereum/EIPs/blob/master/EIPS/eip-137.md
extension String {
public var namehash: String {
var node = Array<UInt8>.init(repeating: 0x0, count: 32)
if self.count > 0 {
node = self.split(separator: ".")
.map { Array($0.utf8).sha3(.keccak256) }