三十二. 委托调用delegatecall
三十二. 委托调用delegatecall
1.delegatecall作用:
delegatecall在B合约调用A合约的函数,A合约的函数逻辑产生结果,赋值到B合约状态变量上
2.delegatecall使用案例:
pragma solidity ^0.8.7;contract A{uint256 public num;uint256 public str;address public adr;functionsetInfo(uint256 _num)public payable{