Skip to content

Commit

Permalink
chore: add description for eip-6049
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonstudio committed Feb 3, 2023
1 parent 9287bfb commit 25496ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 26_DeleteContract/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tags:

## `selfdestruct`

`selfdestruct`命令可以用来删除智能合约,并将该合约剩余`ETH`转到指定地址。`selfdestruct`是为了应对合约出错的极端情况而设计的。它最早被命名为`suicide`(自杀),但是这个词太敏感。为了保护抑郁的程序员,改名为`selfdestruct`
`selfdestruct`命令可以用来删除智能合约,并将该合约剩余`ETH`转到指定地址。`selfdestruct`是为了应对合约出错的极端情况而设计的。它最早被命名为`suicide`(自杀),但是这个词太敏感。为了保护抑郁的程序员,改名为`selfdestruct`;在 [v0.8.18](https://blog.soliditylang.org/2023/02/01/solidity-0.8.18-release-announcement/) 版本中,`selfdestruct` 关键字被标记为「不再建议使用」,在一些情况下它会导致预期之外的合约语义,但由于目前还没有代替方案,目前只是对开发者做了编译阶段的警告,相关内容可以查看 [EIP-6049](https://eips.ethereum.org/EIPS/eip-6049)

### 如何使用`selfdestruct`
`selfdestruct`使用起来非常简单:
Expand Down

0 comments on commit 25496ab

Please sign in to comment.