Skip to content

Instantly share code, notes, and snippets.

@chunkydotdev
Created August 13, 2018 20:54
Show Gist options
  • Save chunkydotdev/169ff3f7f175c4f1a39078a1a0849603 to your computer and use it in GitHub Desktop.
Save chunkydotdev/169ff3f7f175c4f1a39078a1a0849603 to your computer and use it in GitHub Desktop.
let ckAddress = '0x06012c8cf97bead5deae237070f9587f8e7a266d';
web3.eth.defaultAccount = web3.eth.accounts[0];
let aContract = web3.eth.contract(ckABI);
let ckContract = aContract.at(ckAddress);
let value = web3.toWei(0.008, 'ether')
let data = ckContract.breedWithAuto.getData(pair.matronId, pair.sireId);
let breedData = await web3.eth.sendTransaction({
from: web3.eth.defaultAccount,
to: ckAddress,
value: value,
data: data,
}, function(err, response){
console.log('err',err,'response',response)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment