Lesson 4: Remix Fund Me project library PriceConverter.sol #507
-
included PriceConverter.sol file in FundME.sol file that is understood but what is the propose of why we choose unit256? Can anyone explain it in details? File link : https://github.com/PatrickAlphaC/fund-me-fcc/blob/main/FundMe.sol#L10 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@kloudplanet This is the pattern with the help of we can use Libraries in our contract, and why do we choose uint256? Is because we are using the Library's methods that are returning uint256, if the Library returns multiple types of values like string, array, uint256, etc. Then you will have to define this line for every type you want to use in your contract. Hope it clears your query. |
Beta Was this translation helpful? Give feedback.
-
@ali-thegilfoyle could you please provide the example if we return multiple types from library then how it looks like in smart contract? And thanks for your answer. understood. |
Beta Was this translation helpful? Give feedback.
@kloudplanet This is the pattern with the help of we can use Libraries in our contract, and why do we choose uint256? Is because we are using the Library's methods that are returning uint256, if the Library returns multiple types of values like string, array, uint256, etc. Then you will have to define this line for every type you want to use in your contract.
Hope it clears your query.