Smart contract is a key feature of AIXCHAIN network. It’s easy to creating and interacting with smart contracts through Aixchain SDK.
Calling smart contract
There are two types of smart contract calls: const call and trigger call.
Simply, a const call returns result immediately once and no need to sign or broadcast.
Trigger call is a type of system contract call, needs signing and broadcasting. It fetches the result through the API.
You may see the functions of a specified contract by ContractFunction.toString(), then you can construct a Function object to make a constant/trigger call.
Get contract
Get a Contract object from the address.
PARAMS
1. contractAddress(String)
The address of a smart contract.
RETURN
A Contract object.
THROW
Throws if the given contract address does not match any.