Deploy your first blockchain contract to Ethereum
First contract - Pet owners I am learning blockchain and smart contracts. This post will be my note on how I am starting my journey into blockchain technology.
In this example I will create a contract for storing who is owning a Pet.
Development // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //build contract on top of Solidity >=0.8.0 and <0.9.0 contract PetOwner { mapping (string => Pet) public petOwners; struct Pet { string name; string petType; } function addPetOwner(string memory ownerName, string memory _name, string memory _petType) public { petOwners[ownerName] = Pet({name: _name, petType: _petType}); } } Put it in the Remix IDE: https://remix.ethereum.org/. It should compile and we can deploy it on the local environment: