02 Preparation and Compilation of a Smart Contract
CAUTION: In some of our contract codes, at this stage you need to CUSTOMIZE YOUR TOKEN (Name, Symbol, etc.). And only then start compilation.
Check the page of the contract you have chosen for all the information!
— Back to Remix and create new file (in the File Explorer section)
— Name the new file as you wish. Don't forget to insert .sol after the name.
Example: TokenName.sol
Now you have the space to edit and write code. It's on the right.
— Copy and paste the code into the space.
You can find smart contract codes in our library.
CAUTION: Do not attempt to change any code or else it won't work
— Go to Solidity Compiler
— Select the compiler version that matches your smart contract.
At the beginning of each contract code there is a line "pragma solidity".
After this line there is a version of the compiler that will fit your contract.
— Click "Compile"
If the compilation was successful, a green check mark will appear next to the compiler icon. ✅
"Compiling a smart contract involves using the contract's source code to generate its bytecode and the contract Application Binary Interface (ABI). The Ethereum Virtual Machine (EVM) executes the bytecode to understand and execute the smart contract."
At this point, you have successfully compiled your smart contract.