turf-use-proxybot
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Turf Proxybot React hook

Use the amazing ProxyBot to delegate access to a vault.

useProxy(address, signer)

Use this hook to get the associated valut of the address. Wrap with Suspense to show a fallback while loading.

import ethers from 'ethers'
import { useProxy } from 'turf-use-proxybot'

const Vault = () => {
  const provider = ethers.getDefaultProvider()

  // Provide a signer/provider to call the contract
  const vaultAddress = useProxy(
    '0x9236e0ad628f4ee207ce050b44986af1ce19697f',
    provider
  )

  return <div>Vault address if present: {vaultAddress}</div>
}

Readme

Keywords

Package Sidebar

Install

npm i turf-use-proxybot

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

5.16 kB

Total Files

6

Last publish

Collaborators

  • jhsu