Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delete receipt.logs;
}
return receipt;
},
contractDeployFormatter: function (receipt) {
var newContract = _this._parent.clone();
newContract.options.address = receipt.contractAddress;
return newContract;
}
};
var sendTransaction = (new Method({
name: 'sendTransaction',
call: 'eth_sendTransaction',
params: 1,
inputFormatter: [formatters.inputTransactionFormatter],
requestManager: _this._parent._requestManager,
accounts: _this.constructor._ethAccounts || _this._ethAccounts, // is eth.accounts (necessary for wallet signing)
defaultAccount: _this._parent.defaultAccount,
defaultBlock: _this._parent.defaultBlock,
extraFormatters: extraFormatters
})).createFunction();
return sendTransaction(args.options, args.callback);
}
}
};
call: 'wan_scanOTAbyAccount',
params: 2,
inputFormatter: [formatters.inputAddressFormatter,formatters.inputBlockNumberFormatter]
});
const genRingSignData = new Method({
name: 'genRingSignData',
call: 'personal_genRingSignData',
params: 3,
});
const sendPrivacyCxtTransaction = new Method({
name: 'sendPrivacyCxtTransaction',
call: 'personal_sendPrivacyCxtTransaction',
params: 2,
inputFormatter: [formatters.inputTransactionFormatter, null]
});
return [
computeOTAPPKeys,
generateOneTimeAddress,
getOTABalance,
getOTAMixSet,
getSupportWanCoinOTABalances,
getSupportStampOTABalances,
getWanAddress,
scanOTAbyAccount,
genRingSignData,
sendPrivacyCxtTransaction,
];
};
new Method({
name: 'importRawKey',
call: 'personal_importRawKey',
params: 2
}),
new Method({
name: 'sendTransaction',
call: 'personal_sendTransaction',
params: 2,
inputFormatter: [formatters.inputTransactionFormatter, null]
}),
new Method({
name: 'signTransaction',
call: 'personal_signTransaction',
params: 2,
inputFormatter: [formatters.inputTransactionFormatter, null]
}),
new Method({
name: 'sign',
call: 'personal_sign',
params: 3,
inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null]
}),
new Method({
name: 'ecRecover',
call: 'personal_ecRecover',
params: 2,
inputFormatter: [formatters.inputSignFormatter, null]
})
];
methods.forEach(function(method) {
method.attachToObject(_this);