milestones::set_treasury has no test proving it requires the admin's authorization
Los mantenedores suelen responder en 1 día
@sladeoj ya está trabajando en esto.
Desde el 21/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- rust
- Área
- blockchain, testing
Línea de trabajo
Read contracts/milestones/src/test.rs and inspect the existing set_treasury tests and authorization mocks. Add a positive test mocking only the admin and a negative test using another address, then run the milestones contract tests and verify the unauthorized call fails with the host auth error. A linked open pull request (#582) indicates this work may already be underway.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Every milestones test that calls set_treasury runs under env.mock_all_auths(), which authorises every address. No test uses targeted env.mock_auths(&[MockAuth { address: <admin>, invoke: … fn_name: "set_treasury" … }]) or checks that a call signed by a different address fails. (In contracts/milestones/src/test.rs, targeted mocks exist only for no function at all.) If the require_auth() call were deleted or pointed at the wrong address, the suite would still pass. Escrow's equivalent test exists (though it currently fails, see the separate issue).
Suggested fix
Add a positive test that mocks only the admin's auth for set_treasury, and a negative test that mocks another address's auth and asserts the host auth error.
Related: #50
- Lenguaje dominante
- Rust
- Estrellas
- 1
- Forks
- 102
- Merge medio
- 4 h 12 min
- PR fusionados (30 d)
- 30
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MergeFi/contracts
-
allocations map retains released issues — phantom ledger driftQuizá libre de nuevo @PINYOPATTANAWASANPORN la tomó hace 12 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
MergeFi/contracts#608 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
escrow::contribute and milestones::contribute accept new funds after deadline + GRACE_PERIOD, when anyone can already refund or cancelPosiblemente ocupada @urielit1313-creator la tomó hace 29 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
MergeFi/contracts#568 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Makefile deploy targets deploy the unoptimised .wasm — `stellar contract optimize` writes *.optimized.wasmPosiblemente ocupada @urielit1313-creator la tomó hace 29 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
MergeFi/contracts#567 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
keep_alive never refreshes instance storage, so a contract kept alive only via keep_alive can still archive Admin/Oracle/TreasuryPosiblemente ocupada @urielit1313-creator la tomó hace 29 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
MergeFi/contracts#566 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Regression on closed #254] milestones::deallocate still has no test asserting admin authorizationPosiblemente ocupada @urielit1313-creator la tomó hace 29 días. Abiertosecurity testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
MergeFi/contracts#565 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de MergeFi/contracts
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws/aws-emulator#30 · 1 comentario ·
-
tormach-plasma refusal text with no machine reads "no machine is not declared a plasma machine"Abiertoarea:post bug effort:low P2 source:agent
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Chat images never show without ImageMagick: ffprobe fallback uses an option string ffprobe 9 rejectsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
eliasstravik/herdr-projects#1011 ·
-
design-data-spec
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
adobe/spectrum-design-data#1744 ·
Los mantenedores suelen responder en 1 día