Skip to content

Commit

Permalink
Got started on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
zomglings committed Aug 15, 2024
1 parent 9cc221a commit 796e48c
Show file tree
Hide file tree
Showing 12 changed files with 17,698 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ go.work.sum

# env file
.env

bin/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "safe-smart-account"]
path = safe-smart-account
url = [email protected]:safe-global/safe-smart-account.git
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.PHONY: clean hardhat bindings build rebuild

rebuild: clean hardhat bindings build

build: bin/safes

bin/safes:
mkdir -p bin
go build -o bin/safes ./

bindings/Safe/Safe.go:
mkdir -p bindings/Safe
seer evm generate --package Safe --output bindings/Safe/Safe.go --hardhat safe-smart-account/build/artifacts/contracts/Safe.sol/Safe.json --cli --struct Safe

bindings/SafeL2/SafeL2.go:
mkdir -p bindings/SafeL2
seer evm generate --package SafeL2 --output bindings/SafeL2/SafeL2.go --hardhat safe-smart-account/build/artifacts/contracts/SafeL2.sol/SafeL2.json --cli --struct SafeL2

bindings/SafeProxy/SafeProxy.go:
mkdir -p bindings/SafeProxy
seer evm generate --package SafeProxy --output bindings/SafeProxy/SafeProxy.go --hardhat safe-smart-account/build/artifacts/contracts/proxies/SafeProxy.sol/SafeProxy.json --cli --struct SafeProxy

bindings/SafeProxyFactory/SafeProxyFactory.go:
mkdir -p bindings/SafeProxyFactory
seer evm generate --package SafeProxyFactory --output bindings/SafeProxyFactory/SafeProxyFactory.go --hardhat safe-smart-account/build/artifacts/contracts/proxies/SafeProxyFactory.sol/SafeProxyFactory.json --cli --struct SafeProxyFactory

bindings: bindings/Safe/Safe.go bindings/SafeL2/SafeL2.go bindings/SafeProxy/SafeProxy.go bindings/SafeProxyFactory/SafeProxyFactory.go

clean:
rm -rf bindings/* bin/*

hardhat:
cd safe-smart-account && npm install && npx hardhat compile
7,539 changes: 7,539 additions & 0 deletions bindings/Safe/Safe.go

Large diffs are not rendered by default.

7,821 changes: 7,821 additions & 0 deletions bindings/SafeL2/SafeL2.go

Large diffs are not rendered by default.

Loading

0 comments on commit 796e48c

Please sign in to comment.