Skip to content

Commit

Permalink
Merge pull request #384 from drift-labs/master
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
NourAlharithi authored Feb 13, 2025
2 parents f01e2f8 + 4d74049 commit fb57aca
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "lib/index.js",
"license": "Apache-2.0",
"dependencies": {
"@drift-labs/jit-proxy": "0.13.5",
"@drift-labs/sdk": "2.110.0-beta.6",
"@drift-labs/jit-proxy": "0.13.15",
"@drift-labs/sdk": "2.110.0-beta.13",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/auto-instrumentations-node": "0.31.2",
"@opentelemetry/exporter-prometheus": "0.31.0",
Expand Down
4 changes: 2 additions & 2 deletions src/experimental-bots/filler-common/dlobBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class DLOBBuilder {
);
this.swiftUserAuthorities.set(
takerUserPubkey.toString(),
orderData['taker_authority']
orderData['signing_authority']
);

const maxSlot = slot.addn(swiftOrderParams.auctionDuration ?? 0);
Expand All @@ -230,9 +230,9 @@ class DLOBBuilder {
direction: swiftOrderParams.direction,
postOnly: false,
oraclePriceOffset: swiftOrderParams.oraclePriceOffset ?? 0,
maxTs: swiftOrderParams.maxTs ?? ZERO,
// Rest are not required for DLOB
price: ZERO,
maxTs: ZERO,
triggerPrice: ZERO,
triggerCondition: OrderTriggerCondition.ABOVE,
existingPositionDirection: PositionDirection.LONG,
Expand Down
10 changes: 4 additions & 6 deletions src/experimental-bots/filler/fillerMultithreaded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1841,8 +1841,8 @@ export class FillerMultithreaded {
taker: new PublicKey(takerUserPubKey),
takerStats: takerStatsPubKey,
takerUserAccount: takerUser,
signingAuthority: authority!,
},
authority,
ixs
))
);
Expand Down Expand Up @@ -2141,8 +2141,8 @@ export class FillerMultithreaded {
taker: new PublicKey(takerUserPubKey),
takerStats: takerStatsPubKey,
takerUserAccount: takerUser,
signingAuthority: authority!,
},
authority,
ixs
))
);
Expand Down Expand Up @@ -2575,7 +2575,7 @@ export class FillerMultithreaded {
referrerInfo: ReferrerInfo | undefined;
marketType: MarketType;
isSwift: boolean | undefined;
authority?: PublicKey;
authority: PublicKey;
}> {
const makerInfos: Array<DataAndSlot<MakerInfo>> = [];

Expand Down Expand Up @@ -2670,9 +2670,7 @@ export class FillerMultithreaded {
referrerInfo,
marketType: nodeToFill.node.order!.marketType,
isSwift: nodeToFill.node.isSwift,
authority: nodeToFill.authority
? new PublicKey(nodeToFill.authority)
: undefined,
authority: new PublicKey(authority),
});
}

Expand Down
2 changes: 2 additions & 0 deletions src/experimental-bots/swift/makerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class SwiftMaker {
}: SwiftOrderParamsMessage =
this.driftClient.decodeSwiftOrderParamsMessage(swiftOrderParamsBuf);

const signingAuthority = new PublicKey(order['signing_authority']);
const takerAuthority = new PublicKey(order['taker_authority']);
const takerUserPubkey = await getUserAccountPublicKey(
this.driftClient.program.programId,
Expand Down Expand Up @@ -159,6 +160,7 @@ export class SwiftMaker {
this.driftClient.program.programId,
takerUserAccount.authority
),
signingAuthority,
},
getLimitOrderParams({
marketType: MarketType.PERP,
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,20 @@
enabled "2.0.x"
kuler "^2.0.0"

"@drift-labs/jit-proxy@0.13.5":
version "0.13.5"
resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.13.5.tgz#e9f88e6f2e1255b8a4d24d210ea4234230eb933a"
integrity sha512-7BD3EiBzZppLOt+oPa+3RIE+pcUITuMoDIct8ITKPBL6cOs2OpzOPRrd2p5+xeUB/0p+EL4MYGpE0rm5ZvRFMg==
"@drift-labs/jit-proxy@0.13.15":
version "0.13.15"
resolved "https://registry.yarnpkg.com/@drift-labs/jit-proxy/-/jit-proxy-0.13.15.tgz#d679f0c43e592d32bf4ab453656b54443e0b48e1"
integrity sha512-yOE+UpvnAEkjy/rul1QUyG4RCjqCXJQMZP2u5c3WFuOSFDJREtinHK1HZFv9Q0MQGqXlJLilMcZij/iqBiIx5Q==
dependencies:
"@coral-xyz/anchor" "0.26.0"
"@drift-labs/sdk" "2.110.0-beta.6"
"@drift-labs/sdk" "2.110.0-beta.13"
"@solana/web3.js" "1.91.7"
tweetnacl-util "^0.15.1"

"@drift-labs/sdk@2.110.0-beta.6":
version "2.110.0-beta.6"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.110.0-beta.6.tgz#227cd0c8122b4062f7375fe8a153571e384fe448"
integrity sha512-2T+p1OAny2T82iBGO+LkbucEy5x74A63uHOBbjlEFKV/1rxNs2np+e7oZcyeV1yA82fK6Zqz2ENcPPhALhwPZw==
"@drift-labs/sdk@2.110.0-beta.13":
version "2.110.0-beta.13"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.110.0-beta.13.tgz#da4ff5857ee6c7d6bbd1d3b4c0a08e58dd67df8a"
integrity sha512-TB3VA2w5JLRPumzXVA1XzsW5d0ZGMt7k4gjW8uMd1tt+4sm4pODWoClNtPW4BCqXCUCQoiGbM8yH9JkfC0m/PQ==
dependencies:
"@coral-xyz/anchor" "0.29.0"
"@coral-xyz/anchor-30" "npm:@coral-xyz/anchor@0.30.1"
Expand Down

0 comments on commit fb57aca

Please sign in to comment.