Chih-Cheng Liang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # EVM code example ```solidity= // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract Demo1 { uint private balance; function add(uint value) public returns (uint256) { balance = balance + value; return balance; } } ``` ``` { "generatedSources": [], "linkReferences": {}, "object": "608060405234801561001057600080fd5b5060e28061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80631003e2d214602d575b600080fd5b603c60383660046069565b6050565b604051604791906080565b60405180910390f35b600081600054605e91906089565b600081905592915050565b6000602082840312156079578081fd5b5035919050565b90815260200190565b6000821982111560a757634e487b7160e01b81526011600452602481fd5b50019056fea2646970667358221220f33a109c5249dc061f8f856a674692a7599391c22990b0279680938ba10e3dbf64736f6c63430008010033", "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xE2 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1003E2D2 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3C PUSH1 0x38 CALLDATASIZE PUSH1 0x4 PUSH1 0x69 JUMP JUMPDEST PUSH1 0x50 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x47 SWAP2 SWAP1 PUSH1 0x80 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 SLOAD PUSH1 0x5E SWAP2 SWAP1 PUSH1 0x89 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 SSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0x79 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 NOT DUP3 GT ISZERO PUSH1 0xA7 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 DUP2 REVERT JUMPDEST POP ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 RETURN GASPRICE LT SWAP13 MSTORE 0x49 0xDC MOD 0x1F DUP16 DUP6 PUSH11 0x674692A7599391C22990B0 0x27 SWAP7 DUP1 SWAP4 DUP12 LOG1 0xE RETURNDATASIZE 0xBF PUSH5 0x736F6C6343 STOP ADDMOD ADD STOP CALLER ", "sourceMap": "71:164:0:-:0;;;;;;;;;;;;;;;;;;;" } ``` ```= .code PUSH 80 contract Demo1 {\n uint priva... PUSH 40 contract Demo1 {\n uint priva... MSTORE contract Demo1 {\n uint priva... CALLVALUE contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... ISZERO contract Demo1 {\n uint priva... PUSH [tag] 1 contract Demo1 {\n uint priva... JUMPI contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... REVERT contract Demo1 {\n uint priva... tag 1 contract Demo1 {\n uint priva... JUMPDEST contract Demo1 {\n uint priva... POP contract Demo1 {\n uint priva... PUSH #[$] 0000000000000000000000000000000000000000000000000000000000000000 contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... PUSH [$] 0000000000000000000000000000000000000000000000000000000000000000 contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... CODECOPY contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... RETURN contract Demo1 {\n uint priva... .data 0: .code PUSH 80 contract Demo1 {\n uint priva... PUSH 40 contract Demo1 {\n uint priva... MSTORE contract Demo1 {\n uint priva... CALLVALUE contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... ISZERO contract Demo1 {\n uint priva... PUSH [tag] 1 contract Demo1 {\n uint priva... JUMPI contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... REVERT contract Demo1 {\n uint priva... tag 1 contract Demo1 {\n uint priva... JUMPDEST contract Demo1 {\n uint priva... POP contract Demo1 {\n uint priva... PUSH 4 contract Demo1 {\n uint priva... CALLDATASIZE contract Demo1 {\n uint priva... LT contract Demo1 {\n uint priva... PUSH [tag] 2 contract Demo1 {\n uint priva... JUMPI contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... CALLDATALOAD contract Demo1 {\n uint priva... PUSH E0 contract Demo1 {\n uint priva... SHR contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... PUSH 1003E2D2 contract Demo1 {\n uint priva... EQ contract Demo1 {\n uint priva... PUSH [tag] 3 contract Demo1 {\n uint priva... JUMPI contract Demo1 {\n uint priva... tag 2 contract Demo1 {\n uint priva... JUMPDEST contract Demo1 {\n uint priva... PUSH 0 contract Demo1 {\n uint priva... DUP1 contract Demo1 {\n uint priva... REVERT contract Demo1 {\n uint priva... tag 3 function add(uint value) publi... JUMPDEST function add(uint value) publi... PUSH [tag] 4 function add(uint value) publi... PUSH [tag] 5 function add(uint value) publi... CALLDATASIZE function add(uint value) publi... PUSH 4 function add(uint value) publi... PUSH [tag] 6 function add(uint value) publi... JUMP [in] function add(uint value) publi... tag 5 function add(uint value) publi... JUMPDEST function add(uint value) publi... PUSH [tag] 7 function add(uint value) publi... JUMP [in] function add(uint value) publi... tag 4 function add(uint value) publi... JUMPDEST function add(uint value) publi... PUSH 40 function add(uint value) publi... MLOAD function add(uint value) publi... PUSH [tag] 8 function add(uint value) publi... SWAP2 function add(uint value) publi... SWAP1 function add(uint value) publi... PUSH [tag] 9 function add(uint value) publi... JUMP [in] function add(uint value) publi... tag 8 function add(uint value) publi... JUMPDEST function add(uint value) publi... PUSH 40 function add(uint value) publi... MLOAD function add(uint value) publi... DUP1 function add(uint value) publi... SWAP2 function add(uint value) publi... SUB function add(uint value) publi... SWAP1 function add(uint value) publi... RETURN function add(uint value) publi... tag 7 function add(uint value) publi... JUMPDEST function add(uint value) publi... PUSH 0 uint256 DUP2 value PUSH 0 balance SLOAD balance PUSH [tag] 11 balance + value SWAP2 balance + value SWAP1 balance + value PUSH [tag] 12 balance + value JUMP [in] balance + value tag 11 balance + value JUMPDEST balance + value PUSH 0 balance DUP2 balance = balance + value SWAP1 balance = balance + value SSTORE balance = balance + value SWAP3 balance = balance + value SWAP2 function add(uint value) publi... POP POP JUMP [out] function add(uint value) publi... tag 6 e-Identifier: GPL-3.0\n\npragm... JUMPDEST e-Identifier: GPL-3.0\n\npragm... PUSH 0 e-Identifier: GPL-3.0\n\npragm... PUSH 20 ad DUP3 \n functi DUP5 lance;\n SUB e balance;\n \n functio SLT ivate balance;\n \n function... ISZERO p PUSH [tag] 15 p JUMPI p DUP1 c retu DUP2 e) pub REVERT nt value) public retur tag 15 p JUMPDEST p POP CALLDATALOAD balance = balance + v SWAP2 balance = balance + v SWAP1 1 {\n uint private balance;\n... POP JUMP [out] 1 {\n uint private balance;\n... tag 9 return balance;\n }\n} JUMPDEST return balance;\n }\n} SWAP1 DUP2 MSTORE PUSH 20 ADD SWAP1 JUMP [out] tag 12 JUMPDEST PUSH 0 DUP3 NOT DUP3 GT ISZERO PUSH [tag] 18 JUMPI PUSH 4E487B71 PUSH E0 SHL DUP2 MSTORE PUSH 11 PUSH 4 MSTORE PUSH 24 DUP2 REVERT tag 18 JUMPDEST POP ADD SWAP1 JUMP [out] .data ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully