Smart Contract Interactions
Last updated
Was this helpful?
Last updated
Was this helpful?
The iotx.Contract
class of Antenna makes it easy to interact with smart contracts on the IoTeX blockchain. When you create a new Contract
object, just initialize it with the JSON interface (ABI) of the respective contract, and the Contract object will take care of converting all contract method calls into low-level ABI calls over RPC for you.
Need a full example? .
Antenna SDK does not compile solidity code itself; however you can get the ABI and bytecode of your contract in one of the following options:
Option 1: in Node.js, import and use the node package, as in the following example:
Once you get the ABI and bytecode from the step above, then you can deploy it by sending the deploy action to the IoTeX blockchain network.
Once the action is broadcast, you can query it:
Finally, once the action is minted, you can query the receipt
Option 2: on the browser side, you can use package. Check out this .