From a4596cab053d46e0bf2957e2ed490cb3921539ee Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Fri, 30 Dec 2022 23:00:53 +0100 Subject: [PATCH] Add warning on `SELFDESTRUCT` usage with `isContract` (#3875) Co-authored-by: Francisco --- contracts/utils/Address.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/utils/Address.sol b/contracts/utils/Address.sol index 70d03e3d2..433a866d7 100644 --- a/contracts/utils/Address.sol +++ b/contracts/utils/Address.sol @@ -22,6 +22,10 @@ library Address { * - a contract in construction * - an address where a contract will be created * - 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]