Skip to content

docs(abi): demonstrate abi.encodePacked boundary collision#910

Open
yuyua9 wants to merge 1 commit into
AmazingAng:mainfrom
yuyua9:docs/abi-encode-packed-collision
Open

docs(abi): demonstrate abi.encodePacked boundary collision#910
yuyua9 wants to merge 1 commit into
AmazingAng:mainfrom
yuyua9:docs/abi-encode-packed-collision

Conversation

@yuyua9

@yuyua9 yuyua9 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this (这是什么类型的PR)

  • Typo(勘误)
  • BUG(程序错误)
  • Improvement(提升)
  • Feature(新特性)

Which issue(s) this PR fixes(Optional) (这个PR 修复了什么问题 (可选择))

  • resolve: #

What this PR does / Why we need it (这个PR 做了什么/ 我们为什么需要这个PR)

Adds a runnable abi.encodePacked boundary-collision example to the ABI encoding lesson. The example shows that ("ab", "c") and ("a", "bc") produce the same packed bytes, and contrasts it with abi.encode, which preserves boundaries for dynamic values.

This makes the existing warning concrete and gives readers a safe alternative when hashing multiple dynamic parameters.

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