Quick start

Quick start for your in Creator Chain

Quick Start Guide: Deploy Your First Contract on Creator

In this guide, we'll walk you through deploying a sample contract on Creator in under 10 minutes using Remix IDE. Let’s get you started!

Get Started

  1. Prepare Your Environment

    • Add Creator Testnet to MetaMask by following our step-by-step guide.

    • Ensure you have Sepolia ETH and have bridged it to the Creator Testnet Network. For instructions, see our Testnet Faucets guide.

  2. Set Up Remix IDE

    • Remix is a user-friendly tool for smart contract development, providing a straightforward deployment process, debugging capabilities, and contract interaction.

Sample Code

We’ll use the 1_Storage.sol contract provided by Remix, but you can deploy your own code as well. This example includes functionality to store and retrieve a number and registers the contract with the SFS (Sequencer Fee Sharing) registry.

Here’s the sample code for 1_Storage.sol:

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.20;

interface Sfs {
    function register(address _recipient) external returns (uint256 tokenId);
}

contract Storage {
    uint256 number;

    constructor(){
        // SFS contract address on testnet
        Sfs sfsContract = Sfs(0xBBd707815a7F7eb6897C7686274AFabd7B579Ff6); 
        // Register this contract and assign the NFT to the deployer
        sfsContract.register(msg.sender); 
    }
    
    function store(uint256 num) public {
        number = num;
    }

    function retrieve() public view returns (uint256){
        return number;
    }
}

This contract allows you to store a number and read it back while also registering it with the SFS registry.

Deployment Steps

  1. Paste and Compile Code

    • Copy the sample code into a .sol file in Remix.

    • Go to the Solidity Compiler tab, select the contract, and click Compile. Enable Auto Compile for automatic recompilation with changes.

    • Set the EVM version to London in the advanced settings to avoid compatibility issues.

  2. Deploy the Contract

    • Switch to the Deploy & Run Transactions tab.

    • In the Environment dropdown, select Injected Provider - MetaMask to connect MetaMask with Remix.

    • Ensure MetaMask is set to the Creator Testnet.

    • Choose the compiled contract and click Deploy.

    • Confirm the transaction in MetaMask, which will display minimal fees, typically around $0.35 or 0.00018852 ETH.

Congratulations! 🎉

Last updated