Skip to content

Commit

Permalink
add foundry refresh make command (#10442)
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR authored Sep 2, 2023
1 parent 2d574be commit 5b78a81
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ pnpmdep: ## Install solidity contract dependencies through pnpm
abigen: ## Build & install abigen.
../tools/bin/build_abigen

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/[email protected]

.PHONY: foundry-refresh
foundry-refresh:
foundryup
git submodule deinit -f .
git submodule update --init --recursive

# To generate gethwrappers for a specific product, either set the `FOUNDRY_PROFILE`
# env var or call the target with `FOUNDRY_PROFILE=product`
Expand All @@ -43,15 +52,15 @@ abigen: ## Build & install abigen.
# make call example
# make FOUNDRY_PROFILE=llo-feeds wrappers
.PHONY: wrappers
wrappers: pnpmdep abigen ## Recompiles solidity contracts and their go wrappers.
wrappers: pnpmdep mockery abigen ## Recompiles solidity contracts and their go wrappers.
./scripts/native_solc_compile_all_$(FOUNDRY_PROFILE)
go generate ../core/gethwrappers/$(FOUNDRY_PROFILE)

# This call generates all gethwrappers for all products. It does so based on the
# assumption that native_solc_compile_all contains sub-calls to each product, and
# go_generate does the same.
.PHONY: wrappers-all
wrappers-all: pnpmdep abigen ## Recompiles solidity contracts and their go wrappers.
wrappers-all: pnpmdep mockery abigen ## Recompiles solidity contracts and their go wrappers.
# go_generate contains a call to compile all contracts before generating wrappers
go generate ../core/gethwrappers/go_generate.go

Expand Down

0 comments on commit 5b78a81

Please sign in to comment.