Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@layerzerolabs/lz-initia-cli
Advanced tools
Wrap Initia cli to support custom configuration just like Hardhat
yarn add @layerzerolabs/lz-initia-cli
Create a initia.config.ts
file in the root of your project. A full example is below:
import { LzInitiaConfig } from "@layerzerolabs/lz-initia-cli";
import {
Chain,
chainAndStageToNetwork,
Environment,
Stage,
} from "@layerzerolabs/lz-definitions";
import path from "path";
import { Account } from "@initia-labs/ts-sdk";
const INITIA_SANDBOX_LOCAL = chainAndStageToNetwork(
Chain.INITIA,
Stage.SANDBOX,
Environment.LOCAL,
);
const INITIA_TESTNET = chainAndStageToNetwork(
Chain.INITIA,
Stage.TESTNET,
Environment.TESTNET,
);
const INITIA_MAINNET = chainAndStageToNetwork(
Chain.INITIA,
Stage.MAINNET,
Environment.MAINNET,
);
const contractWorkspace = "./contracts";
const config: LzInitiaConfig = {
artifactsPath: "./artifacts",
deploymentPath: "./deployments",
compatibleVersions: ["v1"],
network: {
[Environment.LOCAL]: "http://127.0.0.1:8080",
},
defaultDeployer: {
[INITIA_SANDBOX_LOCAL]: Account.fromPrivateKey({
privateKey: process.env.LOCAL_DEPLOYER,
}),
[INITIA_TESTNET]: Account.fromPrivateKey({
privateKey: process.env.TESTNET_DEPLOYER,
}),
[INITIA_MAINNET]: Account.fromPrivateKey({
privateKey: process.env.MAINNET_DEPLOYER,
}),
},
// alternative way to set defaultDeployer
// defaultDeployer: Account.fromPrivateKey({ privateKey: process.env.DEFAULT_DEPLOYER })
gasPrice: {
[INITIA_SANDBOX_LOCAL]: 1000,
[INITIA_TESTNET]: 1000,
[INITIA_MAINNET]: 1000,
},
baseModules: ["PATH_TO_ANOTHER_LZ_INITIA_CONFIG_FILE"],
modules: {
layerzero_common: {
modulePath: path.join(contractWorkspace, "layerzero-common"),
deployer: {
"initia-sandbox-local": Account.fromPrivateKey({
privateKey: process.env.LAYERZERO_DEPLOYER,
}),
},
},
executor_v2: {
alias: "ExecutorV2",
modulePath: path.join(contractWorkspace, "executor/executor-v2"),
deployer: Account.fromPrivateKey({
privateKey: process.env.EXECUTOR_DEPLOYER,
}),
},
executor_auth: {
modulePath: path.join(contractWorkspace, "executor/executor-auth"),
variant: process.env.SUFFIX_EXECUTOR,
},
},
};
export default config;
Details of the configuration:
artifactsPath
: Path to store the artifacts(*.mv and package-metadata.bcs) generated by the compiler.deploymentPath
: Path to store the deployment files(*.json) recording the deployment information.compatibleVersions
: The compatible endpoint version. If not set, the default value is ['v1', 'v2']network
: The RPC for each environment.compileOptions
: The OPTIONS
for the initiad move build
. If not set, the default value is --skip-fetch-latest-git-deps=true
.defaultDeployer
: The default deployer. Deployer account address is also the address of the contract.gasPrice
: The gas price for each environment. If not set, the default value is 2 times the current gas price.baseModules
: The path to another lz-initia config file. The command tool will search the base modules recursively if module name not found in modules
. If not set, the default value is [].modules
: The module configuration. The key is the module name used in lz-initia-cli command. The key should be the same with package name in Move.toml.
alias
: Artifact/Deployment name for the module. If not set, the module name will be used.modulePath
: The path to the module's contract directory which contains Move.toml.deployer
: The deployer for the module. If not set, the default deployer will be used.variant
: The variant for the module. If not set, it means the module has no variant. It will be overridden by the variant in the command line.cd path/to/your/project
# compile the contracts
yarn lz-initia-cli build -m layerzero_common -n initia-sandbox-local
# compile the contracts with a variant
# for use cases like deploying same contract to different addresses
yarn lz-initia-cli build -m dvn -n initia-sandbox-local --variant nethermind
# replace the module path
yarn lz-initia-cli build -m layerzero_common -n initia-sandbox-local -p path/to/layerzero-common
# deploy the contracts
yarn lz-initia-cli deploy -m layerzero_common -n initia-sandbox-local
# deploy the contracts with a variant
yarn lz-initia-cli deploy -m layerzero_common -n initia-sandbox-local --variant nethermind
FAQs
Unknown package
The npm package @layerzerolabs/lz-initia-cli receives a total of 491 weekly downloads. As such, @layerzerolabs/lz-initia-cli popularity was classified as not popular.
We found that @layerzerolabs/lz-initia-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.