Hey,
I'm new to smart contracts and I tried to deploy a test ERC-20 token on REMIX using the openzeppelin wizard contract template (code below) but I keep getting a "contract creation code storage out of gas" error.
I tried playing around with the gas limit, and even forcing the transaction (which failed with the error contract creation code storage out of gas, since I had done this after lowering the fee) but nothing seems to be working. When I tested it though, it worked perfectly as expected on Remix's VM, and the gas fee charged was minimal.
Is there a fix for this? Or am I missing something?
Contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MyToken is ERC20, ERC20Burnable, Ownable {
constructor() ERC20("MyToken", "MTK") {
_mint(msg.sender, 4000000000000 * 10 ** decimals());
}
}