1.8.2 • Published 6 months ago

@incirlabs/react-ethooks v1.8.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

ETHooks

React hooks for the ethers library.

This library is created and designed to use it internally in incirlabs projects.

Documentation

For more information and usage examples, please visit at https://incirlabs.github.io/react-ethooks/.

Installation

Install using your favorite package manager.

yarn:

yarn add @incirlabs/react-ethooks

npm:

npm add @incirlabs/react-ethooks

Hooks

HookDescription
useAccountGet address (or more in future) of the connected account
useAccountChangeListen for connected account change event
useBalanceReturns the balance of the currently connected or the given address
useConnectConnect to metamask or other wallets
useContractCreate new contract reference with provided address and ABI
useContractEventListen for contract events
useContractReadRun read-only functions and get result
useContractWriteSend state changing transactions to the contract and listen for events
useEnsAddressReturns the address of the given ENS name
useEnsNameReturns the ENS name of the given address
useEnsResolverReturns an EnsResolver instance
useEnsTextReturns the stored EIP-634 text entry for the given key
useERC20Helpers to get started working with erc-20 tokens
useERC20BalanceReturns the balance of the currently connected or the given address for erc-20 tokens
useNetworkReturns the current network
useSignerGet connected signer (or more in future)
useProviderGet the provider passed to the EthooksProvider component

Scripts

ScriptDescription
buildCombination of clean-build and rollup-build
watchSame as rollup-build but in watch mode
rollup-buildBuilds cjs and esm from typescript for production
clean-buildCleans build folder
formatFormat ts and tsx with prettier
format:checkSame as format but doesn't change files, just checks
lintLint ts and tsx with eslint
lint:checkSame as lint but doesn't change files, just checks
1.8.2

6 months ago

1.8.1

10 months ago

1.8.0

10 months ago

1.7.0

10 months ago

1.6.1

11 months ago

1.6.0

2 years ago

1.5.1

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago