You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2021. It is now read-only.
Hi, I want to deploy my contract to L2 network, but it failed. The message like this:
And my deploy code is
constdeploy=async(factory,payload)=>{console.log("Deploying with: ".blue,payload);constcontract=awaitfactory.deploy(...payload);returnawait_finish_and_check_deploy(contract,factory.provider||factory.signer.provider);};const_finish_and_check_deploy=async(contract,provider)=>{consttxHash=contract.deployTransaction.hash;console.log("Deployed in transaction: ".blue,txHash.green);awaitcontract.deployTransaction.wait();console.log("Contract address: ".blue,contract.address.green);consttxReceipt=awaitprovider.getTransactionReceipt(txHash);console.log("Receipt: ",txReceipt);// Check if code is storedconstcode=awaitprovider.getCode(contract.address);console.log("Code: ",code);assert(code.length>2,"Contract NOT deployed (no code)".red);console.log("--------\n");returncontract;};
I don't understand why the deployment failed. The size of the contract is within the limits.I've tried making the contract a little smaller and it can be deployed successfully.
Hi, I want to deploy my contract to L2 network, but it failed. The message like this:
And my deploy code is
I don't understand why the deployment failed. The size of the contract is within the limits.I've tried making the contract a little smaller and it can be deployed successfully.