Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add zkSync adapter #44

Merged
merged 87 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e7f896e
feat: Add zkSync adapter
sendra Mar 18, 2024
ba1a8b3
fix: first iteration of zksync adapter
sendra Mar 19, 2024
d87ca51
fix: removed lib deps
sendra Mar 20, 2024
0797dbe
fix: solved compilation errors. Added test
sendra Mar 20, 2024
72494d3
fix: add zksync to foundry toml
sendra Mar 27, 2024
c5e9615
commit tests that still need to be fixed
Apr 15, 2024
45d66d9
Merge pull request #1 from Moonsong-Labs/comment-out-failing-tests-fo…
HermanObst Apr 15, 2024
82647e2
assume on tests failing due to low addresses
Apr 16, 2024
e26b726
Merge pull request #2 from Moonsong-Labs/assume-safe-addresses
HermanObst Apr 16, 2024
582fb7d
fix(CrossChainReceiverTest): non reserved addrs
Karrq Apr 19, 2024
30354a2
fix(test:zk): 65536 offset
Karrq Apr 19, 2024
0650a62
Merge pull request #3 from Moonsong-Labs/fix/zksync-ccrt
Karrq Apr 22, 2024
d53f1b3
chore(zk:test): uncomment newly passing tests
Karrq Apr 22, 2024
fd35bc8
Merge pull request #4 from Moonsong-Labs/fix/zksync-ccrt
HermanObst Apr 22, 2024
52c29a0
uncomment CCIP adapter tests
Apr 23, 2024
6ab2092
uncomment tests failing due to mocks
Apr 23, 2024
4d6b2dc
fix foundry config
HermanObst Apr 23, 2024
6d1f1fa
Merge pull request #8 from Moonsong-Labs/herman/fix-foundry-config
Jrigada Apr 23, 2024
dc83950
correct addresss ranges
nbaztec Apr 24, 2024
a431bc8
Merge pull request #9 from Moonsong-Labs/nish-fix-test-1
nbaztec Apr 24, 2024
5e4dbbe
Merge pull request #5 from Moonsong-Labs/uncomment-CCIP-adapter-tests
Karrq Apr 24, 2024
7d50c67
uncomment arb adapter tests
Apr 24, 2024
2122285
Merge pull request #6 from Moonsong-Labs/uncomment-mock-failing-tests
Karrq Apr 24, 2024
e693193
fix test selectors
nbaztec Apr 24, 2024
c23939d
feat: uncomment CrossChainController* tests
Karrq Apr 24, 2024
0492780
Merge remote-tracking branch 'origin/nish-fix-test-2' into testing
Karrq Apr 24, 2024
ac30252
Merge remote-tracking branch 'origin/uncomment-arbadapter-tests' into…
Karrq Apr 24, 2024
d5213ce
Merge remote-tracking branch 'origin/fix/reserved_addrs' into testing
Karrq Apr 24, 2024
fc508d4
wip: uncomment ForwarderTest and PayloadScripts
Karrq Apr 24, 2024
7a1f42d
wip: uncomment CrossChainCommunicationSettings
Karrq Apr 24, 2024
670e982
fix: MetisAdapter::testForwardMessage
Karrq Apr 24, 2024
a0d3a70
fix test
nbaztec Apr 24, 2024
57caa06
Merge pull request #11 from Moonsong-Labs/nish-fix-test-2
Karrq Apr 24, 2024
0f991cc
fix(Forwarder): add forwardMessage mock in tests
Karrq Apr 25, 2024
822bc4b
Merge pull request #10 from Moonsong-Labs/uncomment-arbadapter-tests
Jrigada Apr 25, 2024
285575a
remove assume preventing usage of zkSync forbidden addresses in fuzz …
HermanObst Apr 26, 2024
6529127
re-include assume removed by error
HermanObst Apr 26, 2024
8d0bfb1
Merge pull request #13 from Moonsong-Labs/fix/forwarder-test
Karrq Apr 27, 2024
9cd3d64
enable CrossChainCommunicationSettingsTest
nbaztec Apr 28, 2024
bb3c20e
fix(test): use `_mockAdaptersForwardMessage`
Karrq Apr 30, 2024
9679a47
Merge pull request #16 from Moonsong-Labs/fix/forwarder-test
Karrq May 1, 2024
80d10a3
fix: assume called address != tx.origin
Karrq May 1, 2024
b26ea8d
Merge pull request #14 from Moonsong-Labs/nish-enable-test-2
Karrq May 1, 2024
9ed4977
Merge pull request #17 from Moonsong-Labs/fix/adapters-test
HermanObst May 1, 2024
0b2345a
Merge branch 'feat/zksync' into latest
Karrq May 1, 2024
93e8f80
fix: recomment PayloadScripts
Karrq May 1, 2024
8cb83d5
fix: 65566 -> 65536
Karrq May 1, 2024
8acd42d
fix: comment one failing test
Karrq May 1, 2024
4d7047b
Merge pull request #18 from Moonsong-Labs/chore/cleanup
HermanObst May 1, 2024
93733c0
enable testSolveEmergencyWhenUnreachableConfirmations
nbaztec May 2, 2024
85e557b
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra May 17, 2024
ba9ce98
Merge pull request #51 from Moonsong-Labs/feat/zksync
sendra May 21, 2024
d65587e
wip: deployment
sendra May 21, 2024
ed2175d
fix: initial deployments
sendra May 22, 2024
ae2d5dd
fix: adapters deployed
sendra May 22, 2024
8fb3225
fix: configuration and mock destination
sendra May 23, 2024
d7ac1b1
fix: latest deployments
sendra May 23, 2024
72126e1
fix: new deployment
sendra May 27, 2024
9854f63
fix: new zksync interface
sendra May 28, 2024
1ba52c7
fix: add integration test
sendra May 28, 2024
b62ecce
fix: add mock resolver to test decode
sendra May 29, 2024
8f5e520
fix: some fixes
sendra May 30, 2024
3b401df
fix: added asserts to test
sendra May 30, 2024
338ace3
fix: some test cleanup
sendra May 31, 2024
695701c
fix: minimum gas limit for zksync
sendra May 31, 2024
bb6bb8c
fix: prep for deployments
sendra Jul 9, 2024
e30bd46
fix: use zksolc 1.5.0
sendra Jul 10, 2024
b4e555a
fix: solved conflicts
sendra Jul 18, 2024
92d073e
fix: updated aave helpers
sendra Jul 18, 2024
77f0522
fix: removed .s
sendra Jul 18, 2024
56169cc
fix: add default return
sendra Jul 18, 2024
50f4e86
fix: moved to internal
sendra Jul 18, 2024
8957926
fix: change from pure to view
sendra Jul 18, 2024
ba3c209
fix: add deploy without create2 for ccc
sendra Jul 19, 2024
b099f47
fix: add normal deploy for zksync adapter
sendra Jul 19, 2024
957d8bf
fix: Remove dependencies
sendra Jul 24, 2024
a00bcb1
fix: remove aave helpers. Add solidity utils
sendra Jul 25, 2024
7d3de5d
fix: use chain ids from solidity utils
sendra Jul 25, 2024
4782215
fix: fixed tests
sendra Jul 25, 2024
f6c5886
fix: udpated test
sendra Jul 25, 2024
f0b8494
check of the address
kyzia551 Jul 25, 2024
adc37df
Merge pull request #91 from bgd-labs/fix/address-of-forwarder-adapter
sendra Jul 25, 2024
dcc5b30
Merge pull request #90 from bgd-labs/fix/remove-aave-helpers-dep
sendra Jul 25, 2024
f413948
fix: updated certora rules
sendra Jul 25, 2024
143fcfd
fix: fixed certora configs
sendra Jul 25, 2024
5a3f07d
fix: removed unnecessary zksync profile args
sendra Jul 25, 2024
2eed733
fix: updated bridge hub spelling
sendra Jul 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ broadcast/

input.json
compressedArtifacts.zip
zkout/
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
branch = release-v4.9
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
[submodule "lib/solidity-utils"]
path = lib/solidity-utils
url = https://github.com/bgd-labs/solidity-utils
14 changes: 14 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ remappings = [
'hyperlane-monorepo/=lib/hyperlane-monorepo/solidity/contracts/',
'@openzeppelin/=lib/openzeppelin-contracts/'
]
evm_version = 'shanghai'

fs_permissions = [{ access = "read-write", path = "./"}]

solc = "0.8.19"

[profile.default.zksync]
fallback_oz = true
mode = "3"
zksolc="1.4.1"

[rpc_endpoints]
ethereum="${RPC_MAINNET}"
ethereum-testnet="${RPC_ETHEREUM_SEPOLIA}"
Expand Down Expand Up @@ -41,6 +47,8 @@ scroll="${RPC_SCROLL}"
scroll-testnet="${RPC_SCROLL_TESTNET}"
celo="${RPC_CELO}"
celo-testnet="${RPC_CELO_ALFAJORES}"
zksync="${RPC_ZK_SYNC}"
zksync-testnet="${RPC_ZK_SYNC_TESTNET}"

[etherscan]
ethereum={key="${ETHERSCAN_API_KEY_MAINNET}", chain=1 }
Expand Down Expand Up @@ -69,5 +77,11 @@ scroll={key="${ETHERSCAN_API_KEY_SCROLL}", chain=534352, utl='https://api.scroll
scroll-testnet={key="${ETHERSCAN_API_KEY_SCROLL}", chain=534351, url='https://api-sepolia.scrollscan.com/api/'}
celo={key="${ETHERSCAN_API_KEY_CELO}", chain=42220, utl='https://api.celoscan.io/api'}
celo-testnet={key="${ETHERSCAN_API_KEY_CELO}", chain=44787, url='https://api-alfajores.celoscan.io/api'}
zksync={key="${ETHERSCAN_API_KEY_ZK_SYNC}", chain=324}
zksync-testnet={key="${ETHERSCAN_API_KEY_ZK_SYNC}", chain=300, url='https://api-sepolia-era.zksync.network/api'}

# See more config options https://github.com/gakonst/foundry/tree/master/config
[fuzz]
no_zksync_reserved_addresses = true
[invariant]
no_zksync_reserved_addresses = true
1 change: 0 additions & 1 deletion lib/aave-helpers
Submodule aave-helpers deleted from 2e1710
1 change: 1 addition & 0 deletions lib/solidity-utils
Submodule solidity-utils added at 9e1215
9 changes: 2 additions & 7 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
solidity-utils/=lib/aave-helpers/lib/solidity-utils/src/
ds-test/=lib/aave-helpers/lib/forge-std/lib/ds-test/src/
forge-std/=lib/aave-helpers/lib/forge-std/src/
fx-portal/=lib/fx-portal/contracts/
nitro-contracts/=lib/nitro-contracts/src/
solidity-utils/=lib/solidity-utils/src/
forge-std/=lib/solidity-utils/lib/forge-std/src/
openzeppelin-contracts/=lib/openzeppelin-contracts/
aave-helpers/=lib/aave-helpers/src/
aave-address-book/=lib/aave-helpers/lib/aave-address-book/src/
5 changes: 2 additions & 3 deletions scripts/Adapters/BaseAdapterScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ abstract contract BaseAdapterScript is BaseScript {
return false;
}

function _computeAdapterAddress(address currentNetworkCCC) internal view returns (address) {
function _computeAdapterAddress(address currentNetworkCCC) internal returns (address) {
bytes memory adapterCode = _getAdapterByteCode(currentNetworkCCC);
bytes32 salt = keccak256(abi.encode(SALT()));

return Create2Utils.computeCreate2Address(salt, adapterCode);
return _computeByteCodeAddress(adapterCode, SALT());
}

function _getAdapterByteCode(address currentNetworkCCC) internal view returns (bytes memory) {
Expand Down
84 changes: 84 additions & 0 deletions scripts/Adapters/DeployZkSyncAdapter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import './BaseAdapterScript.sol';
import {ZkSyncAdapter} from '../../src/contracts/adapters/zkSync/ZkSyncAdapter.sol';
import {ZkSyncAdapterTestnet} from '../contract_extensions/ZkSyncAdapterTestnet.sol';

library ZkSyncAdapterDeploymentHelper {
struct ZkSyncAdapterArgs {
BaseAdapterArgs baseArgs;
address bridgeHub;
address refundAddress;
}

function getAdapterCode(
ZkSyncAdapterArgs memory zkSyncArgs
) internal pure returns (bytes memory) {
bytes memory creationCode = zkSyncArgs.baseArgs.isTestnet
? type(ZkSyncAdapterTestnet).creationCode
: type(ZkSyncAdapter).creationCode;

return
abi.encodePacked(
creationCode,
abi.encode(
zkSyncArgs.baseArgs.crossChainController,
zkSyncArgs.bridgeHub,
zkSyncArgs.refundAddress,
zkSyncArgs.baseArgs.providerGasLimit,
zkSyncArgs.baseArgs.trustedRemotes
)
);
}
}

abstract contract BaseZkSyncAdapter is BaseAdapterScript {
function BRIDGE_HUB() internal view virtual returns (address);

function REFUND_ADDRESS() internal view virtual returns (address) {
return address(0);
}

function _getAdapterByteCode(
BaseAdapterArgs memory baseArgs
) internal view override returns (bytes memory) {
require(BRIDGE_HUB() != address(0), 'Invalid BRIDGE_HUB');

return
ZkSyncAdapterDeploymentHelper.getAdapterCode(
ZkSyncAdapterDeploymentHelper.ZkSyncAdapterArgs({
baseArgs: baseArgs,
bridgeHub: BRIDGE_HUB(),
refundAddress: REFUND_ADDRESS()
})
);
}

function _deployWithoutCreate2(BaseAdapterArgs memory baseArgs) internal returns (address) {
require(BRIDGE_HUB() != address(0), 'Invalid BRIDGE_HUB');
if (isTestnet()) {
return
address(
new ZkSyncAdapterTestnet(
baseArgs.crossChainController,
BRIDGE_HUB(),
REFUND_ADDRESS(),
baseArgs.providerGasLimit,
baseArgs.trustedRemotes
)
);
} else {
return
address(
new ZkSyncAdapter(
baseArgs.crossChainController,
BRIDGE_HUB(),
REFUND_ADDRESS(),
baseArgs.providerGasLimit,
baseArgs.trustedRemotes
)
);
}
}
}
16 changes: 11 additions & 5 deletions scripts/BaseScript.sol
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {ChainIds, TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {Create2Utils} from 'aave-helpers/ScriptUtils.sol';
import {ChainIds, TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';

abstract contract BaseScript {
function TRANSACTION_NETWORK() internal view virtual returns (uint256);

// Should only implement as:
// return Create2Utils.create2Deploy(keccak256(abi.encode(salt)), byteCode);
function _deployByteCode(
bytes memory byteCode,
string memory salt
) internal virtual returns (address) {
return Create2Utils.create2Deploy(keccak256(abi.encode(salt)), byteCode);
}
) internal virtual returns (address);

// Should only implement as:
// return Create2Utils.computeCreate2Address(salt, adapterCode);
function _computeByteCodeAddress(
bytes memory byteCode,
string memory salt
) internal virtual returns (address);
}
8 changes: 8 additions & 0 deletions scripts/CCC/DeployCrossChainController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ abstract contract BaseCCCDeploy is BaseScript {

return _deployByteCode(cccCode, SALT());
}

function _deployWithoutCreate2() internal returns (address) {
if (CL_EMERGENCY_ORACLE() == address(0)) {
return address(new CrossChainController());
} else {
return address(new CrossChainControllerWithEmergencyMode(CL_EMERGENCY_ORACLE()));
}
}
}
2 changes: 1 addition & 1 deletion scripts/contract_extensions/ArbitrumAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {IArbAdapter, ArbAdapter} from '../../src/contracts/adapters/arbitrum/ArbAdapter.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/CBAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {CBaseAdapter, IOpAdapter} from '../../src/contracts/adapters/cBase/CBaseAdapter.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/CCIPAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {CCIPAdapter} from '../../src/contracts/adapters/ccip/CCIPAdapter.sol';
import {BaseAdapter, IBaseAdapter} from '../../src/contracts/adapters/BaseAdapter.sol';

Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/GnosisChainAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {GnosisChainAdapter} from '../../src/contracts/adapters/gnosisChain/GnosisChainAdapter.sol';
import {BaseAdapter, IBaseAdapter} from '../../src/contracts/adapters/BaseAdapter.sol';

Expand Down
4 changes: 2 additions & 2 deletions scripts/contract_extensions/LayerZeroAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {SafeCast} from 'openzeppelin-contracts/contracts/utils/math/SafeCast.sol';
import {SafeCast} from 'solidity-utils/contracts/oz-common/SafeCast.sol';
import {BaseAdapter, IBaseAdapter} from '../../src/contracts/adapters/BaseAdapter.sol';
import {LayerZeroAdapter} from '../../src/contracts/adapters/layerZero/LayerZeroAdapter.sol';
import {ILayerZeroAdapter} from '../../src/contracts/adapters/layerZero/ILayerZeroAdapter.sol';
import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {Errors} from '../../src/contracts/libs/Errors.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/MetisAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {IOpAdapter, MetisAdapter} from '../../src/contracts/adapters/metis/MetisAdapter.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/OptimismAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {IOpAdapter, OpAdapter} from '../../src/contracts/adapters/optimism/OpAdapter.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/PolygonAdapterTestnets.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {PolygonAdapterBase} from '../../src/contracts/adapters/polygon/PolygonAdapterBase.sol';
import {IPolygonAdapter} from '../../src/contracts/adapters/polygon/IPolygonAdapter.sol';

Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/ScrollAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {IOpAdapter, ScrollAdapter} from '../../src/contracts/adapters/scroll/ScrollAdapter.sol';

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/contract_extensions/WormholeAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'aave-helpers/ChainIds.sol';
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {WormholeAdapter} from '../../src/contracts/adapters/wormhole/WormholeAdapter.sol';
import {BaseAdapter, IBaseAdapter} from '../../src/contracts/adapters/BaseAdapter.sol';

Expand Down
25 changes: 25 additions & 0 deletions scripts/contract_extensions/ZkSyncAdapterTestnet.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;

import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {IZkSyncAdapter, ZkSyncAdapter} from '../../src/contracts/adapters/zkSync/ZkSyncAdapter.sol';

contract ZkSyncAdapterTestnet is ZkSyncAdapter {
constructor(
address crossChainController,
address mailBox,
address refundAddress,
uint256 providerGasLimit,
TrustedRemotesConfig[] memory trustedRemotes
) ZkSyncAdapter(crossChainController, mailBox, refundAddress, providerGasLimit, trustedRemotes) {}

/// @inheritdoc IZkSyncAdapter
function isDestinationChainIdSupported(uint256 chainId) public pure override returns (bool) {
return chainId == TestNetChainIds.ZK_SYNC_SEPOLIA;
}

/// @inheritdoc IZkSyncAdapter
function getOriginChainId() public pure override returns (uint256) {
return TestNetChainIds.ETHEREUM_SEPOLIA;
}
}
2 changes: 1 addition & 1 deletion scripts/examples/Payload_SolveEmergencyPrePopulated.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import 'forge-std/Script.sol';
import {ChainIds} from 'aave-helpers/ChainIds.sol';
import {ChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {ICrossChainReceiver} from '../../src/contracts/interfaces/ICrossChainReceiver.sol';
import {ICrossChainForwarder} from '../../src/contracts/interfaces/ICrossChainForwarder.sol';
import {ICrossChainControllerWithEmergencyMode} from '../../src/contracts/interfaces/ICrossChainControllerWithEmergencyMode.sol';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
"optimistic_hashing": true,
"optimistic_loop": true,
"packages": [
"solidity-utils/=lib/aave-helpers/lib/solidity-utils/src",
"forge-std/=lib/aave-helpers/lib/forge-std/src",
"solidity-utils/=lib/solidity-utils/src",
"forge-std/=lib/solidity-utils/lib/forge-std/src",
"openzeppelin-contracts/=lib/openzeppelin-contracts",
"aave-helpers/=lib/aave-helpers/src",
"aave-address-book/=lib/aave-helpers/lib/aave-address-book/src",
],
"process": "emv",
"prover_args": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
],
"link": [],
"packages": [
"solidity-utils/=lib/aave-helpers/lib/solidity-utils/src",
"forge-std/=lib/aave-helpers/lib/forge-std/src",
"solidity-utils/=lib/solidity-utils/src",
"forge-std/=lib/solidity-utils/lib/forge-std/src",
"openzeppelin-contracts/=lib/openzeppelin-contracts",
"aave-helpers/=lib/aave-helpers/src",
"aave-address-book/=lib/aave-helpers/lib/aave-address-book/src",
],
"verify": "CrossChainForwarderHarnessED:security/certora/specs/CrossChainForwarder-encode-decode-correct.spec",
"solc": "solc8.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
],
"link": [],
"packages": [
"solidity-utils/=lib/aave-helpers/lib/solidity-utils/src",
"forge-std/=lib/aave-helpers/lib/forge-std/src",
"solidity-utils/=lib/solidity-utils/src",
"forge-std/=lib/solidity-utils/lib/forge-std/src",
"openzeppelin-contracts/=lib/openzeppelin-contracts",
"aave-helpers/=lib/aave-helpers/src",
"aave-address-book/=lib/aave-helpers/lib/aave-address-book/src",
],
"verify": "CrossChainForwarderHarness:security/certora/specs/CrossChainForwarder-envelopRetry.spec",
"solc": "solc8.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
],
"link": [],
"packages": [
"solidity-utils/=lib/aave-helpers/lib/solidity-utils/src",
"forge-std/=lib/aave-helpers/lib/forge-std/src",
"solidity-utils/=lib/solidity-utils/src",
"forge-std/=lib/solidity-utils/lib/forge-std/src",
"openzeppelin-contracts/=lib/openzeppelin-contracts",
"aave-helpers/=lib/aave-helpers/src",
"aave-address-book/=lib/aave-helpers/lib/aave-address-book/src",
],
"verify": "CrossChainForwarderHarness:security/certora/specs/invariants.spec",
"solc": "solc8.19",
Expand Down
Loading
Loading