Marcin Jasion - Pragmatic DevOps
  • Home
  • About
  • Skills
  • Experiences
  • Accomplishments
  • More
    Presentations Recent Posts
  • Posts
  • Notes
  • Notes
  • Dark Theme
    Light Theme Dark Theme System Theme
  • Tags
  • Automation
  • Aws
  • Blockchain
  • Cloudflare
  • Debugging
  • Distributed-Systems
  • Ethereum
  • Frontend
  • Gitlab
  • Gmail
  • Golang
  • Google-Apps-Script
  • Istio
  • Kubernetes
  • Leader-Election
  • Networking
  • Performance
  • Side-Projects
  • Solidity
  • Tanstack
  • Terraform
  • Terraform-Cloud
  • Tutorial
  • Unifi
  • Vpn
Hero Image
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:

  • ethereum
  • blockchain
  • solidity
  • tutorial
Saturday, April 9, 2022 | 2 minutes Read
Navigation
  • About
  • Skills
  • Experiences
  • Accomplishments
  • Presentations
  • Recent Posts
  • Notes
Contact me:
  • hello@mjasion.pl
  • mjasion
  • Marcin Jasion

Toha Theme Logo Toha
© 2026 Copyright.
Powered by Hugo Logo