Skip to content

Commit

Permalink
enable via-ir=true in build
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Sep 19, 2024
1 parent e506055 commit d33d222
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: npm install

- name: Build and Check sizes
run: forge build --sizes --skip test --use solc:${{ env.SOLC_VERSION }}
run: make SOLC_VERSION=${{ env.SOLC_VERSION }} build

- name: Run tests
run: make SOLC_VERSION=${{ env.SOLC_VERSION }} TEST_UPGRADEABLE=true test
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ SOLC_VERSION=0.8.20
FORGE=forge
TEST_UPGRADEABLE=false

.PHONY: proto-sol
proto-sol:
ifndef SOLPB_DIR
$(error SOLPB_DIR is not specified)
else
./solpb.sh
endif
.PHONY: build
build:
@FOUNDRY_PROFILE=ir $(FORGE) build --sizes --skip test --use solc:$(SOLC_VERSION)

.PHONY: clean
clean:
Expand Down Expand Up @@ -36,3 +32,11 @@ check-fmt:
lint:
@npx solhint 'contracts/*.sol'
@$(MAKE) FORGE_FMT_OPTS=--check fmt

.PHONY: proto-sol
proto-sol:
ifndef SOLPB_DIR
$(error SOLPB_DIR is not specified)
else
./solpb.sh
endif
4 changes: 2 additions & 2 deletions contracts/LCPClientBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ abstract contract LCPClientBase is ILightClient, ILCPClientErrors {
mapping(string => ClientStorage) internal clientStorages;

// rootCA's public key parameters
AVRValidator.RSAParams public verifiedRootCAParams;
AVRValidator.RSAParams internal verifiedRootCAParams;
// keccak256(signingCert) => RSAParams of signing public key
mapping(bytes32 => AVRValidator.RSAParams) public verifiedSigningRSAParams;
mapping(bytes32 => AVRValidator.RSAParams) internal verifiedSigningRSAParams;

// --------------------- Constructor ---------------------

Expand Down
3 changes: 3 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ ast = true
build_info = true
extra_output = ["storageLayout"]
fs_permissions = [{ access = "read", path = "./"}]

[profile.ir]
via-ir = true

0 comments on commit d33d222

Please sign in to comment.