1

I have a contract which inherits from some other contract and uses some library.

I tried the following ways for declaring it, none of which works:

contract B is A  using Lib
contract B is A, using Lib
contract B is A; using Lib
contract B using Lib  is A
contract B using Lib, is A
contract B using Lib; is A

UPDATE:

I found this answer here:

contract B is A {
    using Lib for *;
    ...
}

But it doesn't quite achieve what I was hoping to, since I still need to prepend Lib. on every call to a function of Lib.

Thank you!

  • You shouldn't need to prepend Lib. if you've done using Lib for *. Can you show us the code for Lib and B? – smarx Jan 1 '18 at 12:40
  • Please add the solution as an answer so it can be marked as resolved. Thanks! – Ismael Jan 3 '18 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.