@kriptonio/hardhat-kriptonio
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

hardhat-kriptonio

Kriptonio plugin for Hardhat

This plugin allows you to upload compiled hardhat smart contract artifacts to Kriptonio. On kriptonio side new smart contract will be created with attached artifacts, which you can afterward deploy and manage via kriptonio.

Installation

npm install @kriptonio/hardhat-kriptonio

Import the plugin in your hardhat.config.js:

require('@kriptonio/hardhat-kriptonio');

Or if you are using TypeScript, in your hardhat.config.ts:

import '@kriptonio/hardhat-kriptonio';

TypeScript users

If you are using Hardhat with TypeScript, you need to add this to your hardhat.config.ts:

  1. Set target to minimum ES2020 or higher.
  2. Add ES2022 to your lib.

Configuration

This plugin adds new configuration option in your hardhat config file, called kriptonio.

option Description
access-token (required) Kriptonio organization level access token. You can find it in your settings page.
chainId (required) ID of the chain where you want to deploy your smart contract. List of supported blockchain networks with their chain IDs you can find here.
contract (required) Smart contract name which you want to upload to kriptonio
title (optional) Title of kriptonio smart contract to be created. Defaults to contract name.

Example of configuration via hardhat.config.ts

const config: HardhatUserConfig = {
  kriptonio: {
    title: 'Token on Kriptonio',
    contract: 'MyERC20',
    accessToken: '<kriptonio-access-token>',
    chainId: 1
  },
  /** ...the rest of hardhat.config config file  */
};

Usage

This plugin adds the kriptonio-upload task to Hardhat:

If you are providing configuration via CLI arguments

npx hardhat kriptonio-upload --contract <contract-name> --access-token <kriptonio-access-token> --chain-id <chain-id>

If you are providing configuration via hardhat.config file or if you want to provide configuration interactively

npx hardhat kriptonio-upload

Package Sidebar

Install

npm i @kriptonio/hardhat-kriptonio

Weekly Downloads

0

Version

0.5.0

License

MIT

Unpacked Size

22.7 kB

Total Files

23

Last publish

Collaborators

  • kriptonio-admin