@clonegod/ttd-bsc-common 1.0.46 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/trade/send/blxr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BlxrTradeProxy = void 0;
|
|
4
4
|
const dist_1 = require("@clonegod/ttd-core/dist");
|
|
5
|
-
class
|
|
5
|
+
class BlxrTradeProxy {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.wsUrl = process.env.BLOX_SEND_TX_WS_ENDPOINT || 'ws://127.0.0.1:7002/bsc/send_tx';
|
|
8
8
|
this.authToken = process.env.BLOX_AUTH_KEY || '';
|
|
@@ -27,4 +27,4 @@ class BlxrTrade {
|
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
exports.
|
|
30
|
+
exports.BlxrTradeProxy = BlxrTradeProxy;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './send_tx';
|
|
2
2
|
export declare enum BSC_EOA_ADDRESS {
|
|
3
3
|
BLOCKRAZOR = "0x1266C6bE60392A8Ff346E8d5ECCd3E69dD9c5F20",
|
|
4
|
-
_48CLUB = "0x4848489f0b2BEdd788c696e2D79b6b69D7484848"
|
|
4
|
+
_48CLUB = "0x4848489f0b2BEdd788c696e2D79b6b69D7484848",
|
|
5
|
+
BLXR = "0x6374Ca2da5646C73Eb444aB99780495d61035f9b"
|
|
5
6
|
}
|
package/dist/trade/send/index.js
CHANGED
|
@@ -20,4 +20,5 @@ var BSC_EOA_ADDRESS;
|
|
|
20
20
|
(function (BSC_EOA_ADDRESS) {
|
|
21
21
|
BSC_EOA_ADDRESS["BLOCKRAZOR"] = "0x1266C6bE60392A8Ff346E8d5ECCd3E69dD9c5F20";
|
|
22
22
|
BSC_EOA_ADDRESS["_48CLUB"] = "0x4848489f0b2BEdd788c696e2D79b6b69D7484848";
|
|
23
|
+
BSC_EOA_ADDRESS["BLXR"] = "0x6374Ca2da5646C73Eb444aB99780495d61035f9b";
|
|
23
24
|
})(BSC_EOA_ADDRESS || (exports.BSC_EOA_ADDRESS = BSC_EOA_ADDRESS = {}));
|
|
@@ -3,6 +3,7 @@ export declare class TransactionSender {
|
|
|
3
3
|
private rpc;
|
|
4
4
|
private blockRazor;
|
|
5
5
|
private _48Club;
|
|
6
|
+
private blxrProxy;
|
|
6
7
|
constructor(appConfig: AppConfig);
|
|
7
|
-
sendTransaction(signedMainTx: string, eoa_tip_transaction: (eoa_address: string) => Promise<string>, order_trace_id: string): Promise<string[]>;
|
|
8
|
+
sendTransaction(signedMainTx: string, eoa_tip_transaction: (eoa_address: string) => Promise<string>, order_trace_id: string, pair?: string): Promise<string[]>;
|
|
8
9
|
}
|
|
@@ -15,14 +15,16 @@ const blockrazor_1 = require("./blockrazor");
|
|
|
15
15
|
const bsc_rpc_1 = require("./bsc_rpc");
|
|
16
16
|
const _48club_1 = require("./48club");
|
|
17
17
|
const _1 = require(".");
|
|
18
|
+
const blxr_1 = require("./blxr");
|
|
18
19
|
class TransactionSender {
|
|
19
20
|
constructor(appConfig) {
|
|
20
21
|
this.rpc = new bsc_rpc_1.BscMainnetRpc(appConfig.env_args.rpc_endpoint);
|
|
21
22
|
this.blockRazor = new blockrazor_1.BlockRazorTrade();
|
|
22
23
|
this._48Club = new _48club_1._48ClubTrade();
|
|
24
|
+
this.blxrProxy = new blxr_1.BlxrTradeProxy();
|
|
23
25
|
}
|
|
24
|
-
sendTransaction(
|
|
25
|
-
return __awaiter(this,
|
|
26
|
+
sendTransaction(signedMainTx_1, eoa_tip_transaction_1, order_trace_id_1) {
|
|
27
|
+
return __awaiter(this, arguments, void 0, function* (signedMainTx, eoa_tip_transaction, order_trace_id, pair = '') {
|
|
26
28
|
const rpcProviders = [
|
|
27
29
|
{
|
|
28
30
|
name: 'Default (QuickNode / Merkle)',
|
|
@@ -60,6 +62,16 @@ class TransactionSender {
|
|
|
60
62
|
let bundle = [signedMainTx, yield eoa_tip_transaction(_1.BSC_EOA_ADDRESS._48CLUB)];
|
|
61
63
|
return yield this._48Club.sendBundle({ txs: bundle });
|
|
62
64
|
})
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Blxr - sendTransaction',
|
|
68
|
+
enable: process.env.SEND_TX_BLXR_TX === 'true',
|
|
69
|
+
send: () => __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
let pair = '';
|
|
71
|
+
const tipTx = yield eoa_tip_transaction(_1.BSC_EOA_ADDRESS.BLXR);
|
|
72
|
+
this.blxrProxy.sendTransaction(pair, signedMainTx, tipTx);
|
|
73
|
+
return Promise.resolve('success');
|
|
74
|
+
})
|
|
63
75
|
}
|
|
64
76
|
];
|
|
65
77
|
const results = [];
|