Hello, World
Welcome to Flow blockchain, Let's call a contract on Testnet.
Calling a contract
There exists a HelloWorld Contract on Testnet. Scripts are used to call contracts. For the purposes of this quick start, we are embedding Flow Runner website to run a script against Testnet. For reference Flow Runner website
_10import HelloWorld from 0x9dca641e9a4b691b_10_10pub fun main(): String {_10 return HelloWorld.greeting_10}
Copy
the script above into Flow Runner and click "Execute Script" Then scroll down to see the output.
Contract on Testnet
Here is the contract, see the simple Cadence syntax to create a contract.
_12pub contract HelloWorld {_12_12 pub var greeting: String_12_12 pub fun changeGreeting(newGreeting: String) {_12 self.greeting = newGreeting_12 }_12_12 init() {_12 self.greeting = "Hello, World!"_12 }_12}
You can see how simple it is to call a method on a contract. There are no costs associated with calling contracts. Continue to learn how to create your own custom contracts and deploying with Flow CLI
Check out the Flow CLI