PageSourceSearch

https://gamepad.co/assets/resolveImplementation-BQ-ZB3AN.js

js gamepad.co collected 2026-10-08 13:48:28 UTC 2,220 bytes, 1 lines download raw bytes

1import{h as p,aq as d,O as l,ar as c,am as f,r as u}from"./index-BLzIRXdx.js";async function r(e,s){return await e({method:"eth_getStorageAt",params:[p(s.address),s.position,s.blockTag??"latest"]})}function x(e){if(e.startsWith("0x")||(e=`0x${e}`),e.startsWith("0x363d3d373d3d3d363d73"))return`0x${e.slice(22,62)}`;if(e.startsWith("0x36603057343d5230"))return`0x${e.slice(122,162)}`;if(e.startsWith("0x3d3d3d3d363d3d37363d73"))return`0x${e.slice(24,64)}`;if(e.startsWith("0x366000600037611000600036600073"))return`0x${e.slice(32,72)}`;if(e.startsWith("0x36600080376020600036600073"))return`0x${e.slice(28,68)}`;if(e.startsWith("0x365f5f375f5f365f73"))return`0x${e.slice(20,60)}`;if(e.length===48&&e.startsWith("0xef0100"))return`0x${e.slice(8,48)}`}const o="0x0000000000000000000000000000000000000000",A="0x0000000000000000000000000000000000000000000000000000000000000000";async function y(e){const[s,t]=await Promise.all([d(e),g(e)]),i=x(s);if(i)return{address:i,bytecode:await d(l({...e,address:i}))};t&&t!==o&&(e=l({...e,address:t}));const a=await Promise.all([h(e),$(e)]);for(const n of a)if(n&&c(n)&&n!==o){const m=await d({...e,address:n});return m==="0x"?{address:e.address,bytecode:s}:{address:n,bytecode:m}}return{address:e.address,bytecode:s}}async function g(e){const s=f({chain:e.chain,client:e.client});try{const t=await r(s,{address:e.address,position:"0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50"});return t.length>=40?`0x${t.slice(-40)}`:void 0}catch{return}}async function h(e){const s=f({chain:e.chain,client:e.client});try{const t=[r(s,{address:e.address,position:"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"}),r(s,{address:e.address,position:"0xbaab7dbf64751104133af04abc7d9979f0fda3b059a322a8333f533d3f32bf7f"}),r(s,{address:e.address,position:"0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"})],a=(await Promise.all(t)).find(n=>n!==A);return a?`0x${a.slice(-40)}`:o}catch{return}}const S={inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"};async function $(e){try{return await u({contract:e,method:S})}catch{return}}export{y as resolveImplementation};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.