Read
You can call functions in Smart Contract via "Call" RPC API. What you can call here is limited to view functions that is not changing any states in the Contract.
Import the web3 and @kaiachain/web3js-ext packages to add kaia features on web3
Set up the provider with the specified kairos testnet URL. A provider in web3js is a read-only abstraction to access the blockchain data.
Also, you can change the provider URL from kairos to quicknode
Define contract Abi and addreess, you can get it from compiled solidity code
Create a contract instance using Web3.eth.Contract
with defined contractAbi and address. You can read and write the contract through this instance
Call function number of created contract and print the result