Skip to content

Commit

Permalink
Update ProxyContract.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
AmazingAng committed Aug 17, 2022
1 parent 2fb5291 commit 4264f22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 46_ProxyContract/ProxyContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ contract Proxy {
// 读取位置为0的storage,也就是implementation地址。
let _implementation := sload(0)

calldatacopy(0, 0, calldatasize())

// 利用delegatecall调用implementation合约
// delegatecall操作码的参数分别为:gas, 目标合约地址,input mem起始位置,input mem长度,output area mem起始位置,output area mem长度
// output area起始位置和长度位置,所以设为0
Expand Down

0 comments on commit 4264f22

Please sign in to comment.