Skip to content

fix(es/22_Call): handle failed low-level getX calls - #946

Open
buyua9 wants to merge 1 commit into
AmazingAng:mainfrom
buyua9:fix/es-call-getx-failure-guard
Open

fix(es/22_Call): handle failed low-level getX calls#946
buyua9 wants to merge 1 commit into
AmazingAng:mainfrom
buyua9:fix/es-call-getx-failure-guard

Conversation

@buyua9

@buyua9 buyua9 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Handle failed low-level getX() calls before decoding return data.
  • Emit Response(false, data) and return an explicit fallback value on failure; decode only successful return data.

Why

The Spanish tutorial's callGetX() ignored the success flag and unconditionally decoded data. A failed low-level call can return an invalid or empty buffer, causing a generic decode revert instead of demonstrating an explicit failure path.

Validation

  • git diff --check and failure-branch assertions passed.
  • npx solc@0.8.34 --base-path . --bin Languages/es/22_Metodo_llamar_es/Call.sol passed with the existing payable-fallback warning.
  • codespell reported no findings.
  • Strict pr-value gate: R=88, L=100, p_submit_worthy=0.9977.

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.

1 participant