@gluwa/tron-contract-formatter
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

license npm version

Tron Contract Formatter

A Hardhat plugin that exports a task call format and takes a contract path and a output path. It flattens the contract and formats it to be deployed on the Tron network.

Installation

To install the Tron Contract Formatter, run the following command in your terminal:

How to install this package

1. Install this package

With NPM

npm install tron-contract-formatter --save-dev

Or with Yarn

yarn add tron-contract-formatter --save-dev

2. Import/Require this package in your hardhat.config.js/.ts

Inside inside hardhat.config.js

require("tron-contract-formatter");

or inside hardhat.config.ts (Typescript)

import 'tron-contract-formatter'

Other option

Clone this repository and create a symlink
git clone https://github.com/marc-aurele-besner/tron-contract-formatter

cd tron-contract-formatter

npm install

npm run build

npm link

in the hardhat project, you want to use this plugin

npm link tron-contract-formatter

Tasks

npx hardhat format

Task: deploy-contract

Usage: hardhat [GLOBAL OPTIONS] format [--contract ] [--output ]

OPTIONS:

--contract The contract to format (default: "contracts/MyContract.sol") --output The output formatted contract (default: "Formatted.sol")

Functions

Function to format the contract

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

    tronContractFormatter.format(
        contract: string,
        output: string
    )

Package Sidebar

Install

npm i @gluwa/tron-contract-formatter

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

28.7 kB

Total Files

33

Last publish

Collaborators

  • taelimoh
  • hyeonggook.lee
  • jlafleurgluwa
  • dsylebee
  • kevinnguyen17
  • gluwa-bot
  • ray.gluwa