MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / deploy

Method deploy

lib.commonjs/contract/factory.js:80–88  ·  view source on GitHub ↗

* Resolves to the Contract deployed by passing %%args%% into the * constructor. * * This will resolve to the Contract before it has been deployed to the * network, so the [[BaseContract-waitForDeployment]] should be used before * sending any transactions to it.

(...args)

Source from the content-addressed store, hash-verified

78 * sending any transactions to it.
79 */
80 async deploy(...args) {
81 const tx = await this.getDeployTransaction(...args);
82 (0, index_js_3.assert)(this.runner && typeof (this.runner.sendTransaction) === "function", "factory runner does not support sending transactions", "UNSUPPORTED_OPERATION", {
83 operation: "sendTransaction"
84 });
85 const sentTx = await this.runner.sendTransaction(tx);
86 const address = (0, index_js_2.getCreateAddress)(sentTx);
87 return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);
88 }
89 /**
90 * Return a new **ContractFactory** with the same ABI and bytecode,
91 * but connected to %%runner%%.

Callers 2

deployFunction · 0.95

Calls 2

getDeployTransactionMethod · 0.95
sendTransactionMethod · 0.65

Tested by

no test coverage detected