@msgboard/hardhat
v0.0.32
Published
Hardhat plugin for MsgBoard
Readme
@pulsechain/hardhat-msgboard
Test your msgboard interfaces
Hardhat plugin example.
MsgBoard
MsgBoard allows for decentralized, public communication. Each msgboard instance may behave slightly differently quirks, but so long as the basic interface holds true, it can reliably push the ability to run software closer to the individual. One needs to tightly control which process is utilizing msgboard because it will block as it works through and eventually finds a valid hash.
Installation
After installing nodejs (+23.6.1 with asdf recommended)
npm install @pulsechain/hardhat-msgboardImport the plugin in your hardhat.config.js:
require("@pulsechain/hardhat-msgboard");Or if you are using TypeScript, in your hardhat.config.ts:
import "@pulsechain/hardhat-msgboard";Tasks
msgboard:status
msgboard:work
msgboard:send
msgboard:work:send
> hardhat msgboard:statusEnvironment extensions
<A description of each extension to the Hardhat Runtime Environment>
This plugin extends the Hardhat Runtime Environment by adding an example field
whose type is ExampleHardhatRuntimeEnvironmentField.
Configuration
<A description of each extension to the HardhatConfig or to its fields>
This plugin extends the HardhatUserConfig's MsgBoardUserConfig object with an optional msgboard field that is only applicable to the hardhat network.
This is an example of how to set it:
module.exports = {
msgboard: {
// only applicable to hardhat network
enabled: true,
workMultiplier: 1_000_000n,
workDivisor: 10_000n,
messageSizeLimit: 8n * 1024n,
boardCountLimit: 10_000n,
blockRangeLimit: 120n,
},
};Usage
send messages to the msgboard and read from it
const msg = await hre.msgboard.doWork('0xcategory...', '0xdata...')