|
33 | 33 | DEMO_PK = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" # well-known hardhat key #1 |
34 | 34 | DEMO_ADDR = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" |
35 | 35 |
|
36 | | -REAL_TX = "0x6fd6c6073b5d4afe09f8ab12171332177c8c8a90c4a075f98953b0aaa5a1e19b" |
| 36 | +REAL_TX = "0xecb5ab20f66ca0183127d0f4309326310b01b0ab4319f2c4f7f7222e579905b9" |
37 | 37 |
|
38 | 38 | # Injected EIP-1193 provider. Uses the page's own loaded `ethers` to sign. |
39 | 39 | INJECT = """ |
@@ -99,15 +99,30 @@ async def record() -> Path: |
99 | 99 | await page.add_init_script(INJECT) |
100 | 100 | await page.goto(BUY_URL, wait_until="networkidle") |
101 | 101 | await asyncio.sleep(2) |
102 | | - # pick base tier (cheapest) for the demo |
103 | | - await page.click('.tier[data-tier="base"]') |
| 102 | + # pick full scan tier (richest, most human-readable payload) |
| 103 | + await page.click('.tier[data-tier="full_scan"]') |
104 | 104 | await asyncio.sleep(1.2) |
105 | 105 | await page.click("#btnConnect") |
106 | 106 | await asyncio.sleep(2.2) # connection + step 1 |
107 | 107 | await page.click("#btnBuy") |
108 | 108 | # signing pause + fetch + result render |
109 | 109 | await page.wait_for_selector("#resultCard:not(.hide)", timeout=20000) |
110 | | - await asyncio.sleep(3.5) # let the summary + result breathe |
| 110 | + await asyncio.sleep(2.0) |
| 111 | + # expand the raw payload so judges see the full signed feed |
| 112 | + try: |
| 113 | + await page.evaluate("document.querySelector('details').open = true") |
| 114 | + except Exception: |
| 115 | + pass |
| 116 | + await asyncio.sleep(1.0) |
| 117 | + # slow scroll through the rich result (summary + narratives + payload) |
| 118 | + rh = await page.evaluate("document.body.scrollHeight - window.innerHeight") |
| 119 | + rsteps = 30 |
| 120 | + for i in range(rsteps + 1): |
| 121 | + await page.evaluate(f"window.scrollTo({{top:{int(rh*i/rsteps)}, behavior:'instant'}})") |
| 122 | + await asyncio.sleep(6 / rsteps) |
| 123 | + await asyncio.sleep(2.0) |
| 124 | + await page.evaluate("window.scrollTo({top:0, behavior:'instant'})") |
| 125 | + await asyncio.sleep(1.5) |
111 | 126 |
|
112 | 127 | # ── Segment 3: settlement proof slate ──────────────────────────── |
113 | 128 | await page.evaluate(SLATE_JS, REAL_TX) |
@@ -136,7 +151,7 @@ async def record() -> Path: |
136 | 151 | <div style="color:#848e9c;font-size:18px;margin-bottom:36px"> |
137 | 152 | x402 EIP-3009 settlement — buyer signs gasless, NRI redeems on-chain</div> |
138 | 153 | <div style="font-size:16px;line-height:2"> |
139 | | - <div><span style="color:#848e9c">Token </span> 0.01 U · United Stables</div> |
| 154 | + <div><span style="color:#848e9c">Token </span> 0.1 U · United Stables</div> |
140 | 155 | <div><span style="color:#848e9c">To </span> NRI 0x7D93…72C1 (agent 129156)</div> |
141 | 156 | <div><span style="color:#848e9c">Buyer </span> paid 0 gas — just a signature</div> |
142 | 157 | </div> |
|
0 commit comments