Contract deployment - Remix IDE

On this page, we will walk you through the process of deploying your first smart contract using Remix IDE, a powerful web-based Integrated Development Environment for EVM smart contracts.

For contract deployment, you can use Remix IDE. However, encrypted contract interactions from Remix IDE are not possible on Swisstronik due to blockchain encryption. If you still want to interact with a deployed contract, ensure your provider is connected to an unencrypted endpoint: https://json-rpc.testnet.swisstronik.com/unencrypted

We highly recommend using Hardhat for contract deployment & interaction.

Only Solidity versions up to 0.8.20 are supported.

  1. Go to Remix IDE

  2. Click on the contracts folder.

  1. Select any of the three default contracts, then compile the contract by clicking on the Solidity compiler icon

  1. Click in Compile your contract

  1. Click on the Deploy & run transactions icon

  1. Connect the Remix environment to Swisstronik by clicking on Injected Provider - Metamask

Make sure the following:

  1. You are in the Swisstronik Testnet network (You can connect to Swisstronik here)

  2. Your account in Metamask is connected to Remix IDE

  3. You have SWTR balance (You can get tokens here)

  1. Click on Deploy, and then click on Confirm the transaction in Metamask

  1. Verify the successful execution of your transaction by visiting the block explorer.

Well done! You've deployed a smart contract on Swisstronik and are ready to start interacting with it. Happy exploring! 🎉

Last updated