I am trying to deploy my simple ERC20
token with locally installed Truffle, but received this error:
truffle migrate --reset
Using network 'development'.
Running migration: 1_initial_migration.js
Replacing Migrations...
Migrations: 0xc67440ccf402de259e5d6193eec29283bcb5555e
Saving successful migration to network...
Saving artifacts...
Running migration: 2_deploy_contracts.js
Deploying ERC20...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.
ERC20
class contains:
pragma solidity ^0.4.11;
contract ERC20 {
//uint public totalSupply;
function totalSupply() constant returns (uint totalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
Migration JS file:
var ERC20 = artifacts.require("./ERC20.sol");
var SafeMath = artifacts.require("./SafeMath.sol");
var MyToken = artifacts.require("./MyToken.sol");
module.exports = function(deployer) {
deployer.deploy(ERC20);
//deployer.deploy(SafeMath);
//deployer.link(ERC20, MyToken);
//deployer.link(SafeMath, MyToken);
//deployer.deploy(MyToken);
};
Environment:
Truffle v3.3.0, bundle version: 3.3.1
Solidity v0.4.11 (solc-js)
EthereumJS TestRPC v3.0.5
So my token is inherited from this ERC20
contract, but I even can't compile parent one contract. What is wrong?