Skip to content

Commit

Permalink
Merge pull request #227 from streamflow-finance/feat/upgrade-solana-w…
Browse files Browse the repository at this point in the history
…eb3-packages

feat/upgrade-solana-web3-packages with 7.0.0 major
  • Loading branch information
RolginRoman authored Nov 13, 2024
2 parents 5476a60 + f2e0c6a commit c555d74
Show file tree
Hide file tree
Showing 8 changed files with 392 additions and 218 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"packages": [
"packages/*"
],
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
10 changes: 5 additions & 5 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/common",
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"description": "Common utilities and types used by streamflow packages.",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -32,14 +32,14 @@
"@streamflow/eslint-config": "workspace:*",
"@types/bn.js": "5.1.1",
"date-fns": "2.28.0",
"typescript": "^4.9.5"
"typescript": "^5.6.3"
},
"dependencies": {
"@coral-xyz/borsh": "0.30.1",
"@solana/buffer-layout": "4.0.1 ",
"@solana/spl-token": "0.3.6",
"@solana/buffer-layout": "4.0.1",
"@solana/spl-token": "0.4.9",
"@solana/wallet-adapter-base": "0.9.19",
"@solana/web3.js": "1.90.2",
"@solana/web3.js": "1.95.4",
"aptos": "1.21.0",
"bn.js": "5.2.1",
"borsh": "^2.0.0",
Expand Down
14 changes: 12 additions & 2 deletions packages/common/solana/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,23 @@ export async function simulateTransaction(
if (res.value.err) {
const errMessage = JSON.stringify(res.value.err);
if (!errMessage.includes("BlockhashNotFound") || i === SIMULATE_TRIES - 1) {
throw new SendTransactionError("failed to simulate transaction: " + errMessage, res.value.logs || undefined);
throw new SendTransactionError({
action: "simulate",
signature: "",
transactionMessage: `failed to simulate transaction: ${typeof res.value.err === "string" ? res.value.err : errMessage}`,
logs: res.value.logs ?? undefined,
});
}
continue;
}
return res;
}
throw new SendTransactionError("failed to simulate transaction");

throw new SendTransactionError({
action: "simulate",
signature: "",
transactionMessage: "failed to simulate transaction",
});
}

/**
Expand Down
10 changes: 5 additions & 5 deletions packages/distributor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/distributor",
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"description": "JavaScript SDK to interact with Streamflow Airdrop protocol.",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
"main": "dist/esm/index.js",
Expand Down Expand Up @@ -31,15 +31,15 @@
"@streamflow/eslint-config": "workspace:*",
"@types/bn.js": "5.1.1",
"date-fns": "2.28.0",
"typescript": "^4.9.5"
"typescript": "^5.6.3"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@coral-xyz/borsh": "0.30.1",
"@solana/buffer-layout": "4.0.1 ",
"@solana/spl-token": "0.3.6",
"@solana/buffer-layout": "4.0.1",
"@solana/spl-token": "0.4.9",
"@solana/wallet-adapter-base": "0.9.19",
"@solana/web3.js": "1.90.2",
"@solana/web3.js": "1.95.4",
"@streamflow/common": "workspace:*",
"bn.js": "5.2.1",
"borsh": "^2.0.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/eslint-config",
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"license": "ISC",
"main": "index.js",
"files": [
Expand All @@ -16,5 +16,8 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5"
},
"dependencies": {
"typescript": "5.6.3"
}
}
8 changes: 4 additions & 4 deletions packages/staking/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/staking",
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"description": "JavaScript SDK to interact with Streamflow Staking protocol.",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
"main": "dist/esm/index.js",
Expand Down Expand Up @@ -31,15 +31,15 @@
"devDependencies": {
"@streamflow/eslint-config": "workspace:*",
"@types/bn.js": "5.1.1",
"typescript": "^4.9.5"
"typescript": "^5.6.3"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@coral-xyz/borsh": "^0.29.0",
"@solana/buffer-layout": "4.0.1",
"@solana/spl-token": "0.3.6",
"@solana/spl-token": "0.4.9",
"@solana/wallet-adapter-base": "0.9.19",
"@solana/web3.js": "1.70.1",
"@solana/web3.js": "1.95.4",
"@streamflow/common": "workspace:*",
"bn.js": "5.2.1",
"borsh": "^2.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/stream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/stream",
"version": "7.0.0-alpha.20",
"version": "7.0.0",
"description": "JavaScript SDK to interact with Streamflow protocol.",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
"main": "./dist/esm/index.js",
Expand Down Expand Up @@ -48,17 +48,17 @@
"@types/bn.js": "5.1.1",
"@types/ethereum-checksum-address": "^0.0.0",
"date-fns": "2.28.0",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@coral-xyz/borsh": "0.30.1",
"@manahippo/aptos-wallet-adapter": "1.0.10",
"@mysten/sui.js": "0.54.1",
"@solana/buffer-layout": "4.0.1 ",
"@solana/spl-token": "0.3.6",
"@solana/buffer-layout": "4.0.1",
"@solana/spl-token": "0.4.9",
"@solana/wallet-adapter-base": "0.9.19",
"@solana/web3.js": "1.90.2",
"@solana/web3.js": "1.95.4",
"@streamflow/common": "workspace:*",
"@suiet/wallet-kit": "0.2.22",
"aptos": "1.21.0",
Expand Down
Loading

0 comments on commit c555d74

Please sign in to comment.