This is a basic smart contract written in solidity using truffle This repository is done using WSL on windows 10 of vUbuntu 20.04.1 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
0..to create a truffle project we need to install a npm package for truffle, => cmd - (npm install -g truffle) in wsl [you can also use powershell]
-
to start project = truffle init
-
to create contract = truffle create contract {Helloworld in this case}
-
write your code using vim or your preferred editor ( used vs code via wsl ) cmd to go to vs code through WSL is (code .)
-
to create migration file = truffle create migration < contract name > ( a numbered migration file will be created )
-
copy the 1_initial_migration.js file and paste in the starting ine of the numbered migration......
-
to build contract = truffle compile ( after typing this command a local port will appear which says at which port the truuffle project has started and also there will be account keys and private keys in addition to the key a mnemonic will appear which is private to you ## DO NOT SHARE THIS INFO WITH ANYONE## )
-
now type migrate and the contract will be deployed showing the info related to the contract
-
to check your contract has successfully built type your contract name info will be displayed regarding your smart contract such as bytecode ( in hash ) etc....
##### THANK YOU #####