Acala Wiki
LearnBuildMaintain
  • Acala & Karura Wiki
  • Acala 2.0
    • Overview
    • Execution Roadmap
    • aUSD SEED (aSEED)
      • aSEED Integration Guide
    • ACA
      • ACA/KAR Staking
    • Universal Asset Hub (UAH)
    • Euphrates DApp
  • Learn
    • Acala Introduction
      • Acala Dollar
      • AcalaSwap
      • Homa Liquid Staking
      • Redenomination of ACA
    • Trilogy Networks
    • Flexible Fees
      • How to change default fee token
    • Governance Overivew
      • Participate in Democracy
      • How to Verify a Runtime Upgrade
      • How to Verify Referendum Proposal
    • Treasury
    • Acala EVM+
      • Why Acala EVM+
      • Existing Solutions
      • Acala EVM+
        • Composable DeFi Stack
        • Flexible Fees
        • EVM Account
        • On-chain Scheduler
        • Queryable & Lightweight
        • Upgradable Contracts
        • Compatible Toolings
        • No Dust Account
      • How does it work?
  • Get started
    • Acala Network
      • Acala Launch Phases
      • Wallet & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type and Vesting
        • Check Address for Different Chains
      • Acala's DOT Bridge
      • Acala Assets
      • Governance
      • Acala Web Apps
      • Acala Mobile
    • Karura Network
      • Karura Launch Phases
      • Check Distribution
      • Wallets & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type & Vesting
        • Check Address for Different Chains
      • Inter Kusama Transfer
      • Karura Assets
      • Karura Web Apps
      • Governance
      • Transaction Fees
    • Mandala Testnet
  • Integrate
    • Acala Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
    • Karura Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
  • Build
    • EVM+ documentation
    • SDKs
      • Acala Stablecoin
      • Homa Liquid Staking
      • AcalaSwap
      • Homa Staking
    • Guides
      • Node Interaction
      • Transaction Construction
    • Build DApps
      • Deploy Ecosystem Modules
      • Composable Chains
        • Open HRMP Channel
        • Bridge Tokens
        • Cross-chain Listing
      • Open-Web3-Stack & ORML
      • Smart Contracts
        • Acala EVM Overview
        • Get Started
          • Connect to a Node
            • Use MetaMask with EVM+
          • Setup EVM Account
          • Polkadot Explorer
          • EVM Playground
          • Use Remix
          • Use Waffle
          • Use Hardhat
          • Deploy Contracts
        • Advanced
          • Use Native & Cross-chain Tokens
          • Use On-chain Scheduler
            • Tutorial
          • Use Oracle Feeds
          • Upcoming Features
        • Acala EVM Hacker Guide
          • Try Acala DApp
    • Tools
    • Indexers
      • SubQuery
    • Miscellaneous
      • Runtime Events
      • Modules
    • Cross Chain DeFi
  • Ecosystem
    • General Info
    • Alliance
    • Community
    • Contribution & Rewards
      • Acala Old Friend NFT
    • Ecosystem
    • Media Kits
    • Ledger Generic App Migration
  • Crowdloans
    • What are crowdloans
    • Acala Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim ACA
      • How to Crowdloan
      • FAQ
      • Acala Quests
        • Attaching Polkawallet to Polkadot.js Extension
      • DOT Address
        • Creating a New DOT Account
        • Becoming a DOT Holder
        • Unstaking Your DOT
          • Unstaking Your DOT Tokens on Polkadot.{js} Extension
          • Unstaking Your DOT Tokens on Polkawallet
    • Karura Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim KAR
      • How to Crowdloan
      • FAQ
      • KSM Address
        • Creating a New KSM Account
        • Check KSM Address
        • Unstaking Your KSM
          • Unstaking Your KSM Tokens on Polkawallet
          • Unstaking Your KSM Tokens on Polkadot.{js} Extension
      • Finding Tokens and NFTs
  • Misc
    • aUSD Incident
    • Contributing
    • Glossary
Powered by GitBook
On this page
  • Compile a Solidity Contract using Remix Comment
  • 1. Launch Remix
  • 2. Compile the Solidity code
  • 3. Get the ABI File

Was this helpful?

Edit on GitHub
  1. Build
  2. Build DApps
  3. Smart Contracts
  4. Get Started

Use Remix

PreviousEVM PlaygroundNextUse Waffle

Last updated 4 years ago

Was this helpful?

There are multiple tools you can use to develop and compile Solidity contracts, we'd present two here as options

  • online web app Remix

  • Solidity development and testing framework Waffle

Compile a Solidity Contract using Remix Comment

This guide walks through the process of creating and deploying a Solidity-based smart contract to the Acala standalone node using the . Remix is one of the commonly used development environments for smart contracts on Ethereum.

1. Launch Remix

Navigate to . Under Environments, select Solidity to configure Remix for Solidity development, then navigate to the File Explorers view.

Here’s an example to compile an ERC20 contract using Remix. Open Remix and under the File section click New File.

In the file explorer in the left window will appear an input, where you write filename: BasicToken.sol.

2. Compile the Solidity code

Paste the following code into the editor tab that comes up.

pragma solidity ^0.7.0;

import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC20/ERC20.sol';

// This ERC-20 contract mints the specified amount of tokens to the contract creator.
contract BasicToken is ERC20 {
  constructor(uint256 initialSupply) ERC20("BASICT", "BAT") public {
    _mint(msg.sender, initialSupply);
  }
}

Note: this is a simple ERC-20 contract based on the Open Zeppelin ERC-20 template. On construction, it creates the BasicToken with the symbol BAT, and mints the total initial supply.

Below is the editor view.

Remix will include all of the Open Zeppelin dependencies and compile the contract.

Then select Solidity compiler on the sidebar, and press the Compile BasicToken.sol button.

Remix downloads all of the Open Zeppelin dependencies and compiles the contract.

3. Get the ABI File

Navigate back to File explorers , in the artifacts section find the BasicToken.json file. Copy and paste the content and save it locally, this is the ABI file that will be deployed to Acala EVM later.

Remix
https://remix.ethereum.org/