Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
A comprehensive refactor migrating the project to TypeScript, adding CI, tests, and improving formatting and environment setup
- Rewrote core utilities and handlers in TypeScript, removing old JavaScript versions
- Added integration/load tests and a GitHub Actions CI pipeline
- Standardized prettier setup, updated
package.jsonscripts, and expanded README with setup instructions
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/initNear.js | Removed legacy JavaScript NEAR initializer in favor of TS rewrite |
| src/utils/initEvm.ts | New TypeScript EVM initialization supporting multiple environments |
| src/utils/evmTransactions.ts | Refactored and typed EVM transaction helpers |
| src/index.ts | Main server entrypoint migrated to TS with enhanced validation |
| src/handlers/**/*.ts | Converted all blockchain handlers (Solana, Ethereum, NEAR) to TS |
| package.json | Updated scripts for build, test, and formatting; adjusted main |
| README.md | Expanded install, build, run, test, and environment instructions |
| .github/workflows/ci.yml | Added CI for build, tests, and prettier checks |
| .prettierignore | Ignored dist/ folder for formatting |
| .gitattributes | Marked dist/ files as generated |
| .env.example | Updated sample environment variables for new TS setup |
Comments suppressed due to low confidence (6)
src/utils/initEvm.ts:45
- The error refers to
evmPrivateKeyMainnet/evmPrivateKeySepoliabutuseEnv()returns a singleevmSk. Align the environment variable names or adjustuseEnv()to match.
? 'evmPrivateKeyMainnet' : 'evmPrivateKeySepolia'
src/utils/evmTransactions.ts:55
- Leftover debug
console.logmay expose sensitive data; consider removing or replacing with a proper logger at debug level.
console.log({ rsvSignature });
src/utils/evmTransactions.ts:80
- Debug logging of the signature request could leak internal details; remove or replace with structured logging if needed.
console.log({ signatureRequest });
src/index.ts:8
- Falling back to a hardcoded default API secret is insecure. Require
API_SECRETto be explicitly set and fail startup if missing.
const API_SECRET = process.env.API_SECRET || 'default-secret-key';
src/handlers/ethereum.ts:31
- [nitpick] Use
cannotinstead ofcan notfor grammatical correctness in the error message.
`Ethereum can not be called with check=true due to long finalization time`
src/utils/initEvm.ts:7
- Consider adding unit tests for
initEthereumto verify behavior acrossdev,testnet, andmainnetconfigurations.
export const initEthereum = ({
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Ok |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
auto-mausx
previously approved these changes
Jun 2, 2025
Eth balances
fix eth key rotation
auto-mausx
approved these changes
Jun 2, 2025
Contributor
Author
|
@esaminu me and @auto-mausx want to experiment with deployment, please, review, I will address all comments |
esaminu
reviewed
Jun 2, 2025
Collaborator
esaminu
left a comment
There was a problem hiding this comment.
Tests look awesome, left some minor comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please, review, but do not merge yet, it has a lot of breaking changes. @auto-mausx, let's deploy this branch on a VM, sent traffic there, remove CloudRun deployment and merge this PR.