omchain
Search…
⌃K

Deploying on Jupiter

Now that we have an example contract and can use Remix, we can connect our wallet to Remix and deploy our contract on Jupiter.
Now first click on the dropdown list under Environment section and choose Injected Web3. If you are using a browser that doesn't support Web3, Remix will give you an error. After selecting Injected Web3, we can see that the address under the Account is ours and it displays our omChain balance on Jupiter.
You will see that the previously deployed contracts will disappear when you change the environment.
After that we click the deploy button and Metamask will show a confirmation popup to us. We can manually enter the gas price for the execution of the transaction.
Because Jupiter is a test net, any value above 0 will get your transaction confirmed.
Now that we can click on the copy button from bottom left to copy the address for our contract and see whether our transaction has been sent to Jupiter or not.
You can use the search button on the top right to look for a transaction, address or block
Congratulations! Now we can store any number we want on the Jupiter (as long as it is between 0 and 2^256). We can keep using Remix to interact with the contract. However, unlike our test deployment, any interaction with the contract that changes the state of the blockchain (i.e. setting a number to our variable) will cost you some omChain. In order to do that we can follow the steps on the local deployment, this time Metamask popup will open for you to confirm the transaction.
If this is still not interesting for you, you can try deploying the ERC20 exampel token to Jupiter and send us a few tokens :)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract SampleToken is ERC20, Ownable {
constructor() ERC20("SampleToken", "STK") {
_mint(msg.sender, 100 * 10 ** decimals());
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
}

Known Bugs

Because Remix is developed for Ethereum, from time to time it might give Gas Estimation Errors while deploying contracts on other EVM networks. In that case, leave the VALUE field empty on the Remix and set the gas price on the popup that opens for sending the transaction. In order for contract to not have any out of gas errors, we suggest you to not modify Gas Limit field.