Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return receipt
},
contractDeployFormatter: (receipt: any) => {
const newContract = ctx._parent.clone()
newContract.options.address = receipt.contractAddress
return newContract
}
}
const sendTransaction = new Method({
name: 'sendTransaction',
call: Action.SEND_TRANSACTION,
params: 1,
inputFormatter: [sign],
requestManager: ctx._parent._requestManager,
accounts: Contract.accounts, // is eth.accounts (necessary for wallet signing)
defaultAccount: ctx._parent.defaultAccount,
defaultBlock: ctx._parent.defaultBlock,
extraFormatters: extraFormatters
}).createFunction()
return sendTransaction(args.options, args.callback)
}
}
}
const sign = (_tx: any) => {
const tx = addPrivateKeyFrom(Contract.accounts.wallet)(_tx)
return signer(tx)
}
Contract.prototype._executeMethod = function _executeMethod() {
}
return receipt;
},
contractDeployFormatter: (receipt) => {
const newContract = ctx._parent.clone();
newContract.options.address = receipt.contractAddress;
return newContract;
}
};
const sendTransaction = new Method({
name: 'sendTransaction',
call: Action.SEND_TRANSACTION,
params: 1,
inputFormatter: [sign],
requestManager: ctx._parent._requestManager,
accounts: Contract.accounts,
defaultAccount: ctx._parent.defaultAccount,
defaultBlock: ctx._parent.defaultBlock,
extraFormatters: extraFormatters
}).createFunction();
return sendTransaction(args.options, args.callback);
}
}
};
Contract.prototype._on = function () {
const sign = (_tx) => {
const tx = addPrivateKey_1.default(Contract.accounts.wallet)(_tx);
return cita_signer_1.default(tx);
};
Contract.prototype._executeMethod = function _executeMethod() {