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

Web3 Lagos: Building a Full stack Interchain dApp with Axelar

Web3 Lagos: Building a Full stack Interchain dApp with Axelar

A technical workshop on "Building a Full stack Interchain dApp with Axelar" at the Web3 Lagos Conference.

Olubisi Idris Ayinde

September 01, 2023
Tweet

More Decks by Olubisi Idris Ayinde

Other Decks in Education

Transcript

  1. Workshop Agenda - How it all started in the web3

    - Axelar stack - Send tokens - General message passing and use-cases - Demo
  2. 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 });
  3. 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) )
  4. 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.
  5. 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 {}
  6. 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 {}
  7. DEMO ! bit.ly/fullstack-interchain-dapp What are we doing? ➔ Clone the

    project. ➔ Install dependencies. ➔ Set up wallet environment variables. ➔ Compile and deploy the smart contract. ➔ Add the contract address to the environment variables. ➔ Access the application in your browser.
  8. What Next ??? It’s Easy to Build Interchain-Native dApps For

    support, visit #developers on Axelar's Discord