New answers tagged

3

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.


0

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.


0

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 https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#...


Top 50 recent answers are included