New answers tagged


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: using A for B only affects the contract it is mentioned in. Previously, the effect was inherited. Now, you have to repeat the using statement in all derived contracts that make use of the feature.


Just compile the code and deploy contract B, no need to do the link thing. The library code will copy to contract B automatically by the compiler.


My advanced math library PRBMath offers sqrt, among many other functions. I'm gonna paste my implementation here, for posterity, but check out the linked repo for the most up-to-date code. /// @notice Calculates the square root of x, rounding down. /// @dev Uses the Babylonian method

Top 50 recent answers are included