current position:Home>The difference between memory and storage temporary variables set in solidity

The difference between memory and storage temporary variables set in solidity

2022-02-03 23:23:12 Q & A of Denglian community

function totalSupply(uint256 _pid) public view returns (uint256) {        PoolInfo storage pool = poolInfo[_pid];        return pool.lpToken.balanceOf(address(this));    }

In this function storage Change to memory after , What's the difference between them ?






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032323106353.html

Random recommended