locklift-private-deploy
v1.0.6
Published
Locklift plugin that enables you to deploy smart contracts using private RPC endpoint.
Downloads
24
Maintainers
Readme
Deploy contract with private endpoint
Locklift plugin that enables you to deploy smart contracts using a private RPC endpoint.
Installation
- Install the plugin.
npm i --save-dev locklift-private-deploy
- Initialize the plugin via the
locklift.config.ts
file.
// locklift.config.ts
// ...
import { PrivateDeployerExtension, LockliftConfigExtension } from "locklift-private-deploy";
import "locklift-private-deploy";
declare module "locklift" {
export interface Locklift<FactorySource> extends PrivateDeployerExtension<FactorySource> {}
export interface LockliftConfig extends LockliftConfigExtension {}
}
// ...
const config: LockliftConfig = {
privateRPC: "http://private-rpc.com/rpc",
// ...
}
How to use
You can use this plugin as simple as locklift.factory.deployContract()
. For example:
const { contract: sample } = await locklift.privateRPC.deployContract({
contract: "Sample",
publicKey: signer.publicKey,
initParams: { _nonce: 0 },
constructorParams: { _state: 0 },
value: locklift.utils.toNano(3),
});