ERC721 with Ownable gets error Cannot create instance of <contractname>; no code at address

:computer: Environment

Truffle v5.3.1 (core: 5.3.1)
Node v12.17.0


When I have Ownable in my contract I get this error when attempting to deploy:

Cannot create instance of Color; no code at address

:1234: Code to reproduce

pragma solidity ^0.7.4;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Color is ERC721, Ownable {

	constructor() Ownable() ERC721("Color", "COLOR") public {


Welcome to the forum @larfpi!

How are you deploying?

I’m deploying with Truffle to Ropsten via and Infura and using HDWalletProvider

Hi, welcome! :wave:

So could you please share your scripts(Do not upload sensitive message, such as your private key)

1 Like