1

I'm quite new to working with IOTA, I just got started with the Shimmer network. My simple test is to send messages from a React Native application to the IOTA Shimmer network. Then, I want to write a smart contract, in Solidity (I believe it is supported by Shimmer or through any compatible layer), that can retrieve and interact with these submitted messages.

Challenges:

  • I have basic knowledge of React Native but no experience with the IOTA Shimmer.
  • I am familiar with Solidity but not sure how it integrates with Shimmer, if at all.

Questions:

  • Is it possible to integrate a React Native application with the IOTA Shimmer to send messages?
  • How can one write and deploy a smart contract on the Shimmer network that interacts with these messages? Is Solidity an option, or is there a specific language or framework that Shimmer requires for smart contracts?
  • Are there any examples or resources that demonstrate similar integrations or workflows that I could reference?
  • Any guidance or pointers to relevant documentation, tutorials, or examples would be greatly appreciated.

Thank you in advance for your help!

1 Answer 1

0

The best way to achieve this concept on IOTA is by using the IOTA EVM Testnet rather than Shimmer, so I'll focus on the IOTA EVM Testnet for this solution.

To answer some of your questions:

Yes, it is possible to integrate a React Native application with the IOTA EVM Testnet. Since the IOTA EVM is Ethereum-compatible, you can use popular Ethereum libraries, such as ethers.js or web3.js, to interact with the IOTA EVM network from a React Native app.

Here are some URLs that might be helpful.

https://wiki.iota.org/isc/how-tos/deploy-a-smart-contract/ https://docs.ethers.org/v6/ https://web3js.readthedocs.io/en/v1.10.0/

Here is an example of a simple, smart contract that can be deployed on the IOTA EVM Testnet to send and receive messages.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

contract MessageContract {
    event MessageSent(address indexed from, string message);

    string public lastMessage;

    address public lastSender;

    function sendMessage(string memory _message) public {
        // Store the message and the sender
        lastMessage = _message;
        lastSender = msg.sender;

        // Emit the event to log the message sent
        emit MessageSent(msg.sender, _message);
    }

    function getLastMessage() public view returns (address, string memory) {
        return (lastSender, lastMessage);
    }
}

I suggest you deploy a smart contract in Solidity to the IOTA EVM Testnet. This contract will enable users to send, receive/get messages from the IOTA EVM Network. You can then create a React frontend and use Web3.js or ethers.js to interact with the smart contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.