Here's my contract: contract test_contract { uint public last_a;
function double(uint a) public returns(uint) {
last_a = a;
return 2*a;
}
function getLastA() public constant returns(uint){
return last_a;
}
function getMethod() public constant returns(bytes4){
return bytes4(keccak256("getLastA())"));
}
}
Ok. So I get the method getLastA using the getMethod, pad it to 32, get the contract address on Ropsten...and now this is my call:
url post - json(https://ropsten.infura.io/).result
params - {"jsonrpc":"2.0","id":3,"method":"eth_call","params":[{"to":"0x76a83b371ab7232706eac16edf2b726f3a2dbe82","data":"4b9a1598000000000000000000000000000000000000000000000000000000000000000"], "latest"}
You can see my oraclize query here
Just wondering if I'm doing something wrong or if this is even possible. The value it should return is 17 if anyone else thinks they have an answer.
return this.getLastA.selector
. – smarx 13 hours ago