WTF-Solidity icon indicating copy to clipboard operation
WTF-Solidity copied to clipboard

46讲代理合约的汇编delegatecall函数

Open Jiangyj19 opened this issue 3 years ago • 0 comments

        // delegatecall操作码的参数:gas, 目标合约地址,input mem起始位置,input mem长度,output area mem起始位置,output area mem长度
        // output area起始位置和长度位置,所以设为0
        // delegatecall成功返回1,失败返回0
        let result := delegatecall(gas(), _implementation, 0, calldatasize(), 0, 0)

请教下这里output area mem是delegatecall的返回值么,如果是,可以直接把output area mem的长度设置为returndata的长度吗

Jiangyj19 avatar Nov 26 '22 18:11 Jiangyj19