1 class Ethereum < Formula
2 desc "Official Go implementation of the Ethereum protocol"
3 homepage "https://geth.ethereum.org/"
4 url "https://github.com/ethereum/go-ethereum/archive/refs/tags/v1.15.0.tar.gz"
5 sha256 "b720c91aa6d721ba1f9ec753fa216b27880d0fdcb3204d0725d411d215507a13"
6 license "LGPL-3.0-or-later"
7 head "https://github.com/ethereum/go-ethereum.git", branch: "master"
11 strategy :github_latest
15 sha256 cellar: :any_skip_relocation, arm64_sequoia: "18ea2d65b0920a84220d0990f99bb1710476c6f47810e8baa2894429b5023f04"
16 sha256 cellar: :any_skip_relocation, arm64_sonoma: "d21db4489b02089d028aa86b968174e9766ee72aadd84076033db575788d905b"
17 sha256 cellar: :any_skip_relocation, arm64_ventura: "b92cd7a8aec12ae55aaa429e13d87275a6e8e8fec8e74ce6d05f15c0d8c5a10a"
18 sha256 cellar: :any_skip_relocation, sonoma: "c1301eb97ce0bd81b4e4af5e0deb2c14544115dc5fb5546b1dcd980bbcaf44b6"
19 sha256 cellar: :any_skip_relocation, ventura: "318625ff790c0aa3a27adcee3ad9fe48daa6fd54ac6abc01d685ab4646dd3cf3"
20 sha256 cellar: :any_skip_relocation, x86_64_linux: "a5c5d3d6d76a20cd42d3fcdc6f2ce2e83347481ec188b40d7ceff00d32238fc0"
23 depends_on "go" => :build
25 conflicts_with "erigon", because: "both install `evm` binaries"
28 # Force superenv to use -O0 to fix "cgo-dwarf-inference:2:8: error:
29 # enumerator value for '__cgo_enum__0' is not an integer constant".
30 # See discussion in https://github.com/Homebrew/brew/issues/14763.
34 bin.install Dir["build/bin/*"]
38 (testpath/"genesis.json").write <<~JSON
44 "difficulty": "0x20000",
45 "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
46 "coinbase": "0x0000000000000000000000000000000000000000",
48 "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
50 "gasLimit": "0x2FEFD8",
55 system bin/"geth", "--datadir", "testchain", "init", "genesis.json"
56 assert_predicate testpath/"testchain/geth/chaindata/000002.log", :exist?
57 assert_predicate testpath/"testchain/geth/nodekey", :exist?
58 assert_predicate testpath/"testchain/geth/LOCK", :exist?