Function doesnât work with uint.
I am refering to the upgradeable contract code used in the simple first example of the course.
The first function below is the setter function in the proxy contract of Filipâs. He uses uint256. The second function is my function which is identical except that I use uint. My function doesnât work, which confuses me because I am under the impression that uint is synonymous for uint256. So why doesnât my function work? I have a feeling it has something to do with the function string that gets hashed. Any help would be very welcome.
function setNumberOfDogs(uint256 _number) public returns (bool, bytes memory){
(bool res, bytes memory data) = currentAddress.delegatecall(abi.encodePacked(bytes4(keccak256("setNumberOfDogs(uint256)")), _number));
return (res, data);
}
function setTheNumber(uint _number) public returns(bool, bytes memory) {
(bool res, bytes memory data) = currentAddress.delegatecall(abi.encodePacked(bytes4(keccak256("setTheNumber(uint)")), _number));
return (res, data);
}