diff --git a/content/tutorials/cross-chain-governance/10.index.md b/content/tutorials/cross-chain-governance/10.index.md index c1b9920b..6cbae2c9 100644 --- a/content/tutorials/cross-chain-governance/10.index.md +++ b/content/tutorials/cross-chain-governance/10.index.md @@ -60,7 +60,7 @@ Select the option **Create a Typescript project** and accept the defaults for ev ::callout{icon="i-heroicons-exclamation-circle"} To interact with the ZKsync bridge contract using Solidity, you need -the ZKsync contract interface. There are two ways to get it: +the IZkSyncHyperchain interface. There are two ways to get it: - Import it from the `@matterlabs/zksync-contracts` npm package (preferred). - Download it from the [contracts repo](https://github.com/matter-labs/era-contracts). @@ -104,7 +104,7 @@ The `callZkSync` function calls a transaction on L2 which can only be called by // SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; -import "@matterlabs/zksync-contracts/l1/contracts/zksync/interfaces/IZkSync.sol"; +import "@matterlabs/zksync-contracts/contracts/l1-contracts/state-transition/chain-interfaces/IZkSyncHyperchain.sol"; contract Governance { address public governor; @@ -122,7 +122,7 @@ contract Governance { ) external payable { require(msg.sender == governor, "Only governor is allowed"); - IZkSync zksync = IZkSync(zkSyncAddress); + IZkSyncHyperchain zksync = IZkSyncHyperchain(zkSyncAddress); zksync.requestL2Transaction{value: msg.value}(contractAddr, 0, data, gasLimit, gasPerPubdataByteLimit, new bytes[](0), msg.sender); } diff --git a/content/tutorials/daily-spend-limit-account/10.index.md b/content/tutorials/daily-spend-limit-account/10.index.md index 0e456b04..a3fec55d 100644 --- a/content/tutorials/daily-spend-limit-account/10.index.md +++ b/content/tutorials/daily-spend-limit-account/10.index.md @@ -540,15 +540,15 @@ with the owner of the account. // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccount.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IAccount.sol" +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; import "@openzeppelin/contracts/interfaces/IERC1271.sol"; // Used for signature validation import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; // Access ZKsync system contracts for nonce validation via NONCE_HOLDER_SYSTEM_CONTRACT -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; // to call non-view function of system contracts -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/SystemContractsCaller.sol"; import "./SpendLimit.sol"; contract Account is IAccount, IERC1271, SpendLimit { @@ -807,8 +807,8 @@ The `AAFactory.sol` contract is responsible for deploying instances of the `Acco // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/SystemContractsCaller.sol"; contract AAFactory { bytes32 public aaBytecodeHash; diff --git a/content/tutorials/dapp-nft-paymaster/20.smart-contracts.md b/content/tutorials/dapp-nft-paymaster/20.smart-contracts.md index 4c79cbd8..7faccfef 100644 --- a/content/tutorials/dapp-nft-paymaster/20.smart-contracts.md +++ b/content/tutorials/dapp-nft-paymaster/20.smart-contracts.md @@ -150,11 +150,11 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; -import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymaster.sol"; -import {IPaymasterFlow} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymasterFlow.sol"; -import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymaster.sol"; +import {IPaymasterFlow} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymasterFlow.sol"; +import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; /// @author Matter Labs /// @notice This smart contract pays the gas fees on behalf of users that are the owner of a specific NFT asset diff --git a/content/tutorials/erc20-paymaster/10.index.md b/content/tutorials/erc20-paymaster/10.index.md index 67a4d5e1..daeb9d74 100644 --- a/content/tutorials/erc20-paymaster/10.index.md +++ b/content/tutorials/erc20-paymaster/10.index.md @@ -77,11 +77,11 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymaster.sol"; -import {IPaymasterFlow} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymasterFlow.sol"; -import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymaster.sol"; +import {IPaymasterFlow} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymasterFlow.sol"; +import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; contract MyPaymaster is IPaymaster { uint256 constant PRICE_FOR_PAYING_FEES = 1; @@ -236,11 +236,11 @@ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymaster.sol"; -import {IPaymasterFlow} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymasterFlow.sol"; -import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymaster.sol"; +import {IPaymasterFlow} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymasterFlow.sol"; +import {TransactionHelper, Transaction} from "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; contract MyPaymaster is IPaymaster { uint256 constant PRICE_FOR_PAYING_FEES = 1; diff --git a/content/tutorials/native-aa-multisig/10.index.md b/content/tutorials/native-aa-multisig/10.index.md index 62a5988c..bab54ba5 100644 --- a/content/tutorials/native-aa-multisig/10.index.md +++ b/content/tutorials/native-aa-multisig/10.index.md @@ -109,8 +109,8 @@ Use it to perform next steps, or you can skip and use completed code from the [F // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -import "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccount.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IAccount.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; import "@openzeppelin/contracts/interfaces/IERC1271.sol"; @@ -379,7 +379,7 @@ To call the `NONCE_HOLDER_SYSTEM_CONTRACT`, we add the following import: ```solidity // Access ZKsync system contracts for nonce validation via NONCE_HOLDER_SYSTEM_CONTRACT -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; ``` ::callout{icon="i-heroicons-exclamation-circle"} @@ -391,7 +391,7 @@ function of the `SystemContractsCaller` library. Import this library also: `solidity // to call non-view function of system contracts -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/SystemContractsCaller.sol"; ` :: @@ -542,8 +542,8 @@ Therefore, it is highly recommended to put `require(success)` for the transactio // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; -import "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccount.sol"; -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IAccount.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/TransactionHelper.sol"; import "@openzeppelin/contracts/interfaces/IERC1271.sol"; @@ -551,9 +551,9 @@ import "@openzeppelin/contracts/interfaces/IERC1271.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; // Access ZKsync system contracts for nonce validation via NONCE_HOLDER_SYSTEM_CONTRACT -import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; // to call non-view function of system contracts -import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; +import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/SystemContractsCaller.sol"; contract TwoUserMultisig is IAccount, IERC1271 { // to get transaction hash @@ -813,8 +813,8 @@ contract TwoUserMultisig is IAccount, IERC1271 { // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; - import "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol"; - import "@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol"; + import "@matterlabs/zksync-contracts/contracts/system-contracts/Constants.sol"; + import "@matterlabs/zksync-contracts/contracts/system-contracts/libraries/SystemContractsCaller.sol"; contract AAFactory { bytes32 public aaBytecodeHash;