Skip to content

Commit

Permalink
Automatically merged updates to draft EIP(s) 2535 (ethereum#2898)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mudgen authored and tkstanczak committed Nov 7, 2020
1 parent 4604a9a commit 19042e8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions EIPS/eip-2535.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ fallback() external payable {
address facet = selectorTofacet[msg.sig];
require(facet != address(0), "Function does not exist.");
// Execute external function from facet using delegatecall and return any value.
assembly {
let ptr := 0
calldatacopy(ptr, 0, calldatasize())
let result := delegatecall(gas(), facet, ptr, calldatasize(), 0, 0)
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
let size := returndatasize()
returndatacopy(ptr, 0, size)
returndatacopy(0, 0, size)
switch result
case 0 {revert(ptr, size)}
default {return (ptr, size)}
case 0 {revert(0, size)}
default {return (0, size)}
}
}
```
Expand Down

0 comments on commit 19042e8

Please sign in to comment.