-
Notifications
You must be signed in to change notification settings - Fork 296
feat(sdk-coin-sol): StakingActivate for jito #6501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
212683d
to
634a453
Compare
package.json
Outdated
@@ -128,6 +128,7 @@ | |||
"test:prepare-release": "mocha --require ts-node/register ./scripts/tests/prepareRelease/prepare-release-main.test.ts" | |||
}, | |||
"dependencies": { | |||
"@solana/spl-stake-pool": "^1.1.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we add the sol dependency under sol module instead?
isMarinade?: boolean; | ||
isJito?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use enum stakingMethod
for default, marinade and jito instead to keep it clean
|
||
constructor(_coinConfig: Readonly<CoinConfig>) { | ||
super(_coinConfig); | ||
this._isTestnet = this._coinConfig.network.type === NetworkType.TESTNET; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other coins, we typically do not have this flag. It's caller's responsibility to decide mainnet or testnet configs to use.
examples/ts/sol/stake-jito.ts
Outdated
import { coins } from '@bitgo/statics' | ||
import { Connection, PublicKey, clusterApiUrl, Transaction, Keypair, LAMPORTS_PER_SOL } from "@solana/web3.js" | ||
import { getStakePoolAccount, updateStakePool } from '@solana/spl-stake-pool' | ||
import { BinTools } from 'avalanche'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why import avax lib>
@@ -0,0 +1,119 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the directory name is future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this is helper lib? If yes, then jitoStakePoolOperations.ts
might be a less confusing name
This is reviews from AI 🚨 Critical Issues That Need Immediate Attention
Interface Design Needs Improvement 🔄
Better Approach: Use an enum for cleaner, more maintainable code: TypeScript export interface StakingActivate { constructor(_coinConfig: Readonly) {
Incorrect Import ❌ Poor Naming & Organization 📁 Unit tests for the new StakingActivateBuilder functionality Interface design: How to design extensible APIs that won't need breaking changes |
634a453
to
d1fba71
Compare
TICKET: SC-2314
d1fba71
to
be557de
Compare
Moved to #6502 |
TICKET: SC-2314