When a base class uses a library, do derived classes also use the same library?
For example:
contract A {
using SafeMath for uint256;
...
}
contract B is A {
//is code here using SafeMath for uint256?
}
inheritancelibrary
When a base class uses a library, do derived classes also use the same library?
For example:
contract A {
using SafeMath for uint256;
...
}
contract B is A {
//is code here using SafeMath for uint256?
}
Best Answer
No.
In Solidity 0.7.0 and later versions, the effect of
using ... for
is no longer inherited.Quoting from the 0.7.0 changelog: