Skip to content

Commit 4e6d738

Browse files
authored
fix: change commentsImplCreationCode visibility to internal for dynamic test linking compatibility (#1363)
Changes function visibility from pure to internal to fix compilation errors when dynamic test linking transforms type(Contract).creationCode into VmContractHelper87().getCode() calls, which require access to vm context.
1 parent 29e8338 commit 4e6d738

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packages/coins/foundry.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ via_ir = true
66
optimizer = true
77
solc_version = '0.8.28'
88
optimizer_runs = 200
9+
dynamic_test_linking = true
910
fs_permissions = [
1011
{ access = "readwrite", path = "./addresses" },
1112
{ access = "readwrite", path = "./addresses/dev" },

packages/comments/foundry.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ via_ir = true
66
solc_version = '0.8.23'
77
optimizer = true
88
optimizer_runs = 1_000_000
9+
dynamic_test_linking = true
910
fs_permissions = [
1011
{ access = "readwrite", path = "./addresses" },
1112
{ access = "read", path = "./package.json" },

packages/comments/script/CommentsDeployerBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ contract CommentsDeployerBase is ProxyDeployerScript {
6464
deployment.callerAndCommenterVersion = readStringOrDefaultToEmpty(json, "CALLER_AND_COMMENTER_VERSION");
6565
}
6666

67-
function commentsImplCreationCode() internal pure returns (bytes memory) {
67+
function commentsImplCreationCode() internal returns (bytes memory) {
6868
return abi.encodePacked(type(CommentsImpl).creationCode, abi.encode(SPARK_VALUE, PROTOCOL_REWARDS));
6969
}
7070

0 commit comments

Comments
 (0)