4

I'm currently trying to work on sending Augur (REP) through geth. I've got the abi in, I can check my balance, I receive a txid after executing the transfer, but the tx never shows up on etherscan.

augur_abi = [{augur_abi is here}]

contract = web3.eth.contract(augur_abi).at('0x48c80F1f4D53D5951e5D5438B54Cba84f29F32a5');

contract.transfer("addressgoeshere",500000000000000000);

This is what I have so far. I should note that I'm running Parity 1.3.3 in Geth mode. The amount attempting to send with this particular test being .5

Any thoughts?

jrbedard
  • 524
  • 1
  • 6
  • 15
Gwagh
  • 43
  • 4

2 Answers2

2

An even bigger noob here: where do I get the augur_abi from? Did you manage to get it to work?

  • Any op can please add this as a comment to his post? (I don't have the reputation - 50 - to comment).
Jack
  • 121
  • 2
  • Just responding to the first part of your comment. The Augur ABI can be found at https://github.com/AugurProject/augur-core/blob/develop/src/repContractAbi . – BokkyPooBah Oct 06 '16 at 11:43
2

From EtherScan.io - REP:

var repAddress = "0xe94327d07fc17907b4db788e5adf2ed424addff6";

From augur-core/src/repContractAbi:

var repABIFragment = [{"name": "transfer", "type": "function", "constant": false, "inputs": [{ "name": "receiver", "type": "address" }, { "name": "fxpValue", "type": "uint256" }], "outputs": [{ "name": "out", "type": "uint256" }]}];

Define the contract variable:

var repContract = web3.eth.contract(repABIFragment).at(repAddress);

Unlock your account:

var fromAccount = eth.accounts[0];
var toAccount = “{Destination account}”;
personal.unlockAccount(fromAccount, "<Your Password>");

Transfer the tokens:

var txId = repContract.transfer(toAccount, 500000000000000000, {from:fromAccount});

From a sample REP transfer(...) transaction, the default 90000 gas will suffice. Otherwise you can bump up the gas amount in the statement above by changing {from:fromAccount} to {from:fromAccount, gas: 150000} for example.

Antoine Dahan
  • 406
  • 5
  • 7
BokkyPooBah
  • 40,274
  • 14
  • 123
  • 193