aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/deployer.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-21 20:33:07 +0800
committerFabio Berger <me@fabioberger.com>2018-03-21 20:33:07 +0800
commitaf21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0 (patch)
treed78be23523c152e3c491d215a06f904192e238e6 /packages/deployer/src/deployer.ts
parent07fa01528b5b5febf6852fb439a41c0e892cf830 (diff)
downloaddexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar.gz
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar.bz2
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar.lz
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar.xz
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.tar.zst
dexon-sol-tools-af21ad1615c9b0cd1e12b4dfee73c6beb6e57cc0.zip
Add missing DocComments to Deployer package
Diffstat (limited to 'packages/deployer/src/deployer.ts')
-rw-r--r--packages/deployer/src/deployer.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts
index 6c247d328..68518a931 100644
--- a/packages/deployer/src/deployer.ts
+++ b/packages/deployer/src/deployer.ts
@@ -19,12 +19,21 @@ import { utils } from './utils/utils';
// Gas added to gas estimate to make sure there is sufficient gas for deployment.
const EXTRA_GAS = 200000;
+/**
+ * The Deployer facilitates deploying Solidity smart contracts to the blockchain.
+ * It can be used to build custom migration scripts.
+ */
export class Deployer {
public web3Wrapper: Web3Wrapper;
private _artifactsDir: string;
private _networkId: number;
private _defaults: Partial<TxData>;
+ /**
+ * Instantiate a new instance of the Deployer class.
+ * @param opts Deployer options, including either an RPC url or Provider instance.
+ * @returns A Deployer instance
+ */
constructor(opts: DeployerOptions) {
this._artifactsDir = opts.artifactsDir;
this._networkId = opts.networkId;
@@ -42,8 +51,8 @@ export class Deployer {
this.web3Wrapper = new Web3Wrapper(web3Provider, this._defaults);
}
/**
- * Loads contract artifact and deploys contract with given arguments.
- * @param contractName Name of the contract to deploy. Must match name of an artifact in artifacts directory.
+ * Loads a contract's corresponding artifacts and deploys it with the supplied constructor arguments.
+ * @param contractName Name of the contract to deploy. Must match name of an artifact in supplied artifacts directory.
* @param args Array of contract constructor arguments.
* @return Deployed contract instance.
*/
@@ -80,7 +89,8 @@ export class Deployer {
return contractInstance;
}
/**
- * Loads contract artifact, deploys with given arguments, and saves updated data to artifact.
+ * Loads a contract's artifact, deploys it with supplied constructor arguments, and saves the updated data
+ * back to the artifact file.
* @param contractName Name of the contract to deploy. Must match name of an artifact in artifacts directory.
* @param args Array of contract constructor arguments.
* @return Deployed contract instance.