#StackBounty: VM jump when accessing statically set variables

Bounty: 50

Hey it seems I get a jump error when I try to access any variable not set through a parameter in the constructor. amountRaised is throwing a jump error below as I try to statically set the value.

 contract Project {
 address public fundingHub; 
 address public projectCreator; 
 string public title; 
 string public description;
 uint256 public amountToBeRaised; 
 uint256 public deadline;
 uint256 public amountRaised; 

function Project(address _creator, uint256 _amountToBeRaised, uint256 _deadline, string _title, string _description) {
    if (_amountToBeRaised <= 0) { throw; }
    if (_deadline <= block.timestamp) { throw; }
    fundingHub = msg.sender;  
    projectCreator = _creator;
    title = _title; 
    description = _description; 
    amountToBeRaised = _amountToBeRaised;
    amountRaised = 0; 
    deadline = _deadline; 
}
}

The javascript looks like this

            return thisProject.deadline.call(); 
      }).then(function(_deadline) { 
          console.log("this is the deadline" + _deadline.valueOf());
          return thisProject.amountRaised.call(); 
        }).then(function(_amountRaised) { 
          console.log(_amountRaised.valueOf()); 
          return thisProject.amountToBeRaised.call(); 
        }).then(function(_amountToBeRaised) { 
          console.log(_amountToBeRaised.valueOf());
        });
  }


Get this bounty!!!

Leave a Reply