Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jhsu/turf-use-proxybot


https://github.com/jhsu/turf-use-proxybot

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

        

# Turf Proxybot React hook

Use the amazing [ProxyBot](https://proxybot.turf.dev/) 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.

```tsx
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

Vault address if present: {vaultAddress}

}
```