Skip to content

Rewards Part 1#34

Merged
rickyrombo merged 7 commits intomainfrom
mjp-rewards
Apr 22, 2025
Merged

Rewards Part 1#34
rickyrombo merged 7 commits intomainfrom
mjp-rewards

Conversation

@rickyrombo
Copy link
Copy Markdown
Contributor

  • Adds Solana-Go to Bridge deps
  • Adds support for the RewardManager SubmitAttestation instruction using Solana-Go primitives
  • Adds support for the Secp256k1 instructions using Solana-Go primitives
  • Adds getUndisbursedChallenges query
  • Adds audiusd to deps to pull in attestation logic

Rewards is WIP, will add plenty of tests etc in future PRs. Have WIP endpoint but need to decouple some config values.

Probably easier to look at commit by commit?

Tested by successfully submitting an attestation on staging using the new endpoint wip

@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented Apr 21, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
16559966 Triggered Generic High Entropy Secret 985a4b2 api/dbv1/media_link_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

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

i'm impressed you were able to do this so easily!

challenge_disbursements.challenge_id IS NULL
AND user_challenges.is_complete
AND user_challenges.user_id = @user_id
AND (@challenge_id::text = '' OR user_challenges.challenge_id = @challenge_id)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is ::text necessary here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this made sure it typed as a string when autogenerating the model

ag_text "github.com/gagliardetto/solana-go/text"
)

var ProgramID = solana.MustPublicKeyFromBase58("CDpzvz7DfgbF95jSSCHLX3ERkugyfgn9Fw8ypNZ1hfXp")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should this be per environment? (stage / prod / etc )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah - I'm imitating the other programs in solana-go - I'll have the program id change on init using the method

@@ -0,0 +1,147 @@
package secp256k1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

badass.

@rickyrombo rickyrombo merged commit 4316de9 into main Apr 22, 2025
2 checks passed
@raymondjacobson raymondjacobson deleted the mjp-rewards branch April 24, 2025 23:01
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.

2 participants