token-2022/cpi-guard: add a Pinocchio version

Aperta
#786 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #701 di @MarkFeder — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
blockchain

Direzione di ricerca

Start with the existing Anchor example in tokens/token-2022/cpi-guard and compare it with the other Token-2022 extension examples that have Pinocchio versions. The issue says implementation is ready in linked PR #701, which is closed and unmerged; verify the branch or PR contents before taking this on. Done means a Pinocchio version exposes the TransferChecked CPI and tests rejection while the source account's guard is enabled and success after it is disabled.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

accepted

tokens/token-2022/cpi-guard ships only an Anchor version. This proposes a Pinocchio version, matching the other Token-2022 extension examples that already have one.

CpiGuard can't be toggled through a CPI, so the program exposes one TransferChecked CPI and the test shows the guard's effect: the CPI transfer is rejected while the guard is enabled on the source account, and goes through (balance moves) once it is disabled.

Implementation is ready in #701.

Lingua principale
Rust
Stelle
1.4k
Fork
559
Merge medio
20h 9m
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di solana-foundation/program-examples

Tutte le issue di solana-foundation/program-examples

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.