<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Foundry on Wong&#39;s Blog</title>
    <link>https://blog.wssh.dev/tags/foundry/</link>
    <description>Recent content in Foundry on Wong&#39;s Blog</description>
    <generator>Hugo -- 0.146.6</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 26 Aug 2024 02:37:27 +0000</lastBuildDate>
    <atom:link href="https://blog.wssh.dev/tags/foundry/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Solidity Gas 优化清单及其原理：存储、内存与操作符</title>
      <link>https://blog.wssh.dev/posts/gas-optimize-part1/</link>
      <pubDate>Mon, 26 Aug 2024 02:37:27 +0000</pubDate>
      <guid>https://blog.wssh.dev/posts/gas-optimize-part1/</guid>
      <description>&lt;h2 id=&#34;概述&#34;&gt;概述&lt;/h2&gt;
&lt;p&gt;最近发现了一个 &lt;a href=&#34;https://snappify.com/view/f9a681c7-834c-467e-b34d-5ad443a893f2&#34;&gt;非常有意思的 PPT&lt;/a&gt; 介绍了大量的 gas 优化技巧，本文为此 PPT 的文字版本，但与 PPT 不同的是，本文会会介绍合约内函数 gas 的计算并尽可能介绍每种优化方案的原理。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Huff实战:编写测试极致效率数学模块</title>
      <link>https://blog.wssh.dev/posts/huff-math/</link>
      <pubDate>Wed, 15 Mar 2023 11:02:00 +0000</pubDate>
      <guid>https://blog.wssh.dev/posts/huff-math/</guid>
      <description>&lt;h2 id=&#34;概述&#34;&gt;概述&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Huff&lt;/code&gt; 是 EVM 专用语言，与 Solidity 不同，Huff 是面向底层的语言，可以类比与汇编语言。这意味着开发者可以直接操作栈、内存和存储等内容，但另一方面，这些底层操作往往没有安全保证，这需要开发者更加仔细的审计和测试代码。本文章由于涉及大量 EVM 底层操作，希望读者阅读过以下文章:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foundry 高级测试: Fuzz、Invariant与形式化证明</title>
      <link>https://blog.wssh.dev/posts/foundry-test/</link>
      <pubDate>Tue, 14 Mar 2023 23:47:33 +0000</pubDate>
      <guid>https://blog.wssh.dev/posts/foundry-test/</guid>
      <description>&lt;h2 id=&#34;概述&#34;&gt;概述&lt;/h2&gt;
&lt;p&gt;本文以较为简单的 &lt;code&gt;WETH&lt;/code&gt; 合约为例，介绍在 &lt;code&gt;Foundry&lt;/code&gt; 架构中常用的几种较为高级的测试方法，如下:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fuzz Testing 基于属性的单元测试的升级版&lt;/li&gt;
&lt;li&gt;Invariant Testing 基于随机数据整体调用的测试&lt;/li&gt;
&lt;li&gt;Formal Verification 形式化证明&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;本文也会给出上述测试手段的 &lt;code&gt;github ci&lt;/code&gt; 配置文件。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foundry教程：编写测试部署ERC-20代币智能合约</title>
      <link>https://blog.wssh.dev/posts/foundry-with-erc20/</link>
      <pubDate>Thu, 14 Jul 2022 21:37:27 +0000</pubDate>
      <guid>https://blog.wssh.dev/posts/foundry-with-erc20/</guid>
      <description>&lt;h2 id=&#34;概述&#34;&gt;概述&lt;/h2&gt;
&lt;p&gt;本博客的内容主要分为以下四部分：&lt;/p&gt;
&lt;p&gt;一是Foundry的介绍与安装，主要介绍为什么选择Foundry进行智能合约开发和安装过程中的各种官方文档中未提及的问题；&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
