Solidity: Validate user-supplied option strings at build entry points

オープン
#804 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #897 @ninglinLiu による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
solidity, typescript

調査の方向性

まず、WIP ブランチ validateSolidityStrings と、solidity パッケージでのその検証を確認します。次に、エントリーポイント buildERC20/buildERC721 と、confidential buildERC7984 および uniswap-hooks buildHooks パッケージを調べます。Solidity を生成する前に、各 build 境界が指定された無効な文字を OptionsError で拒否すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Some characters in user-supplied option strings (name, symbol, uri) can't round-trip cleanly through generated Solidity contracts — ASCII control characters, Unicode line terminators recognised by Solidity's lexer (NEL, LS, PS, VT, FF), and lone UTF-16 surrogates. Today, some of these slip through and produce non-compiling Solidity or contracts that store unexpected bytes.

Add input validation at each build entry point (buildERC20, buildERC721, etc.) to reject these characters with an OptionsError, so the failure surfaces at the build boundary rather than downstream.

A WIP here covers the solidity package. The confidential (buildERC7984) and uniswap-hooks (buildHooks) packages need the same treatment.

主要言語
TypeScript
スター
296
フォーク
188
平均マージ
3時間 24分
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenZeppelin/contracts-wizard のほかの issue

OpenZeppelin/contracts-wizard の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。