logoAcademy

Invoking Functions

Learn how to invoke functions on destination.

Well done, you successfully learned how to send simple data back and forth between blockchains. In this section we will look further and invoke a smart contract function on the destination chain.

What You Will Learn

In this section, you will go through the following topics:

  • Encoding: Most smart contract functions have multiple parameters. So the first thing we will learn is how to encode multiple values in the message
  • Specify which function to call: Most smart contracts have multiple functions. We will learn how to specify which function to call and encode different parameters depending on which function is been called

Exercise

In this section you will apply the learned knowledge by building a cross-chain dApp where multiple functions are called on the destination chain.

  • Build a Calculator that takes two parameters and adds them up
  • Modify the Calculator to support more functions that can be called from the source Avalanche L1

On this page