Utils

There are 5 utility functions in total that each perform essential tasks.

  • getRpcUrls - returns a KV object with chainIds' keyed to HTTP transport URLs.

  • checkBlock3d - a util function that wraps the rest of them so that the useBlock3r hook only needs to make a single function call. Output is identical to useBlock3r.

  • checkIsRoutePublic - returns true if the current page is marked public in the block3d.config.

  • checkSimpleRules - returns two Rule arrays, simplePassing for the rules the user meets the criteria for, and simpleFailing for the rules the user doesn't meet the criteria for.

  • checkTokenRules - returns two Rule arrays, tokenPassing for rules the user meets the criteria for, and tokenFailing for rules the user doesn't meet the criteria for.

  • checkNftRules - returns two Rule arrays, nftPassing for rules the user meets the criteria for, and nftFailing for rules the user doesn't meet the criteria for.

Last updated