Browse Source

Add warning on `SELFDESTRUCT` usage with `isContract` (#3875)

Co-authored-by: Francisco <fg@frang.io>
Pascal Marco Caversaccio 2 năm trước cách đây
mục cha
commit
a4596cab05
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      contracts/utils/Address.sol

+ 4 - 0
contracts/utils/Address.sol

@@ -22,6 +22,10 @@ library Address {
      *  - a contract in construction
      *  - a contract in construction
      *  - an address where a contract will be created
      *  - an address where a contract will be created
      *  - an address where a contract lived, but was destroyed
      *  - an address where a contract lived, but was destroyed
+     *
+     * Furthermore, `isContract` will also return true if the target contract within
+     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
+     * which only has an effect at the end of a transaction.
      * ====
      * ====
      *
      *
      * [IMPORTANT]
      * [IMPORTANT]