I'm currently trying to develop my knowledge further on lower level calls such as DELEGATECALL.
I am continiously running into when trying to use .delegatecall():
RunTime Error: out of gas
Gas Usage: 0xe07e44(Decimal = 14712388)
delegateCall contract:
pragma solidity ^0.4.4;
import "delegateReceiever.sol";
contract delegateCall{
uint public testInt;
address public sender;
function delegateCall(){
testInt = 1;
}
function delegateCallC(address _c, uint _testInt){
if(_c.delegatecall(bytes4(sha3("setTestInt(uint")),_testInt ))
throw;
}
}
delegateReceiever contract:
pragma solidity ^0.4.4;
contract delegateReceiever{
uint public testInt;
function delegateReceiever(){
testInt = 2;
}
function setTestInt(uint _testInt){
testInt = _testInt;
}
}
Edited truffle deploy to increase gas like so:
deployer.deploy(contract,{gas:114712388})
Edited testrpc initial account balance to:
1e+167
Edited truffle.js file to include gas:
rpc:{
host: "localhost",
port: 8545,
gas: 114712388
}
Is there any other method of ensuring gas will not run out? For example, is there a developer parameter that requires no gas etc..?
"setTestInt(uint"
missing a closing parentheses on purpose?