@drift-labs/jit-proxy 0.10.209 → 0.10.211
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.
|
@@ -16,14 +16,15 @@ class JitterShotgun extends baseJitter_1.BaseJitter {
|
|
|
16
16
|
return async () => {
|
|
17
17
|
var _a;
|
|
18
18
|
let i = 0;
|
|
19
|
-
|
|
19
|
+
const takerStats = await this.userStatsMap.mustGet(taker.authority.toString());
|
|
20
|
+
const referrerInfo = takerStats.getReferrerInfo();
|
|
21
|
+
// assumes each preflight simulation takes ~1 slot
|
|
22
|
+
while (i < order.auctionDuration) {
|
|
20
23
|
const params = this.perpParams.get(order.marketIndex);
|
|
21
24
|
if (!params) {
|
|
22
25
|
this.deleteOnGoingAuction(orderSignature);
|
|
23
26
|
return;
|
|
24
27
|
}
|
|
25
|
-
const takerStats = await this.userStatsMap.mustGet(taker.authority.toString());
|
|
26
|
-
const referrerInfo = takerStats.getReferrerInfo();
|
|
27
28
|
const txParams = {
|
|
28
29
|
computeUnits: this.computeUnits,
|
|
29
30
|
computeUnitsPrice: this.computeUnitsPrice,
|
|
@@ -44,7 +45,7 @@ class JitterShotgun extends baseJitter_1.BaseJitter {
|
|
|
44
45
|
referrerInfo,
|
|
45
46
|
subAccountId: params.subAccountId,
|
|
46
47
|
}, txParams);
|
|
47
|
-
console.log(`
|
|
48
|
+
console.log(`Successfully sent tx for ${orderSignature} txSig ${txSig}`);
|
|
48
49
|
await sleep(10000);
|
|
49
50
|
this.deleteOnGoingAuction(orderSignature);
|
|
50
51
|
return;
|
|
@@ -66,7 +67,6 @@ class JitterShotgun extends baseJitter_1.BaseJitter {
|
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
await sleep(200);
|
|
70
70
|
i++;
|
|
71
71
|
}
|
|
72
72
|
this.deleteOnGoingAuction(orderSignature);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drift-labs/jit-proxy",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.211",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rm -rf lib",
|
|
6
6
|
"build": "yarn clean && tsc"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@coral-xyz/anchor": "^0.26.0",
|
|
10
|
-
"@drift-labs/sdk": "2.57.0-beta.
|
|
10
|
+
"@drift-labs/sdk": "2.57.0-beta.1",
|
|
11
11
|
"@solana/web3.js": "1.73.2"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
@@ -39,18 +39,20 @@ export class JitterShotgun extends BaseJitter {
|
|
|
39
39
|
): () => Promise<void> {
|
|
40
40
|
return async () => {
|
|
41
41
|
let i = 0;
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
const takerStats = await this.userStatsMap.mustGet(
|
|
44
|
+
taker.authority.toString()
|
|
45
|
+
);
|
|
46
|
+
const referrerInfo = takerStats.getReferrerInfo();
|
|
47
|
+
|
|
48
|
+
// assumes each preflight simulation takes ~1 slot
|
|
49
|
+
while (i < order.auctionDuration) {
|
|
43
50
|
const params = this.perpParams.get(order.marketIndex);
|
|
44
51
|
if (!params) {
|
|
45
52
|
this.deleteOnGoingAuction(orderSignature);
|
|
46
53
|
return;
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
const takerStats = await this.userStatsMap.mustGet(
|
|
50
|
-
taker.authority.toString()
|
|
51
|
-
);
|
|
52
|
-
const referrerInfo = takerStats.getReferrerInfo();
|
|
53
|
-
|
|
54
56
|
const txParams = {
|
|
55
57
|
computeUnits: this.computeUnits,
|
|
56
58
|
computeUnitsPrice: this.computeUnitsPrice,
|
|
@@ -76,7 +78,7 @@ export class JitterShotgun extends BaseJitter {
|
|
|
76
78
|
txParams
|
|
77
79
|
);
|
|
78
80
|
|
|
79
|
-
console.log(`
|
|
81
|
+
console.log(`Successfully sent tx for ${orderSignature} txSig ${txSig}`);
|
|
80
82
|
await sleep(10000);
|
|
81
83
|
this.deleteOnGoingAuction(orderSignature);
|
|
82
84
|
return;
|
|
@@ -94,7 +96,6 @@ export class JitterShotgun extends BaseJitter {
|
|
|
94
96
|
return;
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
|
-
await sleep(200);
|
|
98
99
|
i++;
|
|
99
100
|
}
|
|
100
101
|
|