Interoperability in NFT protocols

SPL404, based on Solana and distributed ledger technology, has partnered with Certus One, the main validator of Solana, to create Wormhole. Wormhole is a two-way, decentralized ERC-20⇄SPL token bridge that connects Ethereum and Solana. Wormhole does not have its own blockchain network but relies on the consensus and final confirmation of the two chains it bridges. Wormhole allows existing projects, platforms, and communities to seamlessly move tokens across chains while taking full advantage of Solana's high speed and low transaction costs. Wormhole is a collaborative development of Solana and Certus.One, and it is now available online. Wormhole is a two-way cross-chain bridge between Ethereum and Solana, which allows users and applications to convert ERC20 tokens into SPL tokens of Solana for use in enriching the application scenarios of DeFi and improving performance. The "trustless" bridge of Solana enables Ethereum's DeFi traders and applications to convert assets between the two chains and enjoy Solana's high tps and low transaction costs. Since Wormhole is a two-way bridge, users can also choose to have value return to the Ethereum network. Developers can take full advantage of the advantages of both chains without having to rewrite their Ethereum contracts or focus on a single blockchain when using the Wormhole protocol. If users need to withdraw their assets back to Ethereum, they can do so through Wormhole. Solana's Wormhole is dedicated to helping Ethereum alleviate DeFi congestion. However, other projects, such as encrypted games and payment services, can also use the Wormhole protocol to serve themselves. There are many ways to cross chains, but only those that are highly compatible and complex can make it easier for users to use.

Environment Setup

Testing Locally

Pull the code down from github and cd into the directory, then build and test it.

//git clone https://github.com/wormhole-foundation/hello-wormhole.git
cd hello-wormhole
npm run build
forge test

Expected output is

Running 1 test for test/HelloWormhole.t.sol:HelloWormholeTest
[PASS] testGreeting() (gas: 777229)
Test result: ok. 1 passed; 0 failed; finished in 3.98s

Explanation of the HelloWormhole Cross-chain Contract

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract HelloWorld {
    event GreetingReceived(string greeting, address sender);

    string[] public greetings;

    /**
     * @notice Returns the cost (in wei) of a greeting
     */
    function quoteGreeting() public view returns (uint256 cost) {
        return 0;
    }

    /**
     * @notice Updates the list of 'greetings'
     * and emits a 'GreetingReceived' event with 'greeting'
     */
    function sendGreeting(
        string memory greeting
    ) public payable {
        uint256 cost = quoteGreeting();
        require(msg.value == cost);
        emit GreetingReceived(greeting, msg.sender);
        greetings.push(greeting);
    }
}

Last updated