Skip to main content

Deploying a smart contract

You can deploy your contracts to a network in the platform or a local development network. This guide covers both Platform UI and SDK CLI approaches.

Follow these steps to deploy your smart contract through the Platform UI:

  1. Open the IDE by clicking on your smart contract set.

    Open IDE

  2. Click on the Task Manager button.

    Task Manager

  3. First compile your contract by running either:

    • Hardhat - Build task Hardhat compile task manager
    • Foundry - Build task Foundry compile task manager
  4. To deploy to a platform network:

    • Run the SettleMint - Login task SettleMint login
    • Run the Hardhat - Deploy to platform network task Hardhat deploy remote task manager
    • Select your node and private key when prompted Hardhat deploy remote select node
  5. To deploy locally:

    • Run the Hardhat - Start local network task Hardhat start local network
    • Run the Hardhat - Deploy to local network task Hardhat deploy local network

Project Structure

The typical folder structure of a SettleMint smart contract set includes:

  • contracts/: Contains the Solidity smart contracts
  • test/: Contains both Hardhat (TypeScript) and Foundry (Solidity) tests
  • script/: Deployment and interaction scripts
  • lib/: Optional Solidity libraries
  • ignitions/: Hardhat deployment configurations
  • out/: Compilation artifacts
  • foundry.toml: Foundry configuration
  • hardhat.config: Hardhat configuration
  • subgraphs/: The Graph indexing configurations

Customize smart contracts

You can customize your smart contracts using the built-in IDE. The smart contract sets include a Generative AI plugin to assist with development. Learn more about the AI plugin here.