Skip to content

How to determine type when using a library. #163

Discussion options

You must be logged in to vote

@Olaleye-Blessing

If you have all functions inside the library that return the same data type, then in the parent contract you will only use

using LibraryName for data_type;

But if you have multiple functions with the different return types, then you use them separately for each data type you want in the parent contract. like this

using LibraryName for uint256; //example
using LibraryName for string; // example

hope it clears you answer.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatrickAlphaC
Comment options

Answer selected by alymurtazamemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants