WTF-Solidity icon indicating copy to clipboard operation
WTF-Solidity copied to clipboard

我最近在重新学solidity,巩固一下细节,也写一个“WTF Solidity极简入门”,供小白们使用,每周更新1-3讲。Now supports English! 官网: https://wtf.academy

Results 143 WTF-Solidity issues
Sort by recently updated
recently updated
newest added

理论上require的报错会将余下的gas返回给user,而assert会全部没收,而15_Error中实验结果,是assert比require更少的损耗,问题出在哪里

``` contract Sort { function sort(uint[] memory array) public pure returns(uint[] memory) { uint i = 1; while (i < array.length) { uint j = i; while (j > 0...

十分感谢分享!我是一名solidity的初学者,在学习第十三讲的时候有一点疑惑: ![QQ截图20220912174707](https://user-images.githubusercontent.com/85636904/189624042-39accf6d-93f6-4bfe-9f02-a11427acfe46.png) 在关于super关键字的描述中,教程中写到用super关键字只会调用最近父合约,但对于菱形继承问题,则有些偏差: 父合约有两个子合约,在调用子合约时会将全部的parent function 调用,而不是从右到左只调用一个。 [来自solidity-by-example的例子](https://solidity-by-example.org/super/) 复现代码如下: ```solidity // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /* Inheritance tree A / \ B C \ / D */ contract A {...

补充`bytes`和`bytes1[]`,某种情况下字节填充产生额外gas。

更新: 25课 create2生成合约时 合约构造函数存在输入时,在预测地址时的改变

添补了官方文档中`payable`修饰的地址两个成员