@0xcert/ethereum-sandbox
Version:
Test server for local running testing of modules on the Ethereum blockchain.
21 lines • 674 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.deploy = void 0;
function deploy(config) {
return new config.web3.eth.Contract(config.abi).deploy({
data: config.bytecode,
arguments: config.args,
}).send({
from: config.from,
gas: config.gas || 6000000,
gasPrice: config.gas || 1,
}).then((receipt) => {
const instance = new config.web3.eth.Contract(config.abi, receipt.options.address, {
gas: config.gas || 6000000,
from: config.from,
});
return { instance, receipt };
});
}
exports.deploy = deploy;
//# sourceMappingURL=deploy.js.map