npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gluwa/transaction-retry-tool

v0.0.1

Published

Tool to retry transactions on a blockchain

Downloads

4

Readme

license npm version

@gluwa/transaction-retry-tool


     _                                  _   _                            _                     _              _ 
    | |                                | | (_)                          | |                   | |            | |
    | |_ _ __ __ _ _ __  ___  __ _  ___| |_ _  ___  _ __ ______ _ __ ___| |_ _ __ _   _ ______| |_ ___   ___ | |
    | __| '__/ _' | '_ \/ __|/ _' |/ __| __| |/ _ \| '_ \______| '__/ _ \ __| '__| | | |______| __/ _ \ / _ \| |
    | |_| | | (_| | | | \__ \ (_| | (__| |_| | (_) | | | |     | | |  __/ |_| |  | |_| |      | || (_) | (_) | |
     \__|_|  \__,_|_| |_|___/\__,_|\___|\__|_|\___/|_| |_|     |_|  \___|\__|_|   \__, |       \__\___/ \___/|_|
                                                                                   __/ |                        
                                                                                  |___/                         

This Hardhat plugin provides two tasks and two functions to help you manage and optimize your transactions on Ethereum compatible blockchain. The two tasks include the ability to retry a transaction and retrieve the current gas cost.

Install Transaction-Retry-Tool

To install the Hardhat Transaction-Retry-Tool Plugin, run the following command in your project directory:

npm i transaction-retry-tool

Next, add the plugin to your hardhat.config.js file:

require("transaction-retry-tool");

And that's it! You can now use the two tasks and functions provided by this plugin to manage and optimize your transactions.

Directories

Tasks

The plugin adds two tasks to the Hardhat CLI:

npx hardhat retry

Task: retry

This task is used to retry a transaction with the current gas price or a specified one.

Usage: hardhat [GLOBAL OPTIONS] retry --tx-hash --signer-key [--gas-price ]

OPTIONS:

  • --tx-hash The transaction hash of the transaction to retry
  • --signer-key The signer private key (or type hardhat to use hardhat.config private key)
  • --gas-price Specify a gas price to retry the transaction with (default: current network gas price) (default: "")

retry: Retry a transaction with the current gas price or specify one

Task: gas-cost

This task is used to retrieve the current gas price on the selected network in wei.

Usage: hardhat [GLOBAL OPTIONS] gas-cost

gas-cost: Get the current gas price on the selected network in wei

Functions

Function allow you to use the transaction retry tool OR get the current gas cost.

const { transactionRetry } = require('hardhat');

transactionRetry.retry(
    txHash: string,
    signerKey: string,
    gasPrice?: string
)
transactionRetry.gasCost()

Directory Tree

@gluwa/transaction-retry-tool/
│   .eslintrc.js
│   .npmignore
│   .prettierrc
│   awesome-readme.config.js
│   CONTRIBUTING.md
│   LICENSE
│   package-lock.json
│   package.json
│   README.md
│   tsconfig.json
│   tsconfig.prod.json
│   tslint.json
└─── src/
   │   getGasCost.ts
   │   index.ts
   │   README.md
   │   retryTransaction.ts
   │   serveTasks.ts
   │   TransactionRetry.ts
   │   type-extensions.ts
   │   utils.ts

Don't hesitate to contribute to this project.