-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: React Query #247
wip: React Query #247
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/zoo/wagmi/Fswi3uo1BUzuESUjzSSCCC8xqNJE |
* WIP * wippy wip * more writing * Add isIdle * Fix * Fix heading * Update * Add status * WIP: Start working on WagmiClient & actions * try zustand * wip * wagmi-core -> @wagmi/core * Cleanup * more love * clean * wip * wip * fix directory structure * fix ts issuez & directory structure * connect tests * moar tests * feat: fetchEnsName action * refactor: wagmi client types * refactor: wagmi client constructor * add fetchBalance action & refactor action types * Add fetchSigner * accounts/ > account/ * Add getContract * Add watchBalance * Add watchSigner * Add watchContractEvent * Add signMessage * Add writeContract * Add sendTransaction, waitForTransaction * feat: add fetchEnsAddress * feat: add watch hooks for ens * feat: add ens resolver actions * feat: add ens avatar actions * `@wagmi/core` & the platform-agnostic `WagmiClient` concept (#203) * WIP * wippy wip * more writing * Add isIdle * Fix * Fix heading * Update * Add status * WIP: Start working on WagmiClient & actions * try zustand * wip * wagmi-core -> @wagmi/core * Cleanup * more love * clean * wip * wip * fix directory structure * fix ts issuez & directory structure * connect tests * moar tests * feat: fetchEnsName action * refactor: wagmi client types * refactor: wagmi client constructor * add fetchBalance action & refactor action types * Add fetchSigner * accounts/ > account/ * Add getContract * Add watchBalance * Add watchSigner * Add watchContractEvent * Add signMessage * Add writeContract * Add sendTransaction, waitForTransaction * feat: add fetchEnsAddress * feat: add watch hooks for ens * feat: add ens resolver actions * feat: add ens avatar actions * Add fetchBlockNumber; watchBlockNumber * Add fetchFeeData; watchFeeData * add fetchToken * Add watchToken * Add readContract; watchReadContract * Update tests Co-authored-by: Tom Meagher <tom@meagher.co> * feat: add hardhat * refactor: remove remix * feat: upgrade to coinbase wallet sdk * refactor: ethers imports * wip: React Query (#247) * feat: rq * feat: connect caching * wip: account and connect * wip: ens lookup * Make local storage persistence actually work; added 'status' to client state in favour of 'connecting' * simple client cache? * Refactor * feat: update tests * useBlockNumber * Refactor * feat: client updates * chore: update snapshots * wip: useNetwork * wip: useBalance * wip: useSigner * feat: ens hooks * wip: useSendTransaction * wip: context refactor * fix exports * test: update useSendTransaction.test.ts * fix: merge conflict * feat: persist status * test: useConnect * refactor: watch equality * feat: update useAccount * test: useAccount * feat: useNetwork * wip: useContractRead * tests: skip stale tests * tests: add useContractRead & deserializeCache tests * refactor: const to function * test: useNetwork * wip: useSignMessage * wip: useContractWrite * tests: useContractWrite * wip: useContractEvent * wip: useToken * add a few more query options * tests: useToken * feat: add signTypedData * feat: dynamic imports * chore: bump packages * feat: useFeeData * test: update error throwing * refactor: serialize * fix: lint errors * chore: clean up * feat: watch providers * fix: build error * feat: make provider hooks reactive * test: updates * remove imperative getter fns * chore: update snaphosts * docs: get building * chore: bump nextra * docs: restructure Co-authored-by: Tom Meagher <tom@meagher.co> * Version packages * fix: cache connector chains * chore: update next example wagmi version * Version packages * fix: force address to be required * Version packages * fix: resolve issue where getProvider in connectors wasn't being awaited * Version packages * fix: fix useContractWrite mutation fn arguments * fix: remove storage persistence of connector, add chains to client state * Version packages * fix: don't persist account data when autoConnect is falsy * Version packages * feat: add connecting event to connectors * Version packages * remove code snippet from playground * Export useWaitForTransaction (#284) * chore: bump hardhat * test: ens avatar mocks * refactor: use message event instead of connecting as per EIP-1193 * Version packages * examples: update playground * Require hash or wait parameter, not both (#296) * chore: change babel target * wip: 0.3.0 docs (#278) * Add some docs * feat: add client docs * wip: migration guide * wip: more migration guide * docs: update getting started * docs: start connectors * docs: tweaks * test: ens avatar mocks * test: bump timeout * refactor: abis * docs: reorder * docs: coinbase wallet connector * docs: useBlockNumber * docs: finish connectors * docs: ens hooks * docs: token and fee data * docs: constants * docs: providers * test: update snapshots * docs: _app * docs: connect * chore: update readme * chore: reorg * docs: add fathom * refactor: rename useConnect connector to pendingConnector * docs: fix Coinbase Wallet SDK docs links (#285) * chore: move guides to examples * chore: clean up * docs: useContract * feat: useDisconnect * docs: amend useAccount migration notes * docs: useContractRead * docs: useContractWrite * docs: fix type error * docs: useContractEvent * docs: useSendTransaction * docs: useSigner * docs: useSignMessage * docs: useWaitForTransaction * docs: useDisconnect and useSignTypedData * docs: useNetwork * docs: tweaks * chore: readme * chore: updates examples * ci: bump actions checkout * docs: update examples * docs: siwe example Co-authored-by: Tom Meagher <tom@meagher.co> Co-authored-by: Mark Dalgleish <mark.john.dalgleish@gmail.com> * docs: update contributing * refactor: rpc urls and block explorers (#308) * refactor: default examples to alchemy * chore: version packages * chore: update lock file * docs: tweak header * fix: vite example build * refactor: remove ens from useAccount (#313) * docs: tweaks * docs: constants * docs: comparison table * add more example rpc url chains (#314) * feat: improve ethers provider generics (#315) * chore: version packages * chore: republish * chore: add lockfile * tmm/ci optimize (#316) * ci: caching * ci: add branches * test: update snapshots * docs: tweak * fix: update connectors on chain change * refactor: window ethereum types * chore: version packages * docs: tweaks * refactor: type tweaks * docs: injected options * docs: codeblock style tweaks * docs: copy tweaks * feat: pass custom chain id (#328) * feat: pass custom chain id * docs: add chainId * test: close open ws * chore: detect open handles * chore: revert detect open handles * chore: skip tests * feat: add warn for nonexistant contract functions * chore: update license from mit to wagmit * chore: version packages * chore: add keywords * test: useChainId (#330) * feat: keep previous data when watching * chore: version packages * feat(next): Update to React Query 4 (#331) * Update to React Query 4 * feat: add custom useQuery for tracked stuff Co-authored-by: awkweb <tom@meagher.co> * fix: fix useConnect test * fix: fix block number caching inconsistencies * fix: fix watchBlockNumber listener leak * chore: add missing dep * docs: add docs for cacheOnBlock for useContractRead * chore: Version packages * wip: loose ends (#342) * test: boost coverage * docs: clean up * test: finish query tests * test: boost useConnect * test: boost useDisconnect * test: boost useNetwork * test: boost useContractWrite and useContractEvent * chore: bump zustand * chore: publish * chore: add readmes for examples * test: bump timeout * chore: bump coinbase wallet * test: clean up actions * test: update account actions * test: update timeout * chore: update docs with updated useQuery API * docs: update contributing docs * test: bump timeout * chore: remove hardcoded hardhat config * feat: react 18 support * docs: add link to 0.2.x docs * test: bump timeout * chore: version packages * ci: add bundlewatch * chore: update react-query * chore: Version packages * docs: add logotype * docs: favicon * chore: update readme * docs: update * refactor: make block explorers and rpc urls consistent types * chore: version packages * fix: reconnecting * refactor: store key * chore: version packages * chore: exit pre mode * chore: removing polling interval from mock provider Co-authored-by: moxey.eth <jakemoxey@gmail.com> Co-authored-by: Przemysław Kołodziejczyk <eshlox@users.noreply.github.com> Co-authored-by: Mark Dalgleish <mark.john.dalgleish@gmail.com> Co-authored-by: ALBERT <albert@alchemy.com>
WagmiProvider
accounts/useAccount
@tmmaccounts/useBalance
@jxomaccounts/useConnect
@tmmaccounts/useNetwork
@tmmaccounts/useSigner
@jxomaccounts/useSignMessage
@tmmcontracts/useContractRead
@jxomcontracts/useContractWrite
@jxomcontracts/useToken
@jxomens/useEnsAddress
@tmmens/useEnsAvatar
@tmmens/useEnsName
@tmmens/useEnsResolver
@tmmnetwork-status/useBlockNumber
@jxomnetwork-status/useFeeData
@tmmtransactions/useTransaction
@jxomtransactions/useWaitForTransaction
@tmm