1.0.0 • Published 2 years ago

@gm2/blockchain v1.0.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
2 years ago

Installation

To install this package, you must run:

npm i @gm2/blockchain

How to add new contracts in the package

To add a new contract:

  • Copy and paste the contract in the corresponding folder
  • Compile the contract (see how to compile)

How to compile a contract

To compile a contract:

  • Run:
npm compile or npx hardhat compile

How to call a contract in a new project

  • You must have this package installed in your project
  • In the file where you want to call a contract, use: import '@gm2/blockchain/src/folderPath/theContractYouWantToUse.sol;

How to release a new version of the library

After making changes, improvements or adding new files:

  • You must log in to npm account (run the command: npm login)
  • Enter the requested data (GM2 account): username, password and email (requires a verification code which is sent to the email associated with the npm account)
  • Once logged in, in the package.json file upload the version number (in the version field, change the last number to the one that follows: 1.0.2 -> 1.0.3)
  • Finally, write in the terminal the command: npm publish --access public