バイトコード一致の検証 — 編集・改ざん可、ブラウザ内で完結Bytecode-match verification — editable & tamperable, in your browser v5
公開ソースから実コードを取得 → 12 個の immutable 領域をゼロ化 → keccak256 → 正準ハッシュと照合。
下の値はすべて編集できます。違う値にすれば✗。つまり結果は固定(always-pass)ではありません。Fetch the live code from the public source → zero out 12 immutable regions → keccak256 → compare against the canonical hash.
Every value below is editable. Change any and it turns ✗ — the result is not hardcoded to pass.
方法A(おすすめ):下の「検証する」を押すだけ。コードを自動取得し、ハッシュ照合までその場で完結します(貼り付け不要)。Method A (recommended): just press Verify below. It fetches the code and checks the hash in one step (no paste needed).
自動取得(方法A)が拡張機能などで塞がれる場合の、ノード側の方法です。下の2つは別々のやり方で、手順の順番ではありません。Node-side options if auto-fetch (Method A) is blocked by an extension. The two below are separate methods, not sequential steps.
方法B:自分のノードで完結(貼り付け不要)Method B: all on your own node (no paste)
先頭の cd を自分のノードの client ディレクトリのパスに置き換えて実行するとハッシュが表示されます。それが期待ハッシュ 0x050b3a9f…931caf と一致すれば、そこで検証完了です。このページに貼る必要はありません。Replace the leading cd with your own node’s client-dir path and run it; it prints a hash. If that equals the expected hash 0x050b3a9f…931caf, verification is complete right there — nothing to paste here.
cd /var/www/あなたのドメインyour-domain/client node -e 'const {ethers}=require("ethers");const p=new ethers.JsonRpcProvider("https://base-sepolia-rpc.publicnode.com");const OFF=[386,3070,3628,4280,4499,9127,10432,10793,11631,13965,14423,15174];(async()=>{const code=await p.getCode("0x5674e4658b988Ed9337DD0CAa493C6aA908006af");const b=ethers.getBytes(code);for(const s of OFF){for(let i=0;i<32;i++)b[s+i]=0;}console.log(ethers.keccak256(b));})();'
→ 出力が 0x050b3a9f…931caf と一致すれば OK。ここで完結します(貼り付け不要)。→ If the output equals 0x050b3a9f…931caf, you are done. Complete here (no paste).
方法C:生コードを取得して、このページに貼るMethod C: fetch the raw code and paste it here
コマンドでバイトコード本体(長い 0x6080…・約16,000バイト)を取得し、それを下の欄に貼って照合します。貼るのはハッシュではなく、コード本体です。Use the command to fetch the bytecode body (the long 0x6080…, ~16,000 bytes) and paste it below. Paste the code body, not the hash.
curl -s https://base-sepolia-rpc.publicnode.com -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["0x5674e4658b988Ed9337DD0CAa493C6aA908006af","latest"]}'
出てきた長い 0x6080…(コード本体)を貼り付け:Paste the long 0x6080… (the code body) that comes out:
注:keccak の計算はページ内の JS なので Network には出ません。そこは「生コードをコピー → 自分でハッシュ」または下の CLI で裏取りできます。Note: the keccak step runs in-page (not in Network). Verify it by copying the raw code and hashing it yourself, or via the CLI.
・自動で試す公開ソース(上から順に):
base-sepolia.blockscout.com (GET) → publicnode → drpc → sepolia.base.org。RPC 欄に自分のノードを入れればそれが最優先。
・期待値(正準ハッシュ)は公開ソースをコンパイル&正規化して別個に導けます(デプロイ済みコードとは独立)。ツールは「デプロイ済み == 期待値」を見るだけ。
・keccak は標準の js-sha3 を内蔵(外部読み込み無し)。比較式・オフセット・期待値はすべて画面上で編集でき、ソースも読めます。Public sources tried in order:
base-sepolia.blockscout.com (GET) → publicnode → drpc → sepolia.base.org. Put your own node in the RPC field to take priority.
The expected (canonical) hash derives independently by compiling & normalizing the public source (independent of the deployed code). The tool only checks “deployed == expected”.
keccak is the bundled standard js-sha3 (no external load). The comparison, offsets and expected value are all editable on screen, and the source is inspectable.