Now that you have deployed the Hello World smart contract on the Tron blockchain. You can interact with your contract by calling functions defined in HelloWorld.sol in Tron-IDE.
Enter the contract address (TAbsq7DzmrFriHZ5Vk2cK4npCcYPvtWhZ8) into ** At Address ** to call smart contract functions.
The contract contains two functions: `
postMessage` and `
postMessage` function is state-changing because it changes the message variable within the contract. The calling of this function needs a signature and consumes energy. The `
getMessage` function is read-only, it only returns the message variable (reading the contract, not changing the state) and no signature or resources consume is needed.
A successful call of `
getMessage` returns the **_id_** and **_contract_result_** and the transaction receipt. The **_id_** is the hash of the transaction broadcasted to the blockchain, and the **_contract_result_** is the output of the function call. The `
getMessage` function returns the variable message, it's an empty string in this example. You can make a change that by calling `
You have successfully created, compiled, deployed, and interacted the HelloWorld smart contract on the TRON blockchain. Congratulations!