Skip to content

Commit 5ea3c9e

Browse files
authored
Merge pull request #296 from hyperledger-labs/upgradeable-contract
Add upgradeable IBCHandler Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
2 parents 738ce6c + 65d6e5b commit 5ea3c9e

17 files changed

+2076
-98
lines changed

.gas-snapshot

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,78 @@
1+
ContractUpgrade:testUpgrade() (gas: 3333)
12
IBCBenchmarks:testAcknowledgePacket() (gas: 98040)
23
IBCBenchmarks:testCreateMockClient() (gas: 216997)
34
IBCBenchmarks:testRecvPacket() (gas: 154889)
45
IBCBenchmarks:testSendPacket() (gas: 94843)
56
IBCBenchmarks:testUpdateMockClientDirectly() (gas: 64879)
67
IBCBenchmarks:testUpdateMockClientViaHandler() (gas: 148239)
7-
IBCMockAppTest:testHandshake() (gas: 4161353)
8-
IBCMockAppTest:testHandshakeBetweenDifferentPorts() (gas: 3104214)
9-
IBCMockAppTest:testPacketRelay() (gas: 11460317)
10-
IBCMockAppTest:testPacketTimeout() (gas: 4059417)
8+
IBCMockAppTest:testHandshake() (gas: 4162455)
9+
IBCMockAppTest:testHandshakeBetweenDifferentPorts() (gas: 3104765)
10+
IBCMockAppTest:testPacketRelay() (gas: 11461419)
11+
IBCMockAppTest:testPacketTimeout() (gas: 4059968)
1112
ICS24HostTest:testValidatePortIdentifier() (gas: 44476)
12-
TestICS02:testCreateClient() (gas: 30572814)
13+
TestICS02:testCreateClient() (gas: 30594453)
1314
TestICS02:testHeightToUint128((uint64,uint64)) (runs: 256, μ: 907, ~: 907)
14-
TestICS02:testInvalidCreateClient() (gas: 30458130)
15-
TestICS02:testInvalidUpdateClient() (gas: 30461817)
16-
TestICS02:testRegisterClient() (gas: 30122086)
17-
TestICS02:testRegisterClientDuplicatedClientType() (gas: 30108306)
18-
TestICS02:testRegisterClientInvalidClientType() (gas: 30137268)
19-
TestICS02:testUpdateClient() (gas: 30628415)
20-
TestICS03Handshake:testConnOpenAck() (gas: 1810871)
21-
TestICS03Handshake:testConnOpenConfirm() (gas: 1988723)
22-
TestICS03Handshake:testConnOpenInit() (gas: 1422940)
23-
TestICS03Handshake:testConnOpenTry() (gas: 2347689)
24-
TestICS03Handshake:testInvalidConnOpenAck() (gas: 2322689)
25-
TestICS03Handshake:testInvalidConnOpenConfirm() (gas: 2421514)
15+
TestICS02:testInvalidCreateClient() (gas: 30479715)
16+
TestICS02:testInvalidUpdateClient() (gas: 30483432)
17+
TestICS02:testRegisterClient() (gas: 30143677)
18+
TestICS02:testRegisterClientDuplicatedClientType() (gas: 30129897)
19+
TestICS02:testRegisterClientInvalidClientType() (gas: 30158859)
20+
TestICS02:testUpdateClient() (gas: 30650006)
21+
TestICS03Handshake:testConnOpenAck() (gas: 1811232)
22+
TestICS03Handshake:testConnOpenConfirm() (gas: 1989361)
23+
TestICS03Handshake:testConnOpenInit() (gas: 1423016)
24+
TestICS03Handshake:testConnOpenTry() (gas: 2348031)
25+
TestICS03Handshake:testInvalidConnOpenAck() (gas: 2323525)
26+
TestICS03Handshake:testInvalidConnOpenConfirm() (gas: 2422540)
2627
TestICS03Handshake:testInvalidConnOpenInit() (gas: 776893)
27-
TestICS03Handshake:testInvalidConnOpenTry() (gas: 2283346)
28+
TestICS03Handshake:testInvalidConnOpenTry() (gas: 2283536)
2829
TestICS03Version:testCopyVersions() (gas: 570207)
2930
TestICS03Version:testFindSupportedVersion() (gas: 34452)
3031
TestICS03Version:testIsSupportedVersion() (gas: 13568)
3132
TestICS03Version:testPickVersion() (gas: 37836)
3233
TestICS03Version:testVerifyProposedVersion() (gas: 21308)
3334
TestICS03Version:testVerifySupportedFeature() (gas: 10229)
3435
TestICS04Handshake:testBindPort() (gas: 456448)
35-
TestICS04Handshake:testChanClose() (gas: 12159113)
36-
TestICS04Handshake:testChanOpenAck() (gas: 3242588)
37-
TestICS04Handshake:testChanOpenConfirm() (gas: 3538396)
38-
TestICS04Handshake:testChanOpenInit() (gas: 2395187)
39-
TestICS04Handshake:testChanOpenTry() (gas: 2897666)
40-
TestICS04Handshake:testInvalidChanOpenAck() (gas: 2317011)
41-
TestICS04Handshake:testInvalidChanOpenConfirm() (gas: 2391668)
42-
TestICS04Handshake:testInvalidChanOpenInit() (gas: 1677250)
43-
TestICS04Handshake:testInvalidChanOpenTry() (gas: 1692203)
44-
TestICS04Packet:testAcknowledgementPacket() (gas: 3111231)
45-
TestICS04Packet:testInvalidSendPacket() (gas: 3294851)
46-
TestICS04Packet:testRecvPacket() (gas: 9485947)
47-
TestICS04Packet:testRecvPacketTimeoutHeight() (gas: 3053625)
48-
TestICS04Packet:testRecvPacketTimeoutTimestamp() (gas: 3077674)
49-
TestICS04Packet:testSendPacket() (gas: 4393823)
50-
TestICS04Packet:testTimeoutOnClose() (gas: 3304892)
51-
TestICS04Upgrade:testCrossingHelloInconsistentVersions() (gas: 9730721)
52-
TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 44972623)
53-
TestICS04Upgrade:testUpgradeCannotCancelWithOldErrorReceipt() (gas: 3296637)
54-
TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5124643)
55-
TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5087713)
56-
TestICS04Upgrade:testUpgradeCrossingHelloIncompatibleProposals() (gas: 4843978)
57-
TestICS04Upgrade:testUpgradeFull() (gas: 55696695)
58-
TestICS04Upgrade:testUpgradeInit() (gas: 2925072)
59-
TestICS04Upgrade:testUpgradeNoChanges() (gas: 2342343)
60-
TestICS04Upgrade:testUpgradeNotUpgradableModule() (gas: 3442666)
61-
TestICS04Upgrade:testUpgradeOutOfSync() (gas: 3727867)
62-
TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5097250)
63-
TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5469407)
64-
TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3907425)
65-
TestICS04Upgrade:testUpgradeTimeoutAbortAck() (gas: 17323669)
66-
TestICS04Upgrade:testUpgradeTimeoutAbortConfirm() (gas: 20920588)
67-
TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 68891924)
68-
TestICS04Upgrade:testUpgradeToOrdered() (gas: 52805680)
69-
TestICS04Upgrade:testUpgradeToUnordered() (gas: 42151776)
36+
TestICS04Handshake:testChanClose() (gas: 12159177)
37+
TestICS04Handshake:testChanOpenAck() (gas: 3242652)
38+
TestICS04Handshake:testChanOpenConfirm() (gas: 3538460)
39+
TestICS04Handshake:testChanOpenInit() (gas: 2395251)
40+
TestICS04Handshake:testChanOpenTry() (gas: 2897730)
41+
TestICS04Handshake:testInvalidChanOpenAck() (gas: 2317075)
42+
TestICS04Handshake:testInvalidChanOpenConfirm() (gas: 2391732)
43+
TestICS04Handshake:testInvalidChanOpenInit() (gas: 1677410)
44+
TestICS04Handshake:testInvalidChanOpenTry() (gas: 1692299)
45+
TestICS04Packet:testAcknowledgementPacket() (gas: 3111209)
46+
TestICS04Packet:testInvalidSendPacket() (gas: 3294829)
47+
TestICS04Packet:testRecvPacket() (gas: 9485892)
48+
TestICS04Packet:testRecvPacketTimeoutHeight() (gas: 3053603)
49+
TestICS04Packet:testRecvPacketTimeoutTimestamp() (gas: 3077652)
50+
TestICS04Packet:testSendPacket() (gas: 4393801)
51+
TestICS04Packet:testTimeoutOnClose() (gas: 3304846)
52+
TestICS04Upgrade:testCrossingHelloInconsistentVersions() (gas: 9732925)
53+
TestICS04Upgrade:testUpgradeAuthorityCancel() (gas: 44979235)
54+
TestICS04Upgrade:testUpgradeCannotCancelWithOldErrorReceipt() (gas: 3297188)
55+
TestICS04Upgrade:testUpgradeCannotRecvNextUpgradePacket() (gas: 5125194)
56+
TestICS04Upgrade:testUpgradeCounterpartyAdvanceNextSequenceBeforeOpen() (gas: 5088264)
57+
TestICS04Upgrade:testUpgradeCrossingHelloIncompatibleProposals() (gas: 4844529)
58+
TestICS04Upgrade:testUpgradeFull() (gas: 55706062)
59+
TestICS04Upgrade:testUpgradeInit() (gas: 2925623)
60+
TestICS04Upgrade:testUpgradeNoChanges() (gas: 2342894)
61+
TestICS04Upgrade:testUpgradeNotUpgradableModule() (gas: 3443205)
62+
TestICS04Upgrade:testUpgradeOutOfSync() (gas: 3728418)
63+
TestICS04Upgrade:testUpgradeRelaySuccessAtCounterpartyFlushComplete() (gas: 5097801)
64+
TestICS04Upgrade:testUpgradeRelaySuccessAtFlushing() (gas: 5469958)
65+
TestICS04Upgrade:testUpgradeSendPacketFailAtFlushingOrFlushComplete() (gas: 3907976)
66+
TestICS04Upgrade:testUpgradeTimeoutAbortAck() (gas: 17324220)
67+
TestICS04Upgrade:testUpgradeTimeoutAbortConfirm() (gas: 20921139)
68+
TestICS04Upgrade:testUpgradeTimeoutUpgrade() (gas: 68900740)
69+
TestICS04Upgrade:testUpgradeToOrdered() (gas: 52811190)
70+
TestICS04Upgrade:testUpgradeToUnordered() (gas: 42156184)
7071
TestICS04UpgradeApp:testUpgradeAuthorizationChanneNotFound() (gas: 62062)
71-
TestICS04UpgradeApp:testUpgradeAuthorizationRePropose() (gas: 2365121)
72-
TestICS04UpgradeApp:testUpgradeAuthorizationRemove() (gas: 2345567)
73-
TestICS20:testAddressToHex(address) (runs: 256, μ: 26850, ~: 27044)
72+
TestICS04UpgradeApp:testUpgradeAuthorizationRePropose() (gas: 2365672)
73+
TestICS04UpgradeApp:testUpgradeAuthorizationRemove() (gas: 2346118)
74+
TestICS20:testAddressToHex(address) (runs: 256, μ: 26869, ~: 27044)
7475
TestICS20:testHexToAddress(string) (runs: 256, μ: 4636, ~: 4595)
7576
TestICS20:testIsEscapedString() (gas: 62745)
7677
TestICS20:testMarshaling() (gas: 180081)
77-
TestICS20:testParseAmount(uint256) (runs: 256, μ: 32408, ~: 28568)
78+
TestICS20:testParseAmount(uint256) (runs: 256, μ: 31973, ~: 28039)

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Run tests
3939
run: make test
4040

41+
- name: Run upgradeable tests
42+
run: make TEST_UPGRADEABLE=true clean test
43+
4144
- name: Run coverage
4245
run: make coverage
4346

@@ -104,3 +107,6 @@ jobs:
104107

105108
- name: E2E test (QBFT)
106109
run: make e2e-test network-down
110+
111+
- name: E2E test with upgredable IBCHandler (QBFT)
112+
run: make TEST_UPGRADEABLE=true clean network-qbft e2e-test network-down

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "lib/forge-std"]
22
path = tests/foundry/lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4+
[submodule "lib/openzeppelin-foundry-upgrades"]
5+
path = tests/foundry/lib/openzeppelin-foundry-upgrades
6+
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ DOCKER_COMPOSE=$(DOCKER) compose
99
E2E_TEST_COMPOSE_FILE=./chains/compose.yml
1010
TEST_BROADCAST_LOG_DIR=./broadcast/Deploy.s.sol
1111
TEST_MNEMONIC="math razor capable expose worth grape metal sunset metal sudden usage scheme"
12+
TEST_UPGRADEABLE=false
1213

1314
######## Development ########
1415

1516
.PHONY: build
1617
build:
1718
$(FORGE) build --sizes --skip test --use solc:$(SOLC_VERSION)
1819

20+
.PHONY: clean
21+
clean:
22+
$(FORGE) clean
23+
1924
.PHONY: fmt
2025
fmt:
2126
$(FORGE) fmt $(FORGE_FMT_OPTS)
@@ -27,7 +32,7 @@ lint:
2732

2833
.PHONY: test
2934
test:
30-
$(FORGE) test -vvvv --gas-report --isolate --use solc:$(SOLC_VERSION) $(FORGE_SNAPSHOT_OPTION)
35+
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) $(FORGE) test -vvvv --gas-report --isolate --use solc:$(SOLC_VERSION) $(FORGE_SNAPSHOT_OPTION)
3136

3237
.PHONY: snapshot
3338
snapshot:
@@ -88,9 +93,9 @@ network-qbft:
8893

8994
.PHONY: deploy
9095
deploy:
91-
TEST_MNEMONIC=$(TEST_MNEMONIC) $(FORGE) script --legacy --batch-size 5 --use solc:${SOLC_VERSION} --fork-url http://127.0.0.1:8645 --broadcast \
96+
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) TEST_MNEMONIC=$(TEST_MNEMONIC) $(FORGE) script --legacy --batch-size 5 --use solc:${SOLC_VERSION} --fork-url http://127.0.0.1:8645 --broadcast \
9297
./tests/foundry/src/Deploy.s.sol
93-
TEST_MNEMONIC=$(TEST_MNEMONIC) $(FORGE) script --legacy --batch-size 5 --use solc:${SOLC_VERSION} --fork-url http://127.0.0.1:8745 --broadcast \
98+
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) TEST_MNEMONIC=$(TEST_MNEMONIC) $(FORGE) script --legacy --batch-size 5 --use solc:${SOLC_VERSION} --fork-url http://127.0.0.1:8745 --broadcast \
9499
./tests/foundry/src/Deploy.s.sol
95100

96101
.PHONY: network-down
@@ -99,4 +104,4 @@ network-down:
99104

100105
.PHONY: e2e-test
101106
e2e-test:
102-
TEST_MNEMONIC=$(TEST_MNEMONIC) TEST_BROADCAST_LOG_DIR=$(CURDIR)/$(TEST_BROADCAST_LOG_DIR) go test -v ./tests/e2e/... -count=1
107+
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) TEST_MNEMONIC=$(TEST_MNEMONIC) TEST_BROADCAST_LOG_DIR=$(CURDIR)/$(TEST_BROADCAST_LOG_DIR) go test -v ./tests/e2e/... -count=1

contracts/core/25-handler/IBCClientConnectionChannelHandler.sol

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,19 @@ abstract contract IBCClientConnectionChannelHandler is
3131
IIBCChannelPacketTimeout,
3232
IIBCChannelUpgrade
3333
{
34+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3435
address internal immutable ibcClient;
36+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3537
address internal immutable ibcConnection;
38+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3639
address internal immutable ibcChannelHandshake;
40+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3741
address internal immutable ibcChannelPacketSendRecv;
42+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3843
address internal immutable ibcChannelPacketTimeout;
44+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
3945
address internal immutable ibcChannelUpgradeInitTryAck;
46+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
4047
address internal immutable ibcChannelUpgradeConfirmOpenTimeoutCancel;
4148

4249
/**
@@ -48,6 +55,7 @@ abstract contract IBCClientConnectionChannelHandler is
4855
* @param ibcChannelPacketTimeout_ is the address of a contract that implements `IIBCChannelPacketTimeout`.
4956
* @param ibcChannelUpgradeInitTryAck_ is the address of a contract that implements `IIBCChannelUpgradeInitTryAck`.
5057
* @param ibcChannelUpgradeConfirmOpenTimeoutCancel_ is the address of a contract that implements `IIBCChannelUpgradeConfirmOpenTimeoutCancel`.
58+
* @custom:oz-upgrades-unsafe-allow constructor
5159
*/
5260
constructor(
5361
IIBCClient ibcClient_,
@@ -84,6 +92,7 @@ abstract contract IBCClientConnectionChannelHandler is
8492
}
8593

8694
function wrappedRouteUpdateClient(MsgUpdateClient calldata msg_) public returns (address, bytes4, bytes memory) {
95+
/// @custom:oz-upgrades-unsafe-allow delegatecall
8796
(bool success, bytes memory returndata) =
8897
address(ibcClient).delegatecall(abi.encodeWithSelector(IIBCClient.routeUpdateClient.selector, msg_));
8998
if (!success) {

contracts/core/25-handler/IBCHandler.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ abstract contract IBCHandler is IBCHostConfigurator, IBCClientConnectionChannelH
2525
* @param ibcChannelPacketTimeout_ is the address of a contract that implements `IIBCChannelPacketTimeout`.
2626
* @param ibcChannelUpgradeInitTryAck_ is the address of a contract that implements `IIBCChannelUpgrade`.
2727
* @param ibcChannelUpgradeConfirmOpenTimeoutCancel_ is the address of a contract that implements `IIBCChannelUpgrade`.
28+
* @custom:oz-upgrades-unsafe-allow constructor
2829
*/
2930
constructor(
3031
IIBCClient ibcClient_,
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity ^0.8.20;
3+
4+
import {ILightClient} from "../02-client/ILightClient.sol";
5+
import {IIBCClient} from "../02-client/IIBCClient.sol";
6+
import {IIBCConnection} from "../03-connection/IIBCConnection.sol";
7+
import {
8+
IIBCChannelHandshake, IIBCChannelPacketSendRecv, IIBCChannelPacketTimeout
9+
} from "../04-channel/IIBCChannel.sol";
10+
import {
11+
IIBCChannelUpgradeInitTryAck,
12+
IIBCChannelUpgradeConfirmOpenTimeoutCancel
13+
} from "../04-channel/IIBCChannelUpgrade.sol";
14+
import {IIBCModule} from "../26-router/IIBCModule.sol";
15+
import {IBCHandler} from "./IBCHandler.sol";
16+
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
17+
import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
18+
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
19+
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
20+
21+
contract OwnableUpgradeableIBCHandler is IBCHandler, UUPSUpgradeable, OwnableUpgradeable {
22+
/**
23+
* @dev The arguments of constructor must satisfy the followings:
24+
* @param ibcClient_ is the address of a contract that implements `IIBCClient`.
25+
* @param ibcConnection_ is the address of a contract that implements `IIBCConnection`.
26+
* @param ibcChannelHandshake_ is the address of a contract that implements `IIBCChannelHandshake`.
27+
* @param ibcChannelPacketSendRecv_ is the address of a contract that implements `IIBCChannelPacketSendRecv`.
28+
* @param ibcChannelPacketTimeout_ is the address of a contract that implements `IIBCChannelPacketTimeout`.
29+
* @param ibcChannelUpgradeInitTryAck_ is the address of a contract that implements `IIBCChannelUpgrade`.
30+
* @param ibcChannelUpgradeConfirmOpenTimeoutCancel_ is the address of a contract that implements `IIBCChannelUpgrade`.
31+
* @custom:oz-upgrades-unsafe-allow constructor
32+
*/
33+
constructor(
34+
IIBCClient ibcClient_,
35+
IIBCConnection ibcConnection_,
36+
IIBCChannelHandshake ibcChannelHandshake_,
37+
IIBCChannelPacketSendRecv ibcChannelPacketSendRecv_,
38+
IIBCChannelPacketTimeout ibcChannelPacketTimeout_,
39+
IIBCChannelUpgradeInitTryAck ibcChannelUpgradeInitTryAck_,
40+
IIBCChannelUpgradeConfirmOpenTimeoutCancel ibcChannelUpgradeConfirmOpenTimeoutCancel_
41+
)
42+
IBCHandler(
43+
ibcClient_,
44+
ibcConnection_,
45+
ibcChannelHandshake_,
46+
ibcChannelPacketSendRecv_,
47+
ibcChannelPacketTimeout_,
48+
ibcChannelUpgradeInitTryAck_,
49+
ibcChannelUpgradeConfirmOpenTimeoutCancel_
50+
)
51+
{}
52+
53+
function initialize() public virtual initializer {
54+
__UUPSUpgradeable_init();
55+
__Ownable_init(msg.sender);
56+
}
57+
58+
function registerClient(string calldata clientType, ILightClient client) public virtual onlyOwner {
59+
super._registerClient(clientType, client);
60+
}
61+
62+
function bindPort(string calldata portId, IIBCModule moduleAddress) public virtual onlyOwner {
63+
super._bindPort(portId, moduleAddress);
64+
}
65+
66+
function setExpectedTimePerBlock(uint64 expectedTimePerBlock_) public virtual onlyOwner {
67+
super._setExpectedTimePerBlock(expectedTimePerBlock_);
68+
}
69+
70+
function _msgSender() internal view virtual override(Context, ContextUpgradeable) returns (address) {
71+
return ContextUpgradeable._msgSender();
72+
}
73+
74+
function _msgData() internal view virtual override(Context, ContextUpgradeable) returns (bytes calldata) {
75+
return ContextUpgradeable._msgData();
76+
}
77+
78+
function _contextSuffixLength() internal view virtual override(Context, ContextUpgradeable) returns (uint256) {
79+
return ContextUpgradeable._contextSuffixLength();
80+
}
81+
82+
function _authorizeUpgrade(address newImplementation) internal virtual override onlyOwner {}
83+
}

foundry.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ gas_reports = ["*"]
77
optimizer = true
88
optimizer_runs = 9_999_999
99
via-ir = false
10+
ffi = true
11+
ast = true
12+
build_info = true
13+
extra_output = ["storageLayout"]
1014

1115
[fmt]
1216
line_length = 120

0 commit comments

Comments
 (0)