Skip to content

Instantly share code, notes, and snippets.

@karthikeyanVK
Created October 26, 2021 17:38
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 karthikeyanVK/2202036481b2a8626df0165e31f55aed to your computer and use it in GitHub Desktop.
Save karthikeyanVK/2202036481b2a8626df0165e31f55aed to your computer and use it in GitHub Desktop.
var HelloBlockchain = artifacts.require("HelloBlockchain");
module.exports = function(done) {
console.log("Getting the deployed version of the HelloBlockchain smart contract")
HelloBlockchain.deployed().then(function(instance) {
console.log("Calling SendRequest function for contract ", instance.address);
return instance.SendRequest("Hello, blockchain!");
}).then(function(result) {
console.log("Transaction hash: ", result.tx);
console.log("Request complete");
done();
}).catch(function(e) {
console.log(e);
done();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment