Skip to content

Commit

Permalink
Merge pull request #9 from EspressoSystems/jh/bindings
Browse files Browse the repository at this point in the history
Generate the hotshot binding
  • Loading branch information
ImJeremyHe committed Nov 3, 2023
2 parents 11c2181 + 22af5a0 commit cd8337f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
path = nitro-testnode
url = https://github.com/EspressoSystems/nitro-testnode
branch = integration
[submodule "espresso-sequencer"]
path = espresso-sequencer
url = https://github.com/EspressoSystems/espresso-sequencer.git
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ build-wasm-bin: $(replay_wasm)

build-solidity: .make/solidity

contracts: .make/solgen
contracts: .make/solgen .make/generate-hotshot-binding
@printf $(done)

format fmt: .make/fmt
Expand Down Expand Up @@ -332,6 +332,14 @@ contracts/test/prover/proofs/%.json: $(arbitrator_cases)/%.wasm $(arbitrator_pro
go run solgen/gen.go
@touch $@

.make/generate-hotshot-binding:
forge build --root espresso-sequencer --out ../out --extra-output-files abi
mkdir -p solgen/go/espressogen/hotshot
mv ./out/HotShot.sol/HotShot.abi.json ./solgen/go/espressogen/hotshot
rm -rf out
abigen --abi ./solgen/go/espressogen/hotshot/HotShot.abi.json --pkg hotshot --out ./solgen/go/espressogen/hotshot/hotshot.go
rm ./solgen/go/espressogen/hotshot/HotShot.abi.json

.make/solidity: $(DEP_PREDICATE) contracts/src/*/*.sol .make/yarndeps $(ORDER_ONLY_PREDICATE) .make
yarn --cwd contracts build
@touch $@
Expand Down
1 change: 1 addition & 0 deletions espresso-sequencer
Submodule espresso-sequencer added at c86b7c
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
docker-credential-helpers # for `docker-credential-osxkeychain` command

foundry-bin

# provides abigen
go-ethereum
] ++ lib.optionals stdenv.isDarwin [
darwin.libobjc
darwin.IOKit
Expand Down

0 comments on commit cd8337f

Please sign in to comment.