From 6b53155bccafe38863706ecf52fedde902385007 Mon Sep 17 00:00:00 2001 From: Nick Mudge Date: Mon, 14 Sep 2020 10:34:58 -0400 Subject: [PATCH] Automatically merged updates to draft EIP(s) 2535 (#2979) Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing --- EIPS/eip-2535.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-2535.md b/EIPS/eip-2535.md index a97354e4..cfcb5a8d 100644 --- a/EIPS/eip-2535.md +++ b/EIPS/eip-2535.md @@ -313,12 +313,12 @@ The `diamondCut` function does nothing if a supplied function selector is alread After adding/replacing/removing functions the `_calldata` argument is executed with `delegatecall` on `_init`. This execution is done to initialize data or setup or remove anything needed or no longer needed after adding, replacing and/or removing functions. -If the `_init` value is `address(0)` then `_calldata` is executed with `delegatecall` on the diamond itself. +If the `_init` value is `address(0)` then `_calldata` must contain 0 bytes or the transaction reverts. + +If the `_init` value is not `address(0)` then `_calldata` must contain more than 0 bytes or the transaction reverts. If `_init` is `address(0)` and `_calldata` contains 0 bytes then `_calldata` execution is skipped. `_calldata` is not executed and the `diamondCut` call can complete successfully. -If `_init` is not `address(0)` and `_calldata` contains 0 bytes then it is an error and `diamondCut` reverts. - #### DiamondCut Event The `_diamondCut`, `_init`, and `_calldata` arguments are passed directly to the `DiamondCut` event.