|
| 1 | +--- |
| 2 | +description: Remix |
| 3 | +--- |
| 4 | + |
| 5 | +# Remix |
| 6 | + |
| 7 | +## Intro |
| 8 | + |
| 9 | +[Remix] is a popular web IDE for swift development, deployment and testing |
| 10 | +smart contracts on the Ethereum Network. We will use it in combination with |
| 11 | +MetaMask to access the network settings and your wallet to sign and submit the |
| 12 | +transactions. |
| 13 | + |
| 14 | +:::info |
| 15 | + |
| 16 | +Refer to the [Remix documentation] for a deeper look of all functionality. |
| 17 | + |
| 18 | +::: |
| 19 | + |
| 20 | +## Setup |
| 21 | + |
| 22 | +If you haven't done it yet, first [install the MetaMask extension for your |
| 23 | +browser][metamask]. Add the Sapphire networks to your MetaMask, our |
| 24 | +[network page] has handy `Add to MetaMask` buttons for this. If you wish to |
| 25 | +connect to the Sapphire [localnet] container, configure the local network as |
| 26 | +well. |
| 27 | + |
| 28 | +When you open Remix for the first time, it automatically creates an example |
| 29 | +project. Open the `contracts` folder and select the `1_Storage.sol` file. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +## Compilation |
| 35 | + |
| 36 | +Continue on the **Solidity Compiler** tab. Select the compiler version |
| 37 | +**`0.8.24`**, under *advanced configuration* select the evm version **`paris`** |
| 38 | +and after click `Compile 1_Storage.sol` |
| 39 | + |
| 40 | +:::info Compiler Version |
| 41 | + |
| 42 | +The Sapphire uses the [Rust Ethereum EVM][rust-evm]. This implementation is |
| 43 | +compatible with Solidity versions up to **0.8.24**. However, it does not yet |
| 44 | +support some transaction types introduced in Solidity **0.8.25**, such as those |
| 45 | +mentioned in [rust-ethereum/evm#277][revm-277], which are pending release. |
| 46 | + |
| 47 | +::: |
| 48 | + |
| 49 | +:::info EVM Version |
| 50 | + |
| 51 | +EVM versions after **paris** (shanghai and upwards) include the PUSH0 opcode which |
| 52 | +isn't supported on Sapphire. |
| 53 | + |
| 54 | +::: |
| 55 | + |
| 56 | +[rust-evm]:https://github.com/rust-ethereum/evm |
| 57 | +[revm-277]: https://github.com/rust-ethereum/evm/issues/277 |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +## Deploying |
| 62 | + |
| 63 | +Next, in the **Deploy and Run Transactions** tab, select the `Injected Web3` |
| 64 | +environment. A MetaMask popup will appear and you will have to connect one or |
| 65 | +more accounts with Remix. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +Once the connection succeeds, click on the `Deploy` button. The MetaMask popup |
| 70 | +appears again and you will have to review the transaction and finally confirm |
| 71 | +the transaction. |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +If everything goes well, your transaction will be deployed using the selected |
| 76 | +account in the MetaMask and the corresponding Sapphire Network. |
| 77 | + |
| 78 | +Congratulations! Now you can start developing your own smart contracts on |
| 79 | +Oasis Sapphire! Should you have any questions, do not hesitate to |
| 80 | +share them with us on the [#dev-central Discord channel][discord]. |
| 81 | + |
| 82 | +## Confidential Features |
| 83 | + |
| 84 | +The transactions and queries send with Remix are unencrypted and unsigned. |
| 85 | + |
| 86 | +## Sourcify integration |
| 87 | + |
| 88 | +If you go on a verified contract on Sourcify, you can directly open it in in Remix. |
| 89 | +This allows you to make contract calls with out the need of a deticated frontend. |
| 90 | + |
| 91 | +:::info ABI-Playground |
| 92 | + |
| 93 | +An alternattive way to make contract calls of Sapphire contracts is our |
| 94 | +[ABI-Playground]. |
| 95 | + |
| 96 | +::: |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +[localnet]: ./localnet.mdx |
| 101 | +[network page]: https://docs.oasis.io/dapp/sapphire/network#rpc-endpoints |
| 102 | +[Remix]: https://remix.ethereum.org |
| 103 | +[Remix documentation]: https://remix-ide.readthedocs.io/en/latest/ |
| 104 | +[metamask]: ../../general/manage-tokens/README.mdx#check-your-account |
| 105 | +[discord]: https://oasis.io/discord |
| 106 | +[ABI-Playground]: https://abi-playground.oasis.io/ |
0 commit comments