Skip to content

Instantly share code, notes, and snippets.

@karthikeyanVK
Created October 26, 2021 17:49
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/cb4fd3089990d291a20209b2ef7e8cc2 to your computer and use it in GitHub Desktop.
Save karthikeyanVK/cb4fd3089990d291a20209b2ef7e8cc2 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 getMessage function for contract ", instance.address);
return instance.getMessage();
}).then(function(result) {
console.log("Request message value: ", result);
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