Skip to content

Instantly share code, notes, and snippets.

@0GiS0
Created June 24, 2019 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0GiS0/be882570af6610cff1c0300473cbaee9 to your computer and use it in GitHub Desktop.
Save 0GiS0/be882570af6610cff1c0300473cbaee9 to your computer and use it in GitHub Desktop.
async (error, transactionHash) => {
if (error) {
console.log(`error: ${error}`);
}
else {
console.log(`transaction hash: ${transactionHash}`);
let receipt = await web3.eth.getTransactionReceipt(transactionHash);
console.log('Contract address: ' + receipt.contractAddress);
let contractDeployed = new web3.eth.Contract(abi, receipt.contractAddress);
contractDeployed.methods.Register.send({ from: creatorAccount }, (err, data) => {
if (err) {
console.log(`error: ${err}`);
return;
}
contractDeployed.methods.Register.send({ from: creatorAccount }, (err, data) => {
if (err) {
console.log(`error: ${err}`);
return;
}
contractDeployed.methods.GetMyRegistries.call({ from: creatorAccount }, (err, data) => {
console.log(data);
console.log(data.toString());
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment