mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-24 04:38:29 +00:00
Automatically merged updates to draft EIP(s) 2535 (#2898)
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
This commit is contained in:
parent
500b7c7132
commit
b839584451
@ -42,14 +42,13 @@ fallback() external payable {
|
|||||||
require(facet != address(0), "Function does not exist.");
|
require(facet != address(0), "Function does not exist.");
|
||||||
// Execute external function from facet using delegatecall and return any value.
|
// Execute external function from facet using delegatecall and return any value.
|
||||||
assembly {
|
assembly {
|
||||||
let ptr := 0
|
calldatacopy(0, 0, calldatasize())
|
||||||
calldatacopy(ptr, 0, calldatasize())
|
let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
|
||||||
let result := delegatecall(gas(), facet, ptr, calldatasize(), 0, 0)
|
|
||||||
let size := returndatasize()
|
let size := returndatasize()
|
||||||
returndatacopy(ptr, 0, size)
|
returndatacopy(0, 0, size)
|
||||||
switch result
|
switch result
|
||||||
case 0 {revert(ptr, size)}
|
case 0 {revert(0, size)}
|
||||||
default {return (ptr, size)}
|
default {return (0, size)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user