manifoldxyz / creator-core-solidity

137 stars 57 forks source link

max code size exceeded #3

Closed SweetmanTech closed 1 year ago

SweetmanTech commented 2 years ago

I'm trying to follow the README example and I'm getting a deployment error:

ProviderError: max code size exceeded
Screen Shot 2022-05-07 at 5 29 21 PM

Here's my contract:

pragma solidity ^0.8.0;

import "@manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol";

contract Greeter is ERC721Creator {
    constructor() ERC721Creator("MyContract", "MC") {}
}

deploy script

async function main() {
  const Greeter = await hre.ethers.getContractFactory("Greeter");
  const greeter = await Greeter.deploy();

  await greeter.deployed();

  console.log("Greeter deployed to:", greeter.address);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });

Can you help?

SweetmanTech commented 2 years ago

I've also been communicating with Richerd.eth in Twitter dms 📬

He recommended I try deploying from Ethereum Remix IDE.

Here's my attempt to deploy ERC721Creator.sol: MAX_CODE_SIZE

As well as the failed tx hash: https://rinkeby.etherscan.io/tx/0xfbd3f53208c9b7fec9228567e0e7fe838e0076f134f33be8a823c693cd854a2e

ljcutts commented 2 years ago

It looks like you are trying to deploy the contract you are inheriting, which is "ERC721Creator". What you should really be deploying is "MyContract"

wwhchung commented 1 year ago

Try the optimizer with fewer runs (e.g. 150) when compiling. Sorry for the delayed response.