Created
October 26, 2021 17:38
-
-
Save karthikeyanVK/2202036481b2a8626df0165e31f55aed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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