This is the smart contract I'm trying to interact with, verified on etherscan.io, and reproduced here:
pragma solidity ^0.4.13;
// This contract demonstrates a simple non-constant (transactional) function you can call from geth.
// increment() takes no parameters and merely increments the "iteration" value.
contract Incrementer {
uint iteration;
function Incrementer() {
iteration = 0;
}
function increment(uint count) {
iteration += count;
}
function getIteration() constant returns (uint) {
return iteration;
}
}
The commands I'd like to use to call it are:
Incrementer.deployed().then(function(instance) {
meta = instance;
return meta.increment(1);
})
to increase the iteration variable, and:
Incrementer.deployed().then(function(instance) {
meta = instance;
return meta.getIteration();
})
to verify the result.
Those are commands that work on the truffle console with testrpc, but now I'm trying to issue those commands through geth to the ropsten testnet.
I've tried to adapt them to this purpose according to the answer to this question, like so:
var contractAbi = eth.contract([{"constant":false,"inputs":[{"name":"count","type":"uint256"}],"name":"increment","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getIteration","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"}]);
var myContract = contractAbi.at(0x8705C513da621a16fd1dEFc9dE8aE7CDEAD01Fb8);
var getData = myContract.getIteration.getData(1);
web3.eth.sendTransaction({to:0x8705C513da621a16fd1dEFc9dE8aE7CDEAD01Fb8, from:0xd7a9a61a480d458a1181e0563b07f944df4489a6, data: getData});
but it didn't work, the result was this:
Error: invalid address
at web3.js:3879:15
at web3.js:3705:20
at web3.js:4948:28
at map (<native code>)
at web3.js:4947:12
at web3.js:4973:18
at web3.js:4998:23
at <anonymous>:1:1
The output of getData rendered in this way:
> getData
"0xfc2c3e08"
See the console output here:
What is the correct procedure to adapt those commands to execute a function on the ropsten tesnet using geth console?


29ais exactly666in hex representation, you can check it here:http://www.binaryhexconverter.com/hex-to-decimal-converter
– smatthewenglish Jul 31 '17 at 17:06