Skip to content

Commit

Permalink
fix(p2p/proxy_workshop): fix readme markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Leclerc committed Sep 2, 2024
1 parent 58f288b commit 8d89e02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/6.Create_a_proxy/help/fallback.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Help to create the fallback function for the proxy
# Help to create the fallback function for the proxy

The fallback function is a function that is called when a contract is called with a method that is not implemented. This function is called with the method name and the arguments that were passed to the proxy.

Expand All @@ -21,7 +21,7 @@ fallback() external payable {
}
```

### Let's break down the fallback function line by line:
## Let's break down the fallback function line by line:

1. `(bool success, bytes memory returnData) = implemn.delegatecall(msg.data);`
- This line calls the `delegatecall` function on the implementation contract with the `msg.data` that was sent to the proxy. The `delegatecall` function executes the code of the implementation contract in the context of the proxy contract. The `success` variable will be `true` if the `delegatecall` was successful, and the `returnData` variable will contain the return data from the `delegatecall`.
Expand Down

0 comments on commit 8d89e02

Please sign in to comment.