I was trying to check something I saw in the tutorial on the simpler example. In the tutorial it was:
using My_PriceConverter for uint256;
I tried to check it using simple contract and library
MyContract:
import "./MyLibrary.sol";
contract MyContract {
using MyLibrary for uint256;
uint256 public myUint;
function setMyUint(uint256 _myUint) public {
myUint = _myUint.getNumber();
}
}
MyLibrary:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
library MyLibrary {
function getNumber() public pure returns (uint256) {
return 123;
}
}
I don't know why it's possible to use My_PriceConverter but I get error like that