Skip to content
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

chore: Pull in latest generated code #32

Merged
merged 1 commit into from
Sep 17, 2024
Merged

chore: Pull in latest generated code #32

merged 1 commit into from
Sep 17, 2024

Conversation

drohit-cb
Copy link
Contributor

@drohit-cb drohit-cb commented Sep 17, 2024

What changed? Why?

This PR pulls in the latest client generated code.

devnet staking

>> go run examples/solana/build-staking-operation/main.go /Users/rohit/code/cb/staking/.coinbase_cloud_api_key_production.json 44fBZAMyES3mDgVYCu35mQgjijnVNFxmQqTW5TuttY1A <redcated>
2024/09/17 13:52:27 Stakeable balance: 4.899995

2024/09/17 13:52:28 Staking operation ID: f270bd46-0ab9-4842-9f2f-05c1cd466060

2024/09/17 13:52:28 Tx unsigned payload: 66hEYYWnwGWkGpMKF2H2sCzxnmoAfY8LPnYMgWdY6rC7hX2H6DEE2YdPxECFx8FeeNmea8N87L4KuZ6dirYXZi9XNr5uPL8frPaUVawpGkFAzg6mks9WW2HSG3NuReiyGwHyqfFrwGVkpJiX2oKzksN5hkvWDGqdq1KrTStP6kfEWJCKccofmYBFZvq99VvNv8FjQ2kHSGuyhny4BdgSAdqy2v8DNbbCWJPhGNu58jM64QHbiNqaxZuMKvVrzXQasyVNpfSpHB2R546ABB1438PBS93DKViuuDgV63UUjJCMnSsN8s9v2p8LMG1nGJAG67jRVoTArQsD7YAn4qoTYiktKUZP8uc1b7vWZaU32zfb8ux7viALGfw22GbSNrkb7Xg5r8baUc2nLuvR8vE7W9LPKDLVPusHGaANZveREYp3ZJwBukrwRB5Qaqecbf3vQS31gLqGi2YkmDuTH2KoaALVh3w1TMMeFWREfJBYMRDmfXcv8JCsPEuQzmg5pqp7Fd3EkDUPJNmtJLc3jhc8x2ruNHVTVTbg6jT71YWMDBWGcz2khgu7ZRHac3s27zFukv3TUmhin6AUmjZWPEDEWd632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dhBeAc6cRFjpkuujKh6DohueTAgTez1YrJRir4RTXPp4h8bprFBpnm46De9iiaATGRizr7W9xEebU4adGnQnznJKefLgdnTyHRnEbcmo5E42B2QKgq5CNq1SVoP6wJmYFTETxy3hhVwGEvgcgegCVH6jFsLQSqvAzTnzyZs8LbfbWzaBFPjNR1HJBiua2syo1mxGj7Cs49jhjpbEGqZqzCqCeV5w94dehrj4bR69om

Sending transaction...
Trying again [1] Sending transaction...
2024/09/17 13:52:29 Broadcasted tx: https://explorer.solana.com/tx/4NE8Muz1wn8o3CpyKyaQ2gdMhBWqZRbXcgtNPcXiPauWERd5nybCkP5xHtxN6Psft7bHco6698bAqESy9bkzh14n?cluster=devnet

Also, tested e2e solana stake on mainnet

>> go run examples/solana/build_staking_operation.go /Users/rohit/code/cb/staking/.coinbase_cloud_api_key_production.json <readacted> <readacted>
2024/09/17 11:26:07 Stakeable balance: 1

2024/09/17 11:26:08 Staking operation ID: c07e9525-b762-4207-971e-2d77a78926a3

2024/09/17 11:26:08 Tx unsigned payload: 5UcXrBABH1uFTt273CTv6Kf8Dr3hXP6U196Cz4Ervb2RXNE5MQwHdaZs7Up4eXdmrc1sSZi7GVUunXUgtfKnKU15Su8ny58JudCQDMhxfqng1ybcbBLKbwuGdb7qxTkiPGrLnZZ4foKzag83mpKDMtVREorRBwPuxbkTRmJn6G45qZrc6xP7S6i599Mu9BMhHMXnYttszPXVcENmW7e5wAFLvv2EHk1pdAnQfJdwqK6pTN44zynoyBfaYWCF2XSVvzctaDkEkCWjbyNg6LVSf7mKmddgDTt193SS5un6ix6Qx4dSrSHYpHrP91cbUvkr3WrnkGLJqQ4Uabc7XhSR546TMT1g7ZkstcNF7o56WimApS3iYuxCYzwd6EhEP7ZqkJ72xNhYYAAs2XRurisDZpLT79GMTZQqGMHvqqekaoUcVF8SN96ou1PndChi2tK21AtF8kN6YJWjkAa7rNCMh5DKGtQzigaSqAdSX1j16tAC2Wd44PKPzkPZWeqNJgdS4o9h6ucCDTWg36C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EzrhcXpWxxRWMXU4bbYHw62HSr1rUYizkuTHsabU8a8gJF88bWHLZCF5L5N1pwhSHmk45aA7eDMAvMhSKg7HpmDtT4cVPm7Nek291GnA68Uu5E2Apqqu4Ct1iq3DJdMKfi5qed5ESj7iEGehpxCs6cPeTYftnuyN2jPHNW1WW4a2zLpDU8i8hzFUa62dYMDfn7EYXF1cfK5rxbx5MbtCPXJf1pZCv56s7K4j3aBVzs5hNaGPgheL9caXeSUJ4CX3EpiiV5SkmkVVR8SauyaRcQHVBD4ZD9scQWJi1uXLwZeGhU7tuJa3udG3hrcj6efkpfcvvmjfLtsPgb3cCHK9rCPe7WWiX6nnsyw9jPcTCAFvh4NMwYECRFfYuJ3yQn723qBC33gAo4nMQR79n3N5iSzzJFd13GRGiBReUc5zyLV99qKmZZAL1uKzNorBqPTWgLKGfHdJQUQVvdqycWoLbxtcRYHtZwQRQW5arE2UPL9zaoavRWb9updxZdCyWaSvxE8kMjrPieGmYkyAtsrCzNjXTwNbysLKVbGSAkPF3tiYdgRPnxfKJJaWUumjMagQiXcup8nUFx4EbVcvxDAfK1F7Xh1FotSMEaJmHf1VCegtEBEyb2jNPmoMxEDUAH6cm6cYiRiUnatsbkTvuzw5rCt8wyzWc7A8MT9GnV3jvRQ4TMhrhj5SJV5EzAqeg1znKMCzhCF6NFgxerkerwpg7CZXbZxLebhzNpSaqaudsSCgV5Qc1gbqNqPyTgb

Sending transaction...
Trying again [1] Sending transaction...
Trying again [2] Sending transaction...
Trying again [3] Sending transaction...
Trying again [4] Sending transaction...
Trying again [5] Sending transaction...
2024/09/17 11:26:21 Broadcasted tx: https://explorer.solana.com/tx/T2KM4iPjp5DcYVJfybaokzUDv7Fua7McgCQq7TYttaFMrMeB1dMLx1Qe4qHv6fQSJ1ZkEPWyrcheAbdbWf8rYeq

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Sep 17, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@@ -95,7 +90,7 @@ func newStakingBalanceFromModel(m *client.StakingBalance) (*StakingBalance, erro

return &StakingBalance{
model: m,
parsedDate: date,
parsedDate: m.GetDate(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

staking balance date field changed from a string to a time.Time so no longer need this parsing.

privKeys = strings.Split(keys, ",")
}

signers := make([]solana.PrivateKey, len(privKeys))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code wasn't functional when I tried using the env to pass SOL_PRIVATE_KEYS as below code attempts to read priv key from keygen filePrivateKeyFromSolanaKeygenFile instead of PrivateKeyFromBase58

Have removed support for reading from file to keep things simple.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this change makes sense 👍. No necessity to read this from a file.

@drohit-cb drohit-cb force-pushed the add_sol_mainnet branch 2 times, most recently from 582b3e4 to ed98162 Compare September 17, 2024 20:11
@drohit-cb drohit-cb marked this pull request as ready for review September 17, 2024 20:20
marcin-cb
marcin-cb previously approved these changes Sep 17, 2024
Copy link
Contributor

@deangalvin-cb deangalvin-cb left a comment

Choose a reason for hiding this comment

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

Please make sure to update the CHANGELOG and pkg/auth/transport.go with the new version

@cb-heimdall
Copy link

Review Error for deangalvin-cb @ 2024-09-17 20:28:20 UTC
User failed mfa authentication, public email is not set on your github profile. see go/mfa-help

networkID = client.NETWORKIDENTIFIER_SOLANA_MAINNET
amount = big.NewFloat(0.1)

apiKeyFilePath = "YOUR_API_KEY"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the method in which we source this information the same across examples?

Copy link
Contributor

@ProfMoo ProfMoo left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@deangalvin-cb deangalvin-cb left a comment

Choose a reason for hiding this comment

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

Dont forget to cut a release! LGTM!

@drohit-cb drohit-cb merged commit 752e2ff into master Sep 17, 2024
5 checks passed
@drohit-cb drohit-cb deleted the add_sol_mainnet branch September 17, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants