# @eztools-core/web3context

> Made with create-react-library

Latest version **1.0.0** (published 2023-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eztools-core/web3context
pnpm add @eztools-core/web3context
yarn add @eztools-core/web3context
bun add @eztools-core/web3context
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-02-25 |
| First published | 2022-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 74.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mysteriousacadia |
| Maintainers | acadia |

## Links

- npm: https://www.npmjs.com/package/@eztools-core/web3context
- Repository: https://github.com/mysteriousacadia/web3context
- Homepage: https://github.com/mysteriousacadia/web3context#readme
- Issues: https://github.com/mysteriousacadia/web3context/issues
- npm.io page: https://npm.io/package/@eztools-core/web3context

## Dependencies (2)

- [gulp](https://npm.io/package/gulp.md) ^4.0.2
- [ethers](https://npm.io/package/ethers.md) ^5.7.2

## Recent versions

- 1.0.0 (latest) — 2023-02-25
- 0.1.1 — 2022-11-09
- 0.1.0 — 2022-11-09

## README

# @eztools-core/web3context

A simple React context wrapper to access web3 functions and integrate smart contracts.

## Install

```bash
npm install --save @eztools-core/web3context
```

## Usage

Initialize the provider at the root of your project (App/index.tsx)

```tsx
import React, { Component } from 'react'
import { Web3Provider } from 'Web3Context'

const App = () => {
  return <Web3Provider>// App Code goes here</Web3Provider>
}
```

Use the context anywhere in your app

```tsx
import { useWeb3Context } from 'Web3Context'

const Component = () => {
  const { account, connectWallet, contractObjects } = useWeb3Context()
  return (
    <>
      <div>Connected Address: {account}</div>
      <br />
      <button onClick={connectWallet}>Connect Wallet</button>
    </>
  )
}
```

## License

MIT © [mysteriousacadia](https://github.com/mysteriousacadia)

---
_Source: https://npm.io/package/@eztools-core/web3context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
