Run On-chain

Learn how to run methods of a contract on-chain

About Run

Run operation means that you execute the contract's function on-chain by sending it an external inbound message. Run steps
Run operation consists of few steps:
  1. 1.
    Creating a message;
  2. 2.
    Sending a message;
  3. 3.
    Receiving the message completion transaction;
  4. 4.
    Receiving external messages created by return function;
  5. 5.
    Decoding the messages bodies according to the ABI.

Run on-chain

For running methods of ABI-compatible contracts AppKit provides run method:
// Call `touch` function
let response = await"touch", {});

Sample source code

Check out core api documentation for more information about running a contract.