Giter Club home page Giter Club logo

wtf-solidity-internals's Introduction

WTF Solidity Internals

《WTF Solidity内部标准》教程将介绍Solidity智能合约中的存储布局,内存布局,以及ABI编码规则,帮助大家理解Solidity的内部规则。

先修课程:

  1. WTF Solidity

教程

第01讲:基础存储布局Code | 文章

第02讲:映射和动态数组的存储布局Code | 文章

第03讲:字节数组和字符串的存储布局Code | 文章

第04讲:内存布局Code | 文章

第05讲:ABI编码基础Code | 文章

第06讲:动态类型的ABI编码Code | 文章

第07讲:ABI编码公式Code | 文章

第08讲:calldata和returndata的ABI编码Code | 文章

运行

配置环境

要使用此模板,你需要安装以下内容。请按照链接和指示操作。

  • Git
    • 如果你可以运行git --version,则说明你已正确安装。
  • Foundry / Foundryup
    • 这将会安装forgecastanvil
    • 通过运行forge --version并获取类似forge 0.2.0 (92f8951 2022-08-06T00:09:32.96582Z)的输出,你可以检测是否已正确安装。
    • 要获取每个工具的最新版本,只需运行foundryup

快速开始

  1. 克隆本仓库

运行:

git clone https://github.com/WTFAcademy/WTF-Solidity-Internals
cd WTF-Huff
  1. 安装依赖

克隆并进入你的仓库后,你需要安装必要的依赖项。为此,只需运行:

forge install
  1. 打印合约存储布局

要打印合约存储布局,你可以运行:

forge inspect ValueStorage3 storage-layout --pretty

有关如何使用Foundry的更多信息,请查看Foundry Github Repositoryfoundry-huff library repository

参考

wtf-solidity-internals's People

Contributors

amazingang avatar isol4te avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.