Last updated
Last updated
Use getCode
for checking the byte code of the deployed smart contract.
First, create a test file and open it.
Write the following test code. Make sure you enter the contract address you just deployed.
Run the code.
Use JavaScript to call the greet()
in the contract.
NOTE: In order to call specific functions in smart contracts, you need an ABI (Application Binary Interface) file. When Truffle deploys your contract, it automatically creates .json file at ./build/contracts/
which contains abi
property.
Append the following lines to the test code written above.
Run the test code.
If you got "Hello, Klaytn", you've completed the task. Congrats!