Common Utilities
Common utilities are helpers used throughout the different libraries. They are divided into Constants, Content, Types and Utils.
Constants
Constants are the variables that never change. They include chainData
, contracts
, endpoints
, posterTags
and proposals
.
Content
Content includes the information contained in the app's form
and the tooltip info
.
Types
Common types are used across all apps. They include contract
, general
, keychains
, legoTypes
and react
.
Utils
Utilities are functions you can pull into your app to accomplish all kinds of common actions, such as:
dates
allow you to format dates and periodsencoding
helps encode values and functions and get a nonceexplorer
allows you to generate links to block explorersformatting
help you trunctate addresses, set character limits, handle plural nouns, and convert from Weigeneral
allows you to calculate voting power percentage and convert to now in secondsgnosis
helps you generate a link to a Gnosis safeobject
allows you to omit an object and fieldstime
helps you with a conversion object and functions to convert to seconds and format periodstypeguards
allows you to validate types with functionsunits
helps you with functions, types, interfaces and contstantsvalidation
allows you to validate fields and error messages