This is my first project in Solidity and Ethereum! I've learned how to deploy and run a smart contract on the Ethereum blockchain.
The purpose of this smart contract is to simplify land registration and eliminate scammers. It includes various methods, and here are a few important ones:
transferOwnership: This function transfers the ownership of the land to another Ethereum account. Only the account specified in the owner variable can execute this function.whoIsTheOwner: This function allows others to find out who the owner of the land is.changeMyDetails: This function enables the owner to modify their details. Only the owner can call this function.
npm imv .env.example .envand fill in the details in .env
npx hardhat compilenpx hardhat run --network sepolia scripts/deploy.jsTo test a deployed contract by doing the steps above, You need to use Land UI - a testing place for contracts.
Land UI is made with React and Vite, so you need to cd into land_ui and
start the server.
Here are the steps to do that:
cd land_uinpm inpm run devIf you're interested in learning Solidity and smart contracts, I found these videos helpful in gaining a better understanding of the concepts. Each video has a maximum duration of 20 minutes: