diff --git a/package.json b/package.json index cc793574e..9b9b4f925 100644 --- a/package.json +++ b/package.json @@ -57,13 +57,15 @@ "web3": "4.16.0" }, "scripts": { - "abi:generate": "forge clean && rm -fr typechain/* && forge build --skip script --skip test --skip Base --skip Test --skip '*.t.sol' && bun tasks/generateDiamondABI.ts", + "abi:generate": "forge clean && forge build --skip script --skip test --skip Base --skip Test --skip '*.t.sol' && bun tasks/generateDiamondABI.ts", + "abi:generate:incremental": "bun tasks/generateDiamondABI.ts", + "build:typechain-and-abi": "bun typechain:incremental && bun abi:generate:incremental", "abi:removeDuplicateEvents": "bunx tsx ./script/removeDuplicateEventsFromABI.ts", "add-network-rpc": "bunx tsx ./script/mongoDb/add-network-rpc.ts", "add-safe-owners-and-threshold": "bunx tsx ./script/deploy/safe/add-safe-owners-and-threshold.ts", "codegen": "plop", "compile": "forge build", - "confirm-safe-tx": "bun abi:generate && bunx tsx ./script/deploy/safe/confirm-safe-tx.ts", + "confirm-safe-tx": "bun build:typechain-and-abi && bunx tsx ./script/deploy/safe/confirm-safe-tx.ts", "deploy-safe": "bunx tsx ./script/deploy/safe/deploy-safe.ts", "coverage": "rm -rf coverage && rm -f lcov-filtered.info && rm -f lcov.info && forge coverage --report lcov --evm-version 'cancun' --ir-minimum && bun script/utils/filter_lcov.ts lcov.info lcov-filtered.info 'test/' 'script/' && genhtml lcov-filtered.info --branch-coverage --output-dir coverage && open coverage/index.html", "detect-evm-version": "bunx tsx ./script/deploy/detect-evm-version.ts", @@ -102,7 +104,7 @@ "test:ts": "bun script/runTypescriptTests.ts", "troncast": "bun run script/troncast/index.ts", "typechain": "forge clean && rm -rf typechain/* && forge build src && bun abi:removeDuplicateEvents && typechain --target ethers-v5 'out/!(*.t).sol/*.json' --out-dir typechain", - "typechain:incremental": "bun abi:removeDuplicateEvents && typechain --target ethers-v5 'out/!(*.t).sol/*.json' --out-dir typechain", + "typechain:incremental": "forge build src && bun abi:removeDuplicateEvents && typechain --target ethers-v5 'out/!(*.t).sol/*.json' --out-dir typechain", "unpause-all-diamonds": "bunx tsx ./script/tasks/unpauseAllDiamonds.ts", "balances": "bunx tsx ./script/balances.ts", "update-whitelist-periphery": "bunx tsx ./script/tasks/updateWhitelistPeriphery.ts" diff --git a/script/demoScripts/utils/demoScriptHelpers.ts b/script/demoScripts/utils/demoScriptHelpers.ts index 802616f60..53e002622 100644 --- a/script/demoScripts/utils/demoScriptHelpers.ts +++ b/script/demoScripts/utils/demoScriptHelpers.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'url' import { Keypair } from '@solana/web3.js' // @ts-expect-error - bs58 types not available // eslint-disable-next-line import/no-extraneous-dependencies -- bs58 is available via @layerzerolabs/lz-v2-utilities -import { decode as decodeBase58 } from 'bs58' +import bs58 from 'bs58' import { consola } from 'consola' import { config } from 'dotenv' import { @@ -151,7 +151,7 @@ export const solanaAddressToBytes32 = ( solanaAddress: string ): `0x${string}` => { // Decode base58 to get raw 32 bytes - const addressBytes = decodeBase58(solanaAddress) + const addressBytes = bs58.decode(solanaAddress) if (addressBytes.length !== 32) { throw new Error(