mirror of
https://github.com/status-im/autobounty.git
synced 2025-02-09 04:03:51 +00:00
Testing on ropsten
This commit is contained in:
parent
f6aef0c69a
commit
5f5728d28e
@ -129,10 +129,12 @@ const error = function (errorMessage) {
|
||||
|
||||
|
||||
|
||||
const sendTransaction = function (to, amount, gasPrice, chainId) {
|
||||
const sendTransaction = function (to, amount, gasPrice) {
|
||||
|
||||
console.log("Creating wallet with PK: ", config.privateKey);
|
||||
const wallet = new Wallet(config.privateKey);
|
||||
wallet.provider = ethers.providers.getDefaultProvider('ropsten');
|
||||
|
||||
|
||||
const transaction = {
|
||||
nonce: 0,
|
||||
@ -142,7 +144,7 @@ const sendTransaction = function (to, amount, gasPrice, chainId) {
|
||||
value: amount,
|
||||
// data: "0x",
|
||||
// This ensures the transaction cannot be replayed on different networks
|
||||
chainId: chainId
|
||||
chainId: 3 // ropsten
|
||||
};
|
||||
|
||||
const signedTransaction = wallet.sign(transaction);
|
||||
|
6
index.js
6
index.js
@ -43,14 +43,14 @@ app.post(`${config.urlEndpoint}`, jsonParser, function (req, res, next) {
|
||||
})
|
||||
.catch((err) => {
|
||||
bot.error('Error processing request: ' + req.body.issue.url);
|
||||
bot.error('error: ' + err);
|
||||
bot.error('dump: ' + req.body);
|
||||
bot.error('Error: ' + err);
|
||||
bot.error('Dump: ', req.body);
|
||||
});
|
||||
}, config.delayInMiliSeconds);
|
||||
|
||||
} else {
|
||||
bot.error('Error validating issue: ' + req.body.issue.url);
|
||||
bot.error('error: ' + validation.error);
|
||||
bot.error('Error: ' + validation.error);
|
||||
}
|
||||
return res.sendStatus(200);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user