Biconomy Gasless SDK (EOA)
DashboardMediumWebsite
  • 🚀Getting Started
  • Introduction
    • 🤘Why Biconomy?
    • 🙂How we simplify transactions
  • Products
    • 💸Gasless Transactions
      • Choose An Approach to Enable Gasless
        • Standard EIP 2771 Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Custom Implementation Approach
          • 1. Register Artifacts on the Dashboard
          • 2. Code Changes
            • Using SDK
            • Using API
        • Smart Contract Wallet Approach
          • Gnosis
        • Network Agnostic Transactions
          • EIP-2771 Approach
          • Custom Approach
      • Conditional Whitelisting
      • Gasless SDK (EOA) 3
      • Networks Supported
    • ↔️Hyphen - Instant Cross-Chain Transfers
      • SDK
        • DepositManager
        • TransferManager
        • TokenManager
      • APIs
      • Helper Methods
      • Migrating from Hyphen V1
      • Contract Addresses
      • Hyphen Widget
  • Guides
    • 💻Dashboard
      • DApp Statistics
    • ⛽Gas Tank Deposits
      • Via Dashboard
      • Via Smart Contract
  • api
    • 🔧Native Meta Transaction
      • Get Retried Hashes
    • 🌎Dashboard APIs
    • ⚪Whitelist API
      • Whitelist Destination Address
      • Whitelist Proxy Contracts
    • 〰️ Check Limits
    • 💿Biconomy Data API
      • 👨‍🚀Unique User Data
      • 🧑‍🔧Per User Limits Data
      • ⛽Gas Tank Balance Data
  • SDK
    • 📙Gasless SDK (EOA)
      • Configuration
  • Tutorials
    • 🔰Native Meta Transactions
      • How To Build Your First DApp
        • Write Your First Smart Contract
        • Initialize Web3 on Client Side
        • Executing First Blockchain Transaction
      • Enable Native Meta Transactions
        • Smart Contract
          • Describe Your Structs
          • Declare Your Variables
          • Modify Respective Function
        • Client Side
          • Design Your JSON structure
          • Design Your Domain Separator
          • Design Data Types
          • Define Data To Sign
          • Generate Signatures
      • Integrate Biconomy
        • Register On Dashboard
        • Integrate Gasless SDK (EOA)
      • Summary
  • BICO Staking
    • 🪁Safety Module
  • Get in touch
    • 👥Contact Us
  • Misc
    • 🧩Projects on Biconomy
    • 🌐Supported Networks
    • 📫Contract Addresses
    • ✔︎ Smart Contracts Audit
    • ❓FAQs
Powered by GitBook
On this page

Was this helpful?

  1. Tutorials
  2. Native Meta Transactions
  3. How To Build Your First DApp

Write Your First Smart Contract

First step of being a blockchain developer

PreviousHow To Build Your First DAppNextInitialize Web3 on Client Side

Last updated 5 years ago

Was this helpful?

is a powerful, open source tool that helps you write Solidity contracts straight from the browser. Remix also supports testing, debugging and deploying of smart contracts and much more. It is recommended to use to create and deploy smart contracts quickly.

In Remix, create a new file with name Quote.sol by clicking icon in browser section under FILE EXPLORERS section and start writing the code as mentioned below.

Mention Compiler Version

pragma solidity >=0.5.0<0.6.0;

Make sure the solidity version declared in the contract matches your compiler version

Declare Contract Statement

contract Quote { }

Add Public Variables

quote is used to store the current quote in our smart contract

owner is used to store the owner of the current quote

string public quote;
address public owner;

Setter Function

Updates the current quote and the current owner of the quote. Here msg.sender is used to extract the user address who signed the transaction.

function setQuote(string memory newQuote) public {
        quote = newQuote;
        owner = msg.sender;
  }

Getter Function

Returns the current quote and the current owner of the quote.

function getQuote() view public returns(string memory currentQuote, address currentOwner) {
       currentQuote = quote;
       currentOwner = owner;
    }

Complete Code Snippet

pragma solidity >=0.5.0 <0.6.0;

contract Quote{

    string public quote;
    address public owner;

    function setQuote(string memory newQuote) public {
        quote = newQuote;
        owner = msg.sender;
    }
    
    function getQuote() view public returns(string memory currentQuote, address currentOwner) {
        currentQuote = quote;
        currentOwner = owner;
    }
}

This tutorial is deployed on Kovan TestNet at address 0xa67767B5ed6Fa6Fc19baBD4F18ffe72EAbC85FdA

🔰
➕
Remix
Remix