Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hawksightco/hawk-sdk

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hawksightco/hawk-sdk - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

32

dist/src/classes/Transaction.js

@@ -208,5 +208,13 @@ "use strict";

const testInstructions = [
web3.ComputeBudgetProgram.setComputeUnitLimit({ units: 1400000 }),
...this.instructions,
];
if (this.findSetComputeUnitLimitIndex(testInstructions) === -1) {
testInstructions.unshift(web3.ComputeBudgetProgram.setComputeUnitLimit({ units: 1400000 }));
}
if (this.findSetComputeUnitPriceIndex(testInstructions) === -1) {
testInstructions.unshift(web3.ComputeBudgetProgram.setComputeUnitPrice({
// CU * CU PRICE -> 1400000 * feeEstimate.priorityFeeEstimate
microLamports: 100000,
}));
}
const testVersionedTxn = new web3.VersionedTransaction(new web3.TransactionMessage({

@@ -262,4 +270,11 @@ instructions: testInstructions,

*/
findSetComputeUnitLimitIndex() {
return this.instructions.findIndex((ix) => {
findSetComputeUnitLimitIndex(instructions) {
let _instructions = [];
if (instructions !== undefined) {
_instructions = instructions;
}
else {
_instructions = this.instructions;
}
return _instructions.findIndex((ix) => {
const isComputeBudgetProgram = ix.programId.toString() ===

@@ -274,4 +289,11 @@ "ComputeBudget111111111111111111111111111111";

*/
findSetComputeUnitPriceIndex() {
return this.instructions.findIndex((ix) => {
findSetComputeUnitPriceIndex(instructions) {
let _instructions = [];
if (instructions !== undefined) {
_instructions = instructions;
}
else {
_instructions = this.instructions;
}
return _instructions.findIndex((ix) => {
const isComputeBudgetProgram = ix.programId.toString() ===

@@ -278,0 +300,0 @@ "ComputeBudget111111111111111111111111111111";

2

package.json
{
"name": "@hawksightco/hawk-sdk",
"version": "0.0.20",
"version": "0.0.21",
"description": "Hawksight v2 SDK",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc