Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhsu/turf-use-proxybot
https://github.com/jhsu/turf-use-proxybot
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jhsu/turf-use-proxybot
- Owner: jhsu
- Created: 2023-03-17T01:52:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T15:38:46.000Z (almost 2 years ago)
- Last Synced: 2024-10-22T05:13:04.323Z (2 months ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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}
}
```