44 lines
1.6 KiB
Ruby
44 lines
1.6 KiB
Ruby
class Ethereum < Formula
|
|
desc "Official Go implementation of the Ethereum protocol"
|
|
homepage "https://ethereum.github.io/go-ethereum/"
|
|
url "https://github.com/ethereum/go-ethereum/archive/v1.8.13.tar.gz"
|
|
sha256 "c0c211172c1bc80855d19387300321fe233708bf8af1e4839ccf3b7de447bfb1"
|
|
head "https://github.com/ethereum/go-ethereum.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "a1d88f735ff6bde50c531ca1515458edec5b8481ea86c361c92472017f27fa0e" => :mojave
|
|
sha256 "e09e304bd77c12882ece0c38abdcbbc422a4124593b020e094a665f837bdb4da" => :high_sierra
|
|
sha256 "84fe00f16a74d977386b09b3e8e4b4c03edc6f566fa50699396e12108207d11b" => :sierra
|
|
sha256 "b07223f2cd30d78cb8ce1400449f9e4675882fc1d116d44f9fe330d4c7684e47" => :el_capitan
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
system "make", "all"
|
|
bin.install Dir["build/bin/*"]
|
|
end
|
|
|
|
test do
|
|
(testpath/"genesis.json").write <<~EOS
|
|
{
|
|
"config": {
|
|
"homesteadBlock": 10
|
|
},
|
|
"nonce": "0",
|
|
"difficulty": "0x20000",
|
|
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
|
|
"coinbase": "0x0000000000000000000000000000000000000000",
|
|
"timestamp": "0x00",
|
|
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
"extraData": "0x",
|
|
"gasLimit": "0x2FEFD8",
|
|
"alloc": {}
|
|
}
|
|
EOS
|
|
system "#{bin}/geth", "--datadir", "testchain", "init", "genesis.json"
|
|
assert_predicate testpath/"testchain/geth/chaindata/000001.log", :exist?,
|
|
"Failed to create log file"
|
|
end
|
|
end
|