Skip to content

refactor: remove production SVM utils, import from SDK (ACP-56)#1380

Open
fusmanii wants to merge 13 commits intomasterfrom
faisal/acp-74-clean-up-contracts-svm-utils
Open

refactor: remove production SVM utils, import from SDK (ACP-56)#1380
fusmanii wants to merge 13 commits intomasterfrom
faisal/acp-74-clean-up-contracts-svm-utils

Conversation

@fusmanii
Copy link
Copy Markdown
Contributor

Delete hand-written SVM TypeScript utils (web3-v1/, web3-v2/, types/svm.ts) that have been migrated to @across-protocol/sdk/svm. Keep auto-generated assets/ and clients/ for the Codama generation pipeline.

  • Delete src/svm/web3-v1/, src/svm/web3-v2/, src/types/svm.ts
  • Remove SVM export from index.ts (no longer part of public API)
  • Update all test/svm/ imports to use @across-protocol/sdk
  • Update all scripts/svm/ imports to use @across-protocol/sdk
  • Move Solana deps to devDependencies (only needed for tests/scripts)
  • Add @across-protocol/sdk as devDependency
  • Remove buffer-layout peer dependency
  • Exclude scripts/ from tsconfig (avoids cross-package type mismatches)

Delete hand-written SVM TypeScript utils (web3-v1/, web3-v2/, types/svm.ts)
that have been migrated to @across-protocol/sdk/svm. Keep auto-generated
assets/ and clients/ for the Codama generation pipeline.

- Delete src/svm/web3-v1/, src/svm/web3-v2/, src/types/svm.ts
- Remove SVM export from index.ts (no longer part of public API)
- Update all test/svm/ imports to use @across-protocol/sdk
- Update all scripts/svm/ imports to use @across-protocol/sdk
- Move Solana deps to devDependencies (only needed for tests/scripts)
- Add @across-protocol/sdk as devDependency
- Remove buffer-layout peer dependency
- Exclude scripts/ from tsconfig (avoids cross-package type mismatches)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Mar 23, 2026

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 23, 2026

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 1, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

fusmanii and others added 11 commits April 1, 2026 15:31
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
- Replace all @across-protocol/sdk/dist/cjs/src/svm deep paths with
  @across-protocol/sdk/svm subpath exports (blocked by SDK exports field)
- Add tsconfig.test.json with module: es2020 + moduleResolution: bundler
  (base tsconfig stays commonjs for build output)
- Update Anchor.toml to use tsconfig.test.json for ts-mocha
- Replace deep client type imports with namespace access
  (SvmSpokeClient.FillRelayAsyncInput, SvmSpokeClient.DepositInput, etc.)
- Sort package.json devDependencies alphabetically

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
module: es2020 caused ts-mocha to use ESM resolution which requires file
extensions and breaks target/types/ imports. node16 supports subpath exports
while keeping CJS require() behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii marked this pull request as ready for review April 16, 2026 14:15
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09aa1960a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread generated/constants.json
"11155420": "0x4200000000000000000000000000000000000006",
"168587773": "0x4200000000000000000000000000000000000023",
"728126428": "0x891cdb91d149f23B1a45D9c5Ca78a88d0cB44C18",
"728126428": "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore hex encoding for TRON wrapped native token

Changing WRAPPED_NATIVE_TOKENS[728126428] to base58 (T...) breaks Solidity deployment/check scripts that read this field with vm.parseJsonAddress, which only accepts 0x-style addresses. For example, script/utils/Constants.sol#getWrappedNativeToken and script/counterfactual/CheckCounterfactualDeployments.s.sol (wntKey path) will revert when run against chain 728126428, preventing TRON script workflows from completing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant