0.0.5 • Published 1 year ago
turf-use-proxybot v0.0.5
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>
}