Skip to content

Commit

Permalink
chore: revert makefile change
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Nov 27, 2023
1 parent b768767 commit 8136351
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions contracts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,36 @@ build: ## Build the smart contracts
FOUNDRY_PROFILE=lite forge build

##@ Gen go bindings
SOLC := /usr/local/bin/solc
ABIGEN := /usr/local/bin/abigen

.PHONY: versions
versions: ## Show versions used.
$(SOLC) --version
$(ABIGEN) --version

.PHONY: gen-funder-go-bindings
gen-funder-go-bindings: ## Generatego go bindings for the funder contract.
cat ./out/Funder.sol/Funder.json | jq -r '.abi' > ../bindings/funder/Funder.abi
cat ./out/Funder.sol/Funder.json | jq -r '.bytecode.object' > ../bindings/funder/Funder.bin
$(ABIGEN) --abi ../bindings/funder/Funder.abi --bin ../bindings/funder/Funder.bin --pkg funder --type funder --out ../bindings/funder/funder.go
abigen --abi ../bindings/funder/Funder.abi --bin ../bindings/funder/Funder.bin --pkg funder --type funder --out ../bindings/funder/funder.go
@echo "✅ funder/funder.go generated"

.PHONY: gen-tester-go-bindings
gen-tester-go-bindings: ## Generate go bindings for the tester contracts.
cat ./out/LoadTester.sol/LoadTester.json | jq -r '.abi' > ../bindings/tester/LoadTester.abi
cat ./out/LoadTester.sol/LoadTester.json | jq -r '.bytecode.object' > ../bindings/tester/LoadTester.bin
$(ABIGEN) --abi ../bindings/tester/LoadTester.abi --bin ../bindings/tester/LoadTester.bin --pkg tester --type LoadTester --out ../bindings/tester/loadTester.go
abigen --abi ../bindings/tester/LoadTester.abi --bin ../bindings/tester/LoadTester.bin --pkg tester --type LoadTester --out ../bindings/tester/loadTester.go
@echo "✅ tester/loadTester.go generated"

cat ./out/ConformanceTester.sol/ConformanceTester.json | jq -r '.abi' > ../bindings/tester/ConformanceTester.abi
cat ./out/ConformanceTester.sol/ConformanceTester.json | jq -r '.bytecode.object' > ../bindings/tester/ConformanceTester.bin
$(ABIGEN) --abi ../bindings/tester/ConformanceTester.abi --bin ../bindings/tester/ConformanceTester.bin --pkg tester --type ConformanceTester --out ../bindings/tester/conformanceTester.go
abigen --abi ../bindings/tester/ConformanceTester.abi --bin ../bindings/tester/ConformanceTester.bin --pkg tester --type ConformanceTester --out ../bindings/tester/conformanceTester.go
@echo "✅ tester/conformanceTester.go generated"

.PHONY: gen-tokens-go-bindings
gen-tokens-go-bindings: ## Generate go bindings for the tokens contracts.
cat ./out/ERC20.sol/ERC20.json | jq -r '.abi' > ../bindings/tokens/ERC20.abi
cat ./out/ERC20.sol/ERC20.json | jq -r '.bytecode.object' > ../bindings/tokens/ERC20.bin
$(ABIGEN) --abi ../bindings/tokens/ERC20.abi --bin ../bindings/tokens/ERC20.bin --pkg tokens --type ERC20 --out ../bindings/tokens/ERC20.go
abigen --abi ../bindings/tokens/ERC20.abi --bin ../bindings/tokens/ERC20.bin --pkg tokens --type ERC20 --out ../bindings/tokens/ERC20.go
@echo "✅ tokens/ERC20.go generated"

cat ./out/ERC721.sol/ERC721.json | jq -r '.abi' > ../bindings/tokens/ERC721.abi
cat ./out/ERC721.sol/ERC721.json | jq -r '.bytecode.object' > ../bindings/tokens/ERC721.bin
$(ABIGEN) --abi ../bindings/tokens/ERC721.abi --bin ../bindings/tokens/ERC721.bin --pkg tokens --type ERC721 --out ../bindings/tokens/ERC721.go
abigen --abi ../bindings/tokens/ERC721.abi --bin ../bindings/tokens/ERC721.bin --pkg tokens --type ERC721 --out ../bindings/tokens/ERC721.go
@echo "✅ tokens/ERC721.go generated"

.PHONY: gen-go-bindings
Expand Down

0 comments on commit 8136351

Please sign in to comment.