Can’t deploy contracts to my Azure PoA Ethereum because the dependencies are too large

Hi @MWaser,

I get the same issue when attempting to deploy a StandaloneERC20 using OpenZeppelin Contracts Ethereum Package 2.4 using OpenZeppelin CLI 2.7 to your PoA network.

$ npx oz create
No contracts found to compile.
? Pick a contract to instantiate @openzeppelin/contracts-ethereum-package/StandaloneERC20
? Pick a network poa
? One or more linked dependencies are not yet deployed on dev-103098097.
Do you want to deploy them now? Yes
✖ Deploying @openzeppelin/contracts-ethereum-package dependency to network dev-103098097
Failed deployment of dependency @openzeppelin/contracts-ethereum-package with error: VM execution error.

I suspect this may be related to this:

The last compiler version that had byzantium as default was 0.5.4 (https://solidity.readthedocs.io/en/v0.5.4/using-the-compiler.html#target-options)

OpenZeppelin Ethereum Contracts 2.2.3 was compiled using solc 0.5.7, so the EVM version will be different.

You may want to look at the advanced options in Ethereum settings to see if you can specify the EVM version.


I can deploy a non-upgradeable (regular) ERC20 token

In a new project install OpenZeppelin CLI 2.8 Release Candidate and OpenZeppelin Contracts

npm install @openzeppelin/cli@rc
npm install @openzeppelin/contracts

SimpleToken.sol

pragma solidity ^0.5.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol";

/**
 * @title SimpleToken
 * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
 * Note they can later distribute these tokens as they wish using `transfer` and other
 * `ERC20` functions.
 */
contract SimpleToken is ERC20, ERC20Detailed {

    /**
     * @dev Constructor that gives msg.sender all of existing tokens.
     */
    constructor () public ERC20Detailed("SimpleToken", "SIM", 18) {
        _mint(msg.sender, 10000 * (10 ** uint256(decimals())));
    }
}

I need to compile using solc 0.5.4

$ npx oz compile --solc-version 0.5.4
✓ Compiled contracts with solc 0.5.4 (commit.9549d8ff)

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment regular
? Pick a network poa
? Pick a contract to deploy SimpleToken
✓ Deployed instance of SimpleToken
0x159b2396c75C97539b53cEbC69467d06908151c5

If I compile using solc 0.5.5 deployment fails.

$ npx oz compile --solc-version 0.5.5
✓ Compiled contracts with solc 0.5.5 (commit.47a71e8f)

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment regular
? Pick a network poa
? Pick a contract to deploy SimpleToken
✖ Deploying an instance of SimpleToken
Error: The execution failed due to an exception.