Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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