Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Silos to Interoperability: Building Interchain dApps on Polygon with Axelar

From Silos to Interoperability: Building Interchain dApps on Polygon with Axelar

From Silos to Interoperability: Building Interchain dApps on Polygon with Axelar

- A brief history of blockchain
- Exploring the Axelar stack
- Token transfer mechanics
- General message passing and use-cases
- Demo

Olubisi Idris Ayinde

November 14, 2023
Tweet

More Decks by Olubisi Idris Ayinde

Other Decks in Education

Transcript

  1. From Silos to Interoperability: Building
    Interchain dApps on Polygon with Axelar

    View full-size slide

  2. Idris Olubisi
    Developer Advocate, Axelar
    @olanetsoft

    View full-size slide

  3. Workshop Agenda
    - A brief history of blockchain
    - Exploring the Axelar stack
    - Token transfer mechanics
    - General message passing and use-cases
    - Demo

    View full-size slide

  4. The world has gone cross-chain
    The Beginning, 2009-2017
    1 2 3

    View full-size slide

  5. New platforms, 2017-2022
    The world has gone cross-chain
    2
    1 3

    View full-size slide

  6. Omnichain, 2023 - the future
    The world has gone cross-chain
    3
    1 2

    View full-size slide

  7. Axelar securely connects all blockchain ecosystems
    https://axelarscan.io

    View full-size slide

  8. The Axelar Stack

    View full-size slide

  9. Axelar Tech Stack

    View full-size slide

  10. Axelar- Send Tokens

    View full-size slide

  11. Send Tokens Superpowers
    Deposit Addresses sendToken() Interchain Tokens

    View full-size slide

  12. Token Transfer: Deposit Address
    A deposit address is a temporary special address created and monitored by Axelar's
    Relayer Services on behalf of the requester.
    const sdk = new AxelarAssetTransfer({ environment: "testnet" });
    const depositAddress = await sdk.getDepositAddress({
    fromChain, // source chain name
    toChain, // destination chain name
    destinationAddress, // destination chain address
    Asset // asset to transfer
    });

    View full-size slide

  13. Token Transfer: sendToken()
    sendToken is a function in Axelar's gateway EVM contract that facilitates token
    transfers between EVM and Cosmos chains
    sendToken(
    "avalanche", // destination chain name
    "0xF16DfB26e1FEc993E085092563ECFAEaDa7eD7fD", // destination address
    "USDC", // asset symbol
    100000000 // amount (in atomic units)
    )

    View full-size slide

  14. Token Transfer: Interchain Tokens
    Interchain Tokens allow you to send tokens cross-chain, build your own asset
    bridges, build asset transfers into your interchain dApp and many more.
    How is this different?
    - Create a standardized ERC-20 token on multiple chains via the Interchain Portal
    - Build a custom token on every chain with built-in methods for sending
    - Upgrade an existing token by deploying a wrapper on every chain
    - Make Interchain Tokens executable alongside GMP messages for enhanced
    functionality.

    View full-size slide

  15. Axelar - General Message Passing

    View full-size slide

  16. Send Messages Superpowers
    callContractWithToken()
    callContract()

    View full-size slide

  17. General Message Passing: callContract
    Axelar's General Message Passing (GMP) enables a developer building on one chain
    to call any function on any other connected chain.
    function callContract(
    string memory destinationChain,
    string memory contractAddress,
    bytes memory payload
    ) external;
    function _execute(
    string memory sourceChain,
    string memory sourceAddress,
    bytes calldata payload
    ) internal virtual {}

    View full-size slide

  18. General Message Passing: callContractWithToken
    Axelar's General Message Passing (GMP) enables a developer building on one chain
    to call any function on any other connected chain.
    function callContractWithToken(
    string memory destinationChain,
    string memory contractAddress,
    bytes memory payload,
    string memory symbol,
    uint256 amount
    ) external;
    function _executeWithToken(
    string memory sourceChain,
    string memory sourceAddress,
    bytes calldata payload,
    string memory tokenSymbol,
    uint256 amount
    ) internal virtual {}

    View full-size slide

  19. Live Use-Cases

    View full-size slide

  20. DEMO !
    bit.ly/polygon-interchain-workshop
    What are we doing?
    ➔ Clone a simple Next.js UI
    ➔ Write a smart contract
    ➔ Deploy the smart contract on Polygon
    ➔ Wire/connect the smart contract to the frontend
    ➔ Test the application

    View full-size slide

  21. Axelar Examples
    github.com/axelarnetwork/axelar-examples

    View full-size slide

  22. What Next ???
    It’s Easy to Build
    Interchain-Native dApps
    For support, visit #developers
    on Axelar's Discord

    View full-size slide

  23. Idris Olubisi
    [email protected]
    bit.ly/olanetsoft-survey

    View full-size slide