Skip to content

massalabs/coin-vester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coin vester

A simple coin vesting dapp.

Build

By default this will build all files in assembly/contracts directory.

cd smart-contract
npm run build

Deploy a smart contract

Prerequisites :

  • You must add a .env file at the root of the repository with the following keys set to valid values :

These keys will be the ones used by the deployer script to interact with the blockchain.

The following command will build contracts in assembly/contracts directory and execute the deployment script src/deploy.ts. This script will deploy on the node specified in the .env file.

cd smart-contract
npm run deploy

You can modify src/deploy.ts to change the smart contract being deployed, and to pass arguments to the constructor function:

  • line 31: specify what contract you want to deploy
  • line 33: create the Args object to pass to the constructor of the contract you want to deploy

When the deployment operation is executed on-chain, the constructor function of the smart contract being deployed will be called with the arguments provided in the deployment script.

The deployment script uses massa-sc-deployer library to deploy smart contracts.

You can edit this script and use massa-web3 library to create advanced deployment procedure.

For more information, please visit our ReadTheDocs about Massa smart-contract development.

Unit tests

The test framework documentation is available here: as-pect docs

cd smart-contract
npm run test

Format code

cd smart-contract
npm run fmt

About

A simple coin vesting smart contract

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published