Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.6"
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Run Go tests
run: go test ./...
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Intermediate contract artifacts (generated by Makefile)
custody/*.abi
custody/*.bin
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/foundry-rs/forge-std
[submodule "contracts/evm/lib/openzeppelin-contracts"]
path = contracts/evm/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts.git
url = https://github.com/OpenZeppelin/openzeppelin-contracts
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SOL_SOURCES := $(shell find contracts/evm/src -name '*.sol')
BINDINGS := custody/iwithdraw.go custody/ideposit.go custody/simple_custody.go

.PHONY: generate
generate: $(BINDINGS)

# Sentinel tracks forge build; only re-runs when .sol sources change.
contracts/evm/out/.build-sentinel: $(SOL_SOURCES)
cd contracts/evm && forge build
@touch $@

custody/iwithdraw.go: contracts/evm/out/.build-sentinel
jq .abi contracts/evm/out/IWithdraw.sol/IWithdraw.json > custody/IWithdraw.abi
abigen --abi custody/IWithdraw.abi --pkg custody --type IWithdraw --out $@

custody/ideposit.go: contracts/evm/out/.build-sentinel
jq .abi contracts/evm/out/IDeposit.sol/IDeposit.json > custody/IDeposit.abi
abigen --abi custody/IDeposit.abi --pkg custody --type IDeposit --out $@

custody/simple_custody.go: contracts/evm/out/.build-sentinel
jq .abi contracts/evm/out/SimpleCustody.sol/SimpleCustody.json > custody/SimpleCustody.abi
jq -r .bytecode.object contracts/evm/out/SimpleCustody.sol/SimpleCustody.json > custody/SimpleCustody.bin
abigen --abi custody/SimpleCustody.abi --bin custody/SimpleCustody.bin --pkg custody --type SimpleCustody --out $@

1 change: 0 additions & 1 deletion chain/IWithdraw.abi

This file was deleted.

62 changes: 0 additions & 62 deletions chain/README.md

This file was deleted.

Loading