I'm wondering is it possible to build an entire DAPP for example a DEX or NFT marketplace with Axelar that exists on an EVM chain like Avalanche and a Cosmos chain that is non-evm compatible? I am confused how this might work due to the different virtual machines.
I am assuming you cannot just call callContractWithToken()
on a gateway contract when trying to implement this.
Thanks
I was reading on sendToken()
and callContractWithToken()
which is how I have sent tokens between evm chains I know axelar connects cosmos chains as well and am unclear how to send tokens between the chains with different virtual machines.
Yes, that's possible.
Let's assume a scenario where you are sending
ETH
to smart contract A running on Ethereum network (so EVM compatible). Once that's done, you need to a trigger some action on a smart contract B running on Cosmos.sendToken()
of contract AETHReceived
. In solidity, this shall look like:In the callback, you can trigger some action on B's function (non-EVM compatible).
So using events, you just communicated between an EVM and non-EVM compatible smart contracts!
Events are the core idea on which Chainlink is built. Refer: https://blog.chain.link/events-and-logging-in-solidity/