0.0.5 • Published 1 year ago

turf-use-proxybot v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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>
}
0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago