Ethcode docs
  • Introduction
  • Installation
    • How to install?
  • Configurations
    • Extension Settings
    • Set transaction gas strategy
  • How to Use?
    • Account
    • Initialize Ethcode
    • Compiling contracts
    • Add ABI into Ethcode
    • Deploy contract to network
    • Calling contracts
    • Create rental NFT
  • API Documentation
    • Getting started with extension API
    • wallet
    • contract
    • provider
    • events
    • status
  • Help and support
    • Support
Powered by GitBook
On this page
  • Compile smart contracts using Hardhat
  • Compile smart contracts using Remix IDE
  1. How to Use?

Compiling contracts

PreviousInitialize EthcodeNextAdd ABI into Ethcode

Last updated 2 years ago

Solidity is a high-level programming language we can understand but an EVM can't. An EVM understands instructions written in the contract in the form of bytecode generated after contract compilation.

After the compilation of any contract, the compiler returns a JSON file containing two main parts

  1. ABI - Application binary interface describes smart contract methods and functions.

  2. Bytecode - it contains instructions to EVM in the form of binary.

Compile smart contracts using Hardhat

Hardhat is a development environment that facilitates building on Ethereum. It helps developers manage and automate the recurring tasks that are inherent to the process of building smart contracts and dApps, and it allows you to easily introduce more functionality around this workflow.

To compile contracts using the Hardhat development environment we recommend you follow this page:

Compile smart contracts using Remix IDE

Remix IDE is one the most popular web-based code editor to write smart contracts. you can also use compiled contracts from Remix IDE in Ethcode for contract deployment and contract method calls.

  1. Compile smart contract on Remix IDE.

  2. After compilation copy the JSON file of your compiled contract from artifacts/ContractName_metadata.json

  3. After copying create a new folder named artifacts and then create a subfolder contracts.

  4. create a new file in the contracts folder <contractName>.json

  5. paste the content copied from RemixIDE in <contractName>.json file.

4. Writing and compiling smart contracts | Ethereum development environment for professionals by Nomic Foundation
Write and compile contract using Hardhat
Logo