Skip to content

ArkEcosystem/mainsail-tx-tester

Mainsail Tx Tester

Logo

Prerequisits

Ensure that you have a working python binary in your PATH as this script compiles native crypto bindings (specifically https://github.com/ChainSafe/blst-ts will cause you issues). If you notice that you run into an error while installing the dependencies and one of the lines in the stack trace includes /bin/sh: python: command not found, this is your issue. A known scenario where this happens is on later macOS versions where only a python3 binary is present.

To resolve it, make sure python is available on your system. One way to easily manage this is by using a Python version manager such as pyenv.

Also ensure that you are on Node v21 or the import ... with construction will not work.

Yarn

Installation

yarn
yarn build

Usage

Show help:

yarn start

Send TX:

yarn start <TX number>

Generate wallets Mnemonic, Address and Public Key:

yarn wallet
yarn wallet "custom mnemonic"

Generate validator Private- and Public Key:

yarn validator
yarn validator "custom mnemonic"

PNPM

Installation

pnpm i
pnpm run build

Usage

Show help:

pnpm run start

Send TX:

pnpm run start <TX number>

Generate wallets Mnemonic, Address and Public Key:

pnpm run wallet
pnpm run wallet "custom mnemonic"

Generate validator Private- and Public Key:

pnpm run validator
pnpm run validator "custom mnemonic"

Configuration

Look into /config/config.js file.

Provide correct peer data that have enabled Public API and Transaction Pool API.

Default configuration is using testnet from Mainsail Network Config. Use correct plugins and crypto that is used in the app.json and crypto.json on the target network.

Adjust senderPassphrase and transaction data (recipientId, fee, amount) before sending TX.

Note

TX Sender is using the Public API to obtain the wallet nonce and Transaction Pool API to send the transaction. Make sure that target node have both APIs enabled.

Check transactions

curl --location --request GET 'http://127.0.0.1:4003/api/transactions?senderId=DCzk4aCBCeHTDUZ3RnkiK8aqpYYZ9iC51W'

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published