2.0.0 • Published 5 years ago
@laborx/lx-core-migrations v2.0.0
LaborX v2: deployment migrations
Provides set of useful constants, functions and scripts to access and deploy LX Contract Module smart contracts.
Install
npm install -D @laborx/lx-core-migrations
Structure
There are couple of exported scopes that should be mentioned:
Constants
- provides constants and utility functions to access basic functionality -ContractNames
- allows to access deployed contracts by names -ContractStorageCrates
- storage crate names, defines scopes of stored data of smart contracts -getDeployedArtifactsPath(contractEnv)
- allows to get deployed addresses path according to neededcontractEnv
parameter. SeeSmartContractsAddressBuildEnvironment
for available options. -getDeployedArtifactsPathFromNodeEnv()
- allows to get deployed addresses path based on provided env variableDeployment
- scripts for smart contracts deployment
Usage
Environment variable
Setup in .env
SC_ADDRESSES_BUILD_ENV
variable to one of
# SC_ADDRESSES_BUILD_ENV=production
SC_ADDRESSES_BUILD_ENV=beta
# SC_ADDRESSES_BUILD_ENV=dev
Importing
import { Constants } from "@laborx/lx-core-migrations";
const {
getDeployedArtifactsPath,
getDeployedArtifactsPathFromNodeEnv,
SmartContractsAddressBuildEnvironment
} = Constants;
/*
Get deployed addresses path for 'beta' build environment
*/
const deployedAddressesPath = getDeployedArtifactsPath(SmartContractsAddressBuildEnvironment.beta)
/*
If provided you can use setup environment variable and use it for getting build environment
*/
const deployedAddressePath = getDeployedArtifactsPathFromNodeEnv()
2.0.0
5 years ago
2.0.0-alpha.1
5 years ago
2.0.0-alpha.0
5 years ago
1.8.2
6 years ago
1.8.1
6 years ago
1.8.1-alpha.1
6 years ago
1.8.1-beta.1
6 years ago
1.8.1-beta.0
6 years ago
1.7.1-alpha.0
6 years ago
1.8.1-alpha.0
6 years ago
1.8.0-alpha.0
6 years ago
1.7.0-alpha.0
6 years ago
1.6.0-beta.0
6 years ago
1.5.0-beta.0
6 years ago
1.4.0-alpha.0
6 years ago
1.3.0-alpha.0
6 years ago
1.2.0-alpha.0
6 years ago
1.1.0-alpha.1
6 years ago
1.1.0-alpha.0
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
6 years ago