setPeer 一回性ロックの差分検証 — 改ざん可、ブラウザ内で完結setPeer once-only lock — differential, tamperable, in your browser v2
所有者を from に置いて setPeer をシミュレート(eth_call=読み取りのみ・送金もtxも無し)。配線済み eid は所有者でも revert/未配線は成功という差分を確かめます。
下の from を編集できます。所有者でないアドレスにすると未配線も revert に変わり、差分が from に依存していると分かります。「わざと壊す」で全期待を反転すれば実際に赤くなります。Puts the owner in from and simulates setPeer (eth_call = read-only; no funds, no tx). It checks the differential: a wired eid reverts even for the owner, while an unset one succeeds.
You can edit from below. With a non-owner address the unset one reverts too — showing the differential depends on from. Sanity-break inverts all expectations and actually turns it red.
方法A(おすすめ):下の「検証する」を押すだけ。setPeer を所有者 from でシミュレートし、配線済み=revert/未配線=成功 の判定まで完結します。「わざと壊す」で実際に赤くなることも確認できます。Method A (recommended): just press Verify. It simulates setPeer with the owner as from and judges wired=revert/unset=success in one step. Sanity-break confirms it really goes red.
方法B:コマンドで確認(自分のノードで完結・貼り付け不要)Method B: confirm via command (all on your own node, no paste)
自動取得(方法A)が拡張機能などで塞がれても、ノードで実行して出力を期待値と見比べるだけで確認できます。下の ethers をノードで実行してください。Even if auto-fetch (Method A) is blocked by an extension, you can run it on your node and compare the output against expectations. Run the ethers command below on your node.
所有者を --from に置くだけ(送金なし)。配線済みは execution reverted、未配線だけ成功すれば、per-eid の一回性ロックが所有者にさえ効いている証拠。Just put the owner in --from (no funds sent). Wired ones show execution reverted; if only the unset one succeeds, the per-eid once-only lock holds even against the owner.
ethers v6(自分のノードの client ディレクトリで実行・先頭の cd は自分のパスに置き換え)ethers v6 (run in your node’s client dir — replace the leading cd with your own path):
cd /var/www/あなたのドメインyour-domain/client node -e 'const {ethers}=require("ethers");const OW="0xF71338f3eAa483aA66125598B09BA1988e694a95";const P={base:new ethers.JsonRpcProvider("https://base-sepolia-rpc.publicnode.com"),sep:new ethers.JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com")};const abi=["function setPeer(uint32,bytes32)"];const peer="0x0000000000000000000000000000000000000000000000000000000000000001";const T=[["base","0x0c3e245f3939B4D9f30e088988dD9D7C8F86b11d",40161,"wired"],["base","0x8195A9a8a97658672d5384e19a763804D6E16639",40231,"wired"],["base","0x3b2A9ac4f274eE6E73CbAD198F80f455e70C3C05",40231,"wired"],["sep","0x9fcbb3d6880cD3293F1a731Fe6c958a6621a74bF",40245,"wired"],["sep","0x9fcbb3d6880cD3293F1a731Fe6c958a6621a74bF",40231,"wired"],["base","0x3b2A9ac4f274eE6E73CbAD198F80f455e70C3C05",40267,"unset"]];(async()=>{for(const [c,a,eid,kind] of T){try{await new ethers.Contract(a,abi,P[c]).setPeer.staticCall(eid,peer,{from:OW});console.log(kind,eid,"success(openable)");}catch(e){console.log(kind,eid,"revert(locked)");}}})();'
・setPeer(uint32,bytes32)=0x3400288b。data = セレクタ + eid(32) + peer(32, 0x..01)。
・配線済み eid は override の onlyOnce が先に効くので誰から撃っても revert。未配線は onlyOnce を通過し基底の onlyOwner に到達するため、from=所有者で初めて成功(openable)が見えます。
・独立性:ソース可読・判定は revert/成功の分類のみ・from と RPC(CLI)は差し替え可。「わざと壊す」で実際に赤くなります。setPeer(uint32,bytes32)=0x3400288b. data = selector + eid(32) + peer(32, 0x..01).
For a wired eid, the override’s onlyOnce fires first, so it reverts no matter who calls. An unset eid passes onlyOnce and reaches the base onlyOwner, so success (openable) appears only when from = the owner.
Independence: readable source; the check is only revert-vs-success classification; from and RPC (CLI) are swappable. Sanity-break actually turns it red.