https://github.com/tablelandnetwork/hardhat-tableland
Tableland plugin for Hardhat
https://github.com/tablelandnetwork/hardhat-tableland
Last synced: 11 months ago
JSON representation
Tableland plugin for Hardhat
- Host: GitHub
- URL: https://github.com/tablelandnetwork/hardhat-tableland
- Owner: tablelandnetwork
- License: mit
- Created: 2022-12-19T15:53:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T18:14:51.000Z (about 2 years ago)
- Last Synced: 2025-07-09T17:36:10.443Z (12 months ago)
- Language: TypeScript
- Size: 579 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @tableland/hardhat
[Tableland](https://tableland.xyz) support for Hardhat projects.
## What
This plugin makes it easy to run and interact with a local Tableland node for development and testing purposes. Upcoming versions will expand functionality to include support for Tableland table creation and management, plus more.
## Installation
```bash
npm install @tableland/hardhat --save-dev
```
Import the plugin in your `hardhat.config.js`:
```js
require("@tableland/hardhat");
```
Or if you are using TypeScript, in your `hardhat.config.ts`:
```ts
import "@tableland/hardhat";
```
## Configuration
This plugin extends the `HardhatUserConfig` object with an optional
`localTableland` field of type `Config`, which allows you to configure how local Tableland will run.
This is an example of how to set it:
```ts
const config: HardhatUserConfig = {
...
localTableland: {
silent: false,
verbose: false,
},
...
};
export default config;
```
## Tasks
This plugin creates no additional tasks, but does add a new network called `local-tablaland` that can be passed to any task that supports the `--network` flag. For example:
```
npx hardhat test --network local-tableland
```
and:
```
npx hardhat run scripts/deploy.ts --network local-tableland
```
and:
```
npx hardhat node --network local-tableland
```
## Environment extensions
This plugin extends the Hardhat Runtime Environment by adding a `localTableland` field whose type is:
```
{
start: (config?: Config) => Promise;
stop: () => Promise;
}
```
These functions allow you to progamatically interact with local Tableland, in a Hardhat script, for example.
## Usage
There are no additional steps you need to take for this plugin to work. Simply use the `local-tableland` network when running Hardhat tasks or interact with the Hardhat Runtime Environment's `localTableland` API programmatically.
**Important note:** The `@nomicfoundation/hardhat-network-helpers` package provides a useful function `loadFixture` that will reset the state of the Hardhat network to a snapshot that your fixture captured. Unfortunately, Local Tablelend can't yet deal with this type of state reset, so avoid using `loadFixture` when using Local Tableland.