Contract not setting constructor parameters and gas error when interacting with the contract

Hi @rtraba,

I am sorry that you are having problems.

The reason why this wasn’t working is that OpenZeppelin SDK is for creating upgradeable contracts, and the Token you posted is a non-upgradeable contract. Apologies that this is confusing.
I have created an issue to warn users: https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1297.
There is also a plan to remove this requirement: Planning the demise of OpenZeppelin Contracts' evil twin.

https://docs.openzeppelin.com/sdk/2.5/writing-contracts
You can use your Solidity contracts in the OpenZeppelin SDK without any modifications, except for their constructors . Due to a requirement of the proxy-based upgradeability system, no constructors can be used in upgradeable contracts.

To create an upgradeable token using OpenZeppelin SDK then we need to use @openzeppelin/contracts-ethereum-package otherwise we can create a non-upgradeable token and deploy using truffle.

https://docs.openzeppelin.com/sdk/2.5/linking
NOTE: Make sure you install @openzeppelin/contracts-ethereum-package and not the vanilla @openzeppelin/contracts . The latter is set up for general usage, while @openzeppelin/contracts-ethereum-package is tailored for being used with the OpenZeppelin SDK. This means that its contracts are already set up to be upgradeable.

Example

In an OpenZeppelin SDK project (see Your first project for setup)

Link OpenZeppelin Contracts Ethereum Package and install @openzeppelin/upgrades

openzeppelin link @openzeppelin/contracts-ethereum-package
npm install @openzeppelin/upgrades

SimpleToken.sol

Upgradeable SimpleToken

pragma solidity ^0.5.0;

import "@openzeppelin/upgrades/contracts/Initializable.sol";

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

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

    /**
     * @dev initialize that gives msg.sender all of existing tokens.
     */
    function initialize(address sender) public initializer {
        ERC20Detailed.initialize("Token", "TKN", 18);
        _mint(sender, 1000000 * (10 ** uint256(decimals())));
    }
}

If you need assistance with a mintable/burnable contract let me know.


As an aside, I assume there was a reason for overriding functions such as approve and transferFrom.