Enabling zksync era deployment.
jinCN opened this issue · 5 comments
I found that zksync era is not fully EVM-compatible. So I have mainly two questions for this project:
- Can I deploy seaport as is, and everything just works fine?
- If not. The compiler mainly complains about warnings of
ecrecover
andextcodesize
usage. Is it easy to patch the contract to solve it?
I had selfdestruct
error:
The contract `contracts/dependencies/seaport/contracts/zones/PausableZone.sol:PausableZone` LLVM IR generator definition pass error: 289:25 The `SELFDESTRUCT` instruction is not supported
function pause(address payee) external override isController {
// Emit an event signifying that the zone is paused.
emit Paused();
// Destroy the zone, sending any native tokens to the transaction
// submitter.
selfdestruct(payable(payee));
}
if I comment out pause
function then it compiles fine
i can't compile seaport in Zksync environment。
Although your may encounter logs like this during the process of using yarn hardhat compile
, these logs are warning and simply serve as notifications.
such as
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: Your code or one of its dependencies uses the 'extcodesize' instruction, which is │
│ usually needed in the following cases: │
│ 1. To detect whether an address belongs to a smart contract. │
│ 2. To detect whether the deploy code execution has finished. │
│ zkSync Era comes with native account abstraction support (so accounts are smart contracts, │
│ including private-key controlled EOAs), and you should avoid differentiating between contracts │
│ and non-contract addresses. │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> seaport-core/src/lib/TokenTransferrer.sol
but, unfortunately, I miss this bug when compiling the contracts
An unexpected error occurred:
Error: Command failed: /Users/ouhuang/Library/Caches/hardhat-nodejs/compilers-v2/zksolc/zksolc-v1.3.13 --standard-json --solc /Users/ouhuang/Library/Caches/hardhat-nodejs/compilers-v2/macosx-amd64/solc-macosx-amd64-v0.8.17+commit.8df45f5f
Contract `contracts/helpers/navigator/lib/ExecutionsHelper.sol:ExecutionsHelper` compiling error: The contract `contracts/helpers/navigator/lib/ExecutionsHelper.sol:ExecutionsHelper` LLVM IR generator definition pass error: Library `seaport-sol/src/executions/ExecutionHelper.sol:ExecutionHelper` not found in the projectThe contract `contracts/helpers/navigator/lib/ExecutionsHelper.sol:ExecutionsHelper` LLVM IR generator definition pass error: Library `seaport-sol/src/executions/ExecutionHelper.sol:ExecutionHelper` not found in the project
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
code: 1,
killed: false,
signal: null,
cmd: '/Users/ouhuang/Library/Caches/hardhat-nodejs/compilers-v2/zksolc/zksolc-v1.3.13 --standard-json --solc /Users/ouhuang/Library/Caches/hardhat-nodejs/compilers-v2/macosx-amd64/solc-macosx-amd64-v0.8.17+commit.8df45f5f'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I was using v1.1 and it can compile after removing selfdestruct, but then I discover that it's impossible to call conduitController.updateChannel
not sure why
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.