JSPM

solidity-refactor

1.0.2-alpha
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20829F
  • License MIT

prettier plugin for solidity that refactors solidity 0.4.x code to solidity 0.5.x code

Package Exports

  • solidity-refactor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (solidity-refactor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

solidity-upgrade

This is a work in progress Prettier Plugin for Refactoring Solidity 0.4.x code to 0.5.x code. This tool does the following tasks currently:

  1. Change pragma version to ^0.5.0.
  2. Add calldata storage keyword infront of external function parameters and memory infront of other function's parameters that don't already have a defined parameter storage location.

Installation

Install both prettier and solidity-refactor:

npm install --save-dev prettier solidity-refactor

Usage

This plugin allows you to configure prettier to your needs. Command with my personal config is

prettier --write --tab-width 4 --print-width 140 '**/*.sol'