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.
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:
4. Writing and compiling smart contracts | Ethereum development environment for professionals by Nomic Foundation
Write and compile contract using Hardhat
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
- 3.After copying create a new folder named
artifactsand then create a subfolder
- 4.create a new file in the
- 5.paste the content copied from RemixIDE in