I AM UNABLE TO DEPLOY TO ZKSYNC-SEPOLIA CHAIN USING THE FORGE CREATE
COMMAND IN THE FOUNDRY-ZKSYNC DOC[Deployment] <Title>
#1011
-
Team or ProjectNo response ZK chainZKSYNC-SEPOLIA EnvironmentTestnet L2 block numberNo response zkSolc Versionzksolc-1.5.12 zksync-ethers Versionforge Version: 1.0.0-foundry-zksync-v0.0.14 Minimal Reproducible Code or Repo Link// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.25;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract PipsToken is ERC20, Ownable {
constructor() ERC20("PIPST", "PIPS") Ownable(msg.sender) {}
function mint(address _to, uint256 _amount) external onlyOwner {
_mint(_to, _amount);
}
} Does this work on other EVMs? (If yes, please list at least 1 of them)Ethereum Description of What Your Contract DoesIt is a simple Additional DetailsWhen I run the forge create src/PipsToken.sol:PipsToken --rpc-url ${ZKSYNC_SEPOLIA_RPC_URL} --account sepoliaPrivateKey --chain 300 --zksync --broadcast
[⠃] Using zksolc-1.5.12
[⠊] Compiling (zksync)
No files changed, compilation skipped
Enter keystore password:
Error: server returned an error response: error code -32602: Invalid parameters: transaction could not be decoded: unsupported transaction type But when I removed the The below is successful deployment when I run without the forge create src/PipsToken.sol:PipsToken --rpc-url ${ZKSYNC_SEPOLIA_RPC_URL} --account sepoliaPrivateKey --broadcast
[⠊] Compiling...
No files changed, compilation skipped
Enter keystore password:
Deployer: 0x186C2177C01e507596F9a866D3c741c7e1B15001
Deployed to: 0xA0A83a39708E06ABB96bD52ae5426450d7127048
Transaction hash: 0xc598d308bc248cdfd68a2b247a7de85d573af1a994498f7b3346f98370d00952 Looking forward to the team response. thanks for creating this amazing tool. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try putting Deploying without |
Beta Was this translation helpful? Give feedback.
Try putting
--zksync
flag beforesrc/PipsToken.sol:PipsToken
. For example this works for me:forge create --rpc-url "https://sepolia.era.zksync.dev" --private-key "0x..." --zksync src/PipsToken.sol:PipsToken
Deploying without
--zksync
flag works because of a very recent upgrade of zksync which added support for evm equivalent bytecode. If you visit Block Explorer page for your contract you will seeEVM
tag. However, running EVM equivalent bytecode might be more expensive, depending on each specific case.