Reading from NEAR testnet…
Reading from NEAR testnet…
F2AM8xuisWeBFANAPXZAMq3Rq2m3eGaTukb6haipuBr6
sarin.testnet to v1.social08.testnet
set()
{
"data": {
"sarin.testnet": {
"widget": {
"lite.Home.Chart": {
"": "let HomeChartSkeleton = window?.HomeChartSkeleton || (() => <></>);\nconst Chart = () => {\n let { apiFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n if (!apiFetch || !formatNumber) return <HomeChartSkeleton />;\n const [charts, setCharts] = useState(null);\n useEffect(() => {\n if (apiFetch) {\n apiFetch(`https://api-testnet.nearblocks.io/v1/charts/latest`)\n .then((response) => setCharts(response?.charts))\n .catch(console.log);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const srcDoc = useMemo(() => {\n let series = [];\n let categories = [];\n if (charts?.length) {\n series = charts?.map((chart) => ({\n date: new Date(chart.date).toLocaleDateString(\"en-US\", {\n day: \"numeric\",\n month: \"short\",\n weekday: \"long\",\n year: \"numeric\",\n }),\n price: `$${formatNumber(chart.near_price ?? \"0\", 2)}`,\n txns: formatNumber(chart.txns, 0),\n y: Number(chart.txns),\n }));\n series.reverse();\n categories = series.map((stat) => stat.date);\n }\n return `\n <html>\n <head>\n <title>Highcharts Line Chart</title>\n <script src=\"https://cdn.jsdelivr.net/npm/highcharts@11.4.3/highcharts.min.js\"></script>\n </head>\n <body style=\"margin: 0\">\n <div id=\"container\" style=\"width: 100%; height: 280px\"></div>\n <script>\n document.addEventListener(\"DOMContentLoaded\", function () {\n Highcharts.chart(\"container\", {\n chart: {\n spacingTop: 0,\n spacingBottom: 0,\n spacingLeft: 0,\n spacingRight: 0,\n backgroundColor: \"transparent\"\n },\n title: {\n text: undefined,\n },\n xAxis: {\n visible: false,\n categories: ${JSON.stringify(categories)},\n },\n yAxis: {\n visible: false,\n },\n series: [\n {\n name: \"Transactions\",\n type: \"spline\",\n data: ${JSON.stringify(series)},\n lineWidth: 3\n },\n ],\n tooltip: {\n formatter: function () {\n return '<span style=\"font-size:10px\">' + this.point.date + '</span><br/>${\n context.networkId === \"testnet\"\n ? \"\"\n : \"Price: <b>' + this.point.price + '</b><br/>\"\n }Transactions: <b>' + this.point.txns + '</b>'\n }\n },\n legend: {\n enabled: false,\n },\n plotOptions: {\n spline: {\n marker: {\n radius: 0,\n states: {\n hover: {\n radius: 4\n }\n }\n },\n },\n },\n exporting: {\n enabled: false,\n },\n credits: {\n enabled: false,\n },\n });\n });\n </script>\n </body>\n </html>\n `;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [charts]);\n return (\n <div className=\"flex flex-col pt-4 pb-6\">\n <iframe\n className=\"w-full overflow-hidden border-none\"\n srcDoc={srcDoc}\n style={{ height: 280 }}\n />\n </div>\n );\n};\nreturn Chart(props);\n"
},
"lite.Block": {
"": "let BlockSkeleton = window?.BlockSkeleton || (() => <></>);\nlet Skeleton = window?.Skeleton || (({ children }) => <>{children}</>);\nconst Block = ({ hash, rpcUrl }) => {\n let { rpcFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { nsToDateTime, yoctoToNear, yoctoToTgas } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { shortenString } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (\n !rpcFetch ||\n !nsToDateTime ||\n !yoctoToNear ||\n !yoctoToTgas ||\n !formatNumber ||\n !shortenString\n )\n return <BlockSkeleton />;\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(true);\n const [block, setBlock] = useState(null);\n useEffect(() => {\n if (rpcFetch && rpcUrl && hash) {\n const blockId = !isNaN(Number(hash)) ? Number(hash) : hash;\n rpcFetch(rpcUrl, \"block\", { block_id: blockId })\n .then((response) => setBlock(response))\n .catch(setError)\n .finally(() => setLoading(false));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hash, rpcUrl]);\n const gas = useMemo(() => {\n let limit = 0;\n let used = 0;\n let fee = \"0\";\n if (block) {\n limit = block.chunks.reduce((acc, curr) => acc + curr.gas_limit, 0);\n used = block.chunks.reduce((acc, curr) => acc + curr.gas_used, 0);\n fee = Big(used).mul(Big(block.header.gas_price)).toString();\n }\n return { fee, limit, used };\n }, [block]);\n if (error) {\n return (\n <Widget\n key=\"error\"\n props={{ title: \"Error Fetching Block\" }}\n src={`sarin.testnet/widget/lite.Atoms.Error`}\n />\n );\n }\n return (\n <div className=\"relative container mx-auto\">\n <div className=\"pt-7 pb-[26px] px-5\">\n <Skeleton className=\"block h-[54px] w-56\" loading={loading}>\n <h1 className=\"flex items-center font-heading font-medium text-[36px] tracking-[0.1px] mr-4\">\n {formatNumber(String(block?.header.height ?? 0), 2)}\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-3\",\n className: \"text-primary w-6\",\n text: String(block?.header.height),\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </h1>\n </Skeleton>\n </div>\n <div className=\"flex flex-wrap\">\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Hash</h2>\n <Skeleton\n className=\"block h-[39px] w-48 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: shortenString(block?.header.hash ?? \"\"),\n tooltip: block?.header.hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-1\",\n className: \"text-primary w-4\",\n text: block?.header.hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Time</h2>\n <Skeleton\n className=\"block h-[39px] w-60 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[24px]\">\n {nsToDateTime(\n block?.header.timestamp_nanosec ?? \"0\",\n \"DD/MM/YY hh:mm:ss AA\"\n )}\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Author</h2>\n <Skeleton\n className=\"block h-[39px] w-52 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link href={`/address/${block?.author}`}>\n {shortenString(block?.author ?? \"\")}\n </Link>\n ),\n tooltip: block?.author,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-1\",\n className: \"text-primary w-4\",\n text: block?.author,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Gas Used</h2>\n <Skeleton\n className=\"block h-[39px] w-32 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToTgas(String(gas.used)), 0)} Tgas\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Gas Price</h2>\n <Skeleton\n className=\"block h-[39px] w-48 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToTgas(block?.header.gas_price ?? \"0\"), 4)} Ⓝ /\n Tgas\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Gas Limit</h2>\n <Skeleton\n className=\"block h-[39px] w-36 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToTgas(String(gas.limit)), 0)} Tgas\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Gas Fee</h2>\n <Skeleton\n className=\"block h-[39px] w-36 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToNear(gas.fee), 6)} Ⓝ\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Shards</h2>\n <Skeleton\n className=\"block h-[39px] w-10 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n {block?.header.chunks_included ?? 0}\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Parent Hash</h2>\n <Skeleton\n className=\"block h-[39px] w-48 overflow-hidden\"\n loading={loading}\n >\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link href={`/blocks/${block?.header.prev_hash}`}>\n {shortenString(block?.header.prev_hash ?? \"\")}\n </Link>\n ),\n tooltip: block?.header.prev_hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-1\",\n className: \"text-primary w-4\",\n text: block?.header.prev_hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </div>\n </Skeleton>\n </div>\n </div>\n </div>\n );\n};\nreturn Block(props);\n"
},
"lite.Address": {
"": "let AddressSkeleton = window?.AddressSkeleton || (() => <></>);\nlet AddressKeysSkeleton = window?.AddressKeysSkeleton || (() => <></>);\nlet Skeleton = window?.Skeleton || (({ children }) => <>{children}</>);\nconst Address = ({ id, rpcUrl }) => {\n let { apiFetch, rpcFetch } = VM.require(\n `sarin.testnet/widget/lite.libs.fetcher`\n );\n let { yoctoToNear } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber, formatSize } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n if (!apiFetch || !rpcFetch || !yoctoToNear || !formatNumber || !formatSize)\n return <AddressSkeleton />;\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState({\n address: true,\n stats: true,\n });\n const [stats, setStats] = useState(null);\n const [address, setAddress] = useState(null);\n const ACCOUNT_CODE_HASH = \"11111111111111111111111111111111\";\n const value = formatNumber(\n Big(yoctoToNear(address?.amount ?? \"0\"))\n .mul(stats?.near_price ?? \"0\")\n .toString(),\n 2\n );\n useEffect(() => {\n if (rpcFetch && rpcUrl && id) {\n rpcFetch(rpcUrl, \"query\", {\n account_id: id,\n finality: \"final\",\n request_type: \"view_account\",\n })\n .then((response) => setAddress(response))\n .catch(setError)\n .finally(() => setLoading((state) => ({ ...state, address: false })));\n }\n if (apiFetch) {\n apiFetch(`https://api-testnet.nearblocks.io/v1/stats`)\n .then((response) => setStats(response?.stats?.[0]))\n .catch(console.log)\n .finally(() => setLoading((state) => ({ ...state, stats: false })));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [id, rpcUrl]);\n if (error) {\n return (\n <Widget\n key=\"error\"\n props={{ title: \"Error Fetching Address\" }}\n src={`sarin.testnet/widget/lite.Atoms.Error`}\n />\n );\n }\n return (\n <div className=\"relative container mx-auto\">\n <div className=\"pt-7 pb-[26px] px-5\">\n <Skeleton className=\"block h-[54px] w-full\" loading={loading.address}>\n <h1 className=\"flex items-center font-heading font-medium text-[36px] tracking-[0.1px] mr-4\">\n <span className=\"truncate\">{id}</span>\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-3\",\n className: \"text-primary w-6\",\n text: id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </h1>\n </Skeleton>\n </div>\n <div className=\"flex flex-wrap\">\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Balance</h2>\n <Skeleton className=\"block h-[39px] w-32\" loading={loading.address}>\n <p className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToNear(address?.amount ?? \"0\"), 2)} Ⓝ\n </p>\n </Skeleton>\n </div>\n {context.networkId === \"mainnet\" && (\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Value</h2>\n <Skeleton\n className=\"block h-[39px] w-32\"\n loading={loading.address || loading.stats}\n >\n <p className=\"font-heading font-medium text-[26px]\">${value}</p>\n </Skeleton>\n </div>\n )}\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Validator Stake</h2>\n <Skeleton className=\"block h-[39px] w-32\" loading={loading.address}>\n <p className=\"font-heading font-medium text-[26px]\">\n {formatNumber(yoctoToNear(address?.locked ?? \"0\"), 2)} Ⓝ\n </p>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Storage Used</h2>\n <Skeleton className=\"block h-[39px] w-32\" loading={loading.address}>\n <p className=\"font-heading font-medium text-[26px]\">\n {formatSize(String(address?.storage_usage ?? 0), 2)}\n </p>\n </Skeleton>\n </div>\n {context.networkId === \"mainnet\" && (\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Type</h2>\n <Skeleton className=\"block h-[39px] w-28\" loading={loading.address}>\n <p className=\"font-heading font-medium text-[24px]\">\n {address?.code_hash === ACCOUNT_CODE_HASH\n ? \"Account\"\n : \"Contract\"}\n </p>\n </Skeleton>\n </div>\n )}\n </div>\n <div className=\"bg-bg-box lg:rounded-xl shadow mt-8\">\n <div className=\"pt-4 pb-6 mx-6\">\n <button className=\"font-medium border-b-[3px] border-text-body py-1 mr-4\">\n Access Keys\n </button>\n </div>\n <Widget\n key=\"keys\"\n loading={<AddressKeysSkeleton />}\n props={{ id, rpcUrl }}\n src={`sarin.testnet/widget/lite.Address.Keys`}\n />\n </div>\n </div>\n );\n};\nreturn Address(props);\n"
},
"lite.Txn.Tabs": {
"": "let tabs = [0];\nlet TxnTabsSkeleton = window?.TxnTabsSkeleton || (() => <></>);\nlet TxnExecutionSkeleton = window?.TxnExecutionSkeleton || (() => <></>);\nconst Tabs = ({ hash, rpcUrl }) => {\n let { rpcFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { nestReceipts, parseOutcome, parseReceipt } = VM.require(\n `sarin.testnet/widget/lite.libs.execution`\n );\n if (!rpcFetch || !nestReceipts || !parseOutcome || !parseReceipt)\n return <TxnTabsSkeleton />;\n const [active, setActive] = useState(tabs[0]);\n const [data, setData] = useState({});\n const [error, setError] = useState({});\n const [loading, setLoading] = useState({});\n useEffect(() => {\n if (rpcFetch && rpcUrl && hash && active === 0) {\n setLoading((prev) => ({ ...prev, [active]: true }));\n rpcFetch(rpcUrl, \"EXPERIMENTAL_tx_status\", {\n sender_account_id: \"bowen\",\n tx_hash: hash,\n wait_until: \"NONE\",\n })\n .then((response) => {\n const blocksMap = response.receipts_outcome.reduce(\n (map, row) =>\n map.set(row.block_hash, {\n hash: row.block_hash,\n height: 0,\n timestamp: 0,\n }),\n new Map()\n );\n const receiptsMap = response.receipts_outcome.reduce(\n (mapping, receiptOutcome) => {\n const receipt = parseReceipt(\n response.receipts.find(\n (rpcReceipt) => rpcReceipt.receipt_id === receiptOutcome.id\n ),\n receiptOutcome,\n response.transaction\n );\n return mapping.set(receiptOutcome.id, {\n ...receipt,\n outcome: parseOutcome(receiptOutcome, blocksMap),\n });\n },\n new Map()\n );\n setData((state) => ({\n ...state,\n [active]: nestReceipts(\n response.transaction_outcome.outcome.receipt_ids[0],\n receiptsMap\n ),\n }));\n })\n .catch((err) => setError((state) => ({ ...state, [active]: err })))\n .finally(() => setLoading((state) => ({ ...state, [active]: false })));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hash, active, data]);\n return (\n <div className=\"bg-bg-box lg:rounded-xl shadow px-6 mt-8\">\n <div className=\"pt-4 pb-6\">\n {tabs.map((tab) => (\n <button\n className={`py-1 mr-4 ${\n active === tab\n ? \"font-medium border-b-[3px] border-text-body\"\n : \"text-text-label\"\n }`}\n key={tab}\n onClick={() => setActive(tab)}\n >\n {tab === 0 && \"Execution Plan\"}\n </button>\n ))}\n </div>\n <div className=\"lg:px-4 pb-6\">\n {error[active] ? (\n <Widget\n key=\"error\"\n props={{ title: \"Error Fetching Txn Details\" }}\n src={`sarin.testnet/widget/lite.Atoms.Error`}\n />\n ) : loading[active] ? (\n <>{active === 0 && <TxnExecutionSkeleton />}</>\n ) : (\n <>\n {active === 0 && (\n <Widget\n key=\"execution\"\n loading={<TxnExecutionSkeleton />}\n props={{ receipt: data[active] }}\n src={`sarin.testnet/widget/lite.Txn.Execution`}\n />\n )}\n </>\n )}\n </div>\n </div>\n );\n};\nreturn Tabs(props);\n"
},
"lite.Atoms.Copy": {
"": "const Copy = ({ buttonClassName, className, text }) => {\n const [copied, setCopied] = useState(false);\n const onCopy = () => {\n clipboard.writeText(text);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n };\n return (\n <button className={buttonClassName} onClick={onCopy}>\n {copied ? (\n <Widget\n key=\"check-icon\"\n props={{ className }}\n src={`sarin.testnet/widget/lite.Icons.Check`}\n />\n ) : (\n <Widget\n key=\"copy-icon\"\n props={{ className }}\n src={`sarin.testnet/widget/lite.Icons.Copy`}\n />\n )}\n </button>\n );\n};\nreturn Copy(props);\n"
},
"lite.Address.Keys": {
"": "let Skeleton = window?.Skeleton || (({ children }) => <>{children}</>);\nlet AddressKeysSkeleton = window?.AddressKeysSkeleton || (() => <></>);\nconst LIMIT = 25;\nconst Keys = ({ id, rpcUrl }) => {\n let { rpcFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { yoctoToNear } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { shortenString } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (!rpcFetch || !yoctoToNear || !formatNumber || !shortenString)\n return <AddressKeysSkeleton />;\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(true);\n const [keys, setKeys] = useState([]);\n const [page, setPage] = useState(1);\n const pages = Math.ceil(keys.length / LIMIT);\n const start = (page - 1) * LIMIT;\n const end = start + LIMIT;\n const items = keys?.slice(start, end);\n useEffect(() => {\n if (rpcFetch && rpcUrl && id) {\n setLoading(true);\n rpcFetch(rpcUrl, \"query\", {\n account_id: id,\n finality: \"final\",\n request_type: \"view_access_key_list\",\n })\n .then((response) => {\n const keys = response.keys.map((key) => {\n const publicKey = key.public_key;\n let access = \"FULL\";\n let contract = \"\";\n let methods = \"\";\n let allowance = \"\";\n if (key.access_key.permission !== \"FullAccess\") {\n const keyView = key.access_key.permission.FunctionCall;\n access = \"LIMITED\";\n contract = keyView.receiver_id;\n methods = keyView.method_names?.length\n ? keyView.method_names.join(\", \")\n : \"Any\";\n allowance = keyView.allowance;\n }\n return {\n access,\n allowance,\n contract,\n methods,\n publicKey,\n };\n });\n if (keys.length) {\n setKeys(keys);\n }\n })\n .catch(setError)\n .finally(() => setLoading(false));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [id]);\n const onPrev = () => {\n setPage((prevPage) => Math.max(prevPage - 1, 1));\n };\n const onNext = () => {\n setPage((prevPage) => Math.min(prevPage + 1, pages));\n };\n return (\n <div className=\"relative overflow-auto\">\n <table className=\"table-auto border-collapse w-full\">\n <thead>\n <tr>\n <th className=\"w-[300px] font-normal text-xs text-text-label uppercase text-left pl-6 pr-4 py-4\">\n Public Key\n </th>\n <th className=\"w-[84px] font-normal text-xs text-text-label uppercase text-left px-4 py-4\">\n Access\n </th>\n <th className=\"w-[160px] font-normal text-xs text-text-label uppercase text-left px-4 py-4\">\n Contract\n </th>\n <th className=\"w-[240px] font-normal text-xs text-text-label uppercase text-left px-4 py-4\">\n Methods\n </th>\n <th className=\"w-[112px] font-normal text-xs text-text-label uppercase text-left pl-4 pr-6 py-4\">\n Allowance\n </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td className=\"px-6\" colSpan={5}>\n <span className=\"block w-full border-b border-b-border-body\" />\n </td>\n </tr>\n {loading ? (\n [...Array(LIMIT).keys()].map((key) => (\n <tr key={key}>\n <td className=\"h-[46px] pl-6 pr-4 py-4\">\n <span className=\"flex\">\n <Skeleton className=\"h-5 w-[190px]\" loading>\n \n </Skeleton>\n </span>\n </td>\n <td className=\"h-[46px] px-4 py-4\">\n <span className=\"flex\">\n <Skeleton className=\"h-5 w-[64px]\" loading>\n \n </Skeleton>\n </span>\n </td>\n <td className=\"h-[46px] px-4 py-4\">\n <span className=\"flex\">\n <Skeleton className=\"h-5 w-[100px]\" loading>\n \n </Skeleton>\n </span>\n </td>\n <td className=\"h-[46px] px-4 py-4\">\n <span className=\"flex\">\n <Skeleton className=\"h-5 w-[160px]\" loading>\n \n </Skeleton>\n </span>\n </td>\n <td className=\"h-[46px] pl-4 pr-6 py-4\">\n <span className=\"flex\">\n <Skeleton className=\"h-5 w-[64px]\" loading>\n \n </Skeleton>\n </span>\n </td>\n </tr>\n ))\n ) : items?.length ? (\n items?.map((key) => (\n <tr className=\"hover:bg-bg-body\" key={key.publicKey}>\n <td className=\"text-sm pl-6 pr-4 py-4\">\n <Widget\n key=\"tooltip\"\n loading={shortenString(key.publicKey, 15)}\n props={{\n children: shortenString(key.publicKey, 15),\n tooltip: (\n <span>\n <span className=\"mr-1\">{key.publicKey}</span>\n <Widget\n key=\"copy\"\n loading={\n <span className=\"block w-4 h-4 truncate\" />\n }\n props={{\n buttonClassName: \"h-4 align-text-bottom\",\n className: \"w-4\",\n text: key.publicKey,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </span>\n ),\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n </td>\n <td className=\"text-xs px-4 py-4\">\n <span className=\"bg-bg-function text-black px-2 py-1 rounded\">\n {key.access}\n </span>\n </td>\n <td className=\"font-medium text-sm px-4 py-4\">\n {key.contract && (\n <Widget\n key=\"tooltip\"\n loading={shortenString(key.contract)}\n props={{\n children: (\n <Link href={`/address/${key.contract}`}>\n {shortenString(key.contract)}\n </Link>\n ),\n tooltip: key.contract,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n )}\n </td>\n <td className=\"text-sm px-4 py-4\">\n <Widget\n key=\"tooltip\"\n loading={\n <span className=\"block w-[200px] truncate\">\n {key.methods}\n </span>\n }\n props={{\n children: (\n <span className=\"block w-[200px] truncate\">\n {key.methods}\n </span>\n ),\n tooltip: key.methods,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n </td>\n <td className=\"text-sm pl-4 pr-6 py-4\">\n {key.allowance\n ? `${formatNumber(yoctoToNear(key.allowance), 4)} Ⓝ`\n : \"\"}\n </td>\n </tr>\n ))\n ) : error ? (\n <tr>\n <td\n className=\"font-medium text-sm text-text-label px-6 py-4\"\n colSpan={5}\n >\n Error fetching access keys\n </td>\n </tr>\n ) : (\n <tr>\n <td\n className=\"font-medium text-sm text-text-label px-6 py-4\"\n colSpan={5}\n >\n No access keys\n </td>\n </tr>\n )}\n </tbody>\n </table>\n <div className=\"px-6\">\n <div className=\"flex items-center justify-between border-t border-t-border-body\">\n <button\n className=\"font-normal text-xs text-text-label uppercase px-2 py-1 rounded mr-4 my-4 border border-border-body hover:text-primary hover:border-primary disabled:opacity-50 disabled:cursor-not-allowed disabled:text-text-label disabled:border-border-body\"\n disabled={page <= 1}\n onClick={onPrev}\n >\n Prev\n </button>\n <div className=\"font-normal text-xs text-text-label uppercase px-2 py-1 mx-4 my-4\">\n Page {page}\n </div>\n <button\n className=\"font-normal text-xs text-text-label uppercase px-2 py-1 rounded ml-4 my-4 border border-border-body hover:text-primary hover:border-primary disabled:opacity-50 disabled:cursor-not-allowed disabled:text-text-label disabled:border-border-body\"\n disabled={page >= pages}\n onClick={onNext}\n >\n Next\n </button>\n </div>\n </div>\n </div>\n );\n};\nreturn Keys(props);\n"
},
"lite.Home.Stats": {
"": "let HomeStatsSkeleton = window?.HomeStatsSkeleton || (() => <></>);\nlet Skeleton = window?.Skeleton || (({ children }) => <>{children}</>);\nconst Stats = () => {\n let { apiFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { formatNumber, formatScale } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { yoctoToTgas } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n if (!apiFetch || !formatNumber || !formatScale || !yoctoToTgas)\n return <HomeStatsSkeleton />;\n const [loading, setLoading] = useState(true);\n const [stats, setStats] = useState(null);\n useEffect(() => {\n if (apiFetch) {\n apiFetch(`https://api-testnet.nearblocks.io/v1/stats`)\n .then((response) => setStats(response?.stats?.[0]))\n .catch(console.log)\n .finally(() => setLoading(false));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (\n <div className=\"lg:flex flex-wrap justify-between px-3 lg:px-0\">\n <div className=\"sm:flex lg:block flex-wrap justify-between lg:min-w-[200px]\">\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] -mb-[5px]\">\n <Skeleton className=\"w-28\" loading={loading}>\n {formatScale(stats?.total_txns ?? \"0\", 2)}\n </Skeleton>\n </p>\n <h3 className=\"font-normal text-[20px]\">Transactions</h3>\n </div>\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] -mb-[5px] sm:text-right lg:text-left\">\n <Skeleton className=\"w-16\" loading={loading}>\n {formatNumber(String(stats?.nodes_online ?? 0), 0)}\n </Skeleton>\n </p>\n <h3 className=\"text-[20px] font-normal sm:text-right lg:text-left\">\n Active Validators\n </h3>\n </div>\n </div>\n {context.networkId === \"mainnet\" && (\n <div className=\"sm:flex lg:block flex-wrap justify-between lg:min-w-[200px]\">\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] -mb-[5px]\">\n <Skeleton className=\"w-28\" loading={loading}>\n ${formatNumber(stats?.near_price ?? \"0\", 2)}\n </Skeleton>\n </p>\n <h3 className=\"text-[20px] font-normal\">Near Price</h3>\n </div>\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] sm:text-right lg:text-left -mb-[5px]\">\n <Skeleton className=\"w-36\" loading={loading}>\n ${formatScale(stats?.market_cap ?? \"0\", 2)}\n </Skeleton>\n </p>\n <h3 className=\"font-normal text-[20px] sm:text-right lg:text-left\">\n Market Cap\n </h3>\n </div>\n </div>\n )}\n <div className=\"sm:flex lg:block flex-wrap justify-between lg:min-w-[200px]\">\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] lg:text-right -mb-[5px]\">\n <Skeleton className=\"w-44\" loading={loading}>\n {formatNumber(yoctoToTgas(stats?.gas_price ?? \"0\"), 4)} Ⓝ\n </Skeleton>\n </p>\n <h3 className=\"font-normal text-[20px] lg:text-right\">\n Gas Price / Tgas\n </h3>\n </div>\n <div className=\"px-3 mb-[42px]\">\n <p className=\"font-heading font-medium text-[39px] tracking-[0.6px] sm:text-right lg:text-right -mb-[5px]\">\n <Skeleton className=\"w-36\" loading={loading}>\n {formatNumber(stats?.avg_block_time ?? \"0\", 4)}s\n </Skeleton>\n </p>\n <h3 className=\"font-normal text-[20px] sm:text-right lg:text-right\">\n Avg. Block Time\n </h3>\n </div>\n </div>\n </div>\n );\n};\nreturn Stats(props);\n"
},
"lite.Txn.Receipt": {
"": "let TxnActionSkeleton = window?.TxnActionSkeleton || (() => <></>);\nlet TxnAddressSkeleton = window?.TxnAddressSkeleton || (() => <></>);\nlet TxnReceiptSkeleton = window?.TxnReceiptSkeleton || (() => <></>);\nconst Receipt = ({\n className,\n convertion,\n expand,\n outgoingReceipts,\n receipt,\n}) => {\n const [open, setOpen] = useState(false);\n useEffect(() => {\n setOpen(expand);\n }, [expand]);\n if (!(\"outcome\" in receipt)) return <TxnReceiptSkeleton />;\n const remainingOutgoingReceipts = outgoingReceipts.slice(0, -1);\n const lastOutgoingReceipt = outgoingReceipts.at(-1);\n const filterRefundReceipts = receipt.outcome.nestedReceipts.filter(\n (nestedReceipt) =>\n \"outcome\" in nestedReceipt && nestedReceipt.predecessorId !== \"system\"\n );\n const nonRefundReceipts = filterRefundReceipts.slice(0, -1);\n const lastNonRefundReceipt = filterRefundReceipts.at(-1);\n return (\n <div className={className}>\n {convertion && (\n <Widget\n key=\"address-1\"\n loading={<TxnAddressSkeleton />}\n props={{ address: receipt.predecessorId }}\n src={`sarin.testnet/widget/lite.Txn.Address`}\n />\n )}\n {lastOutgoingReceipt && (\n <Widget\n key=\"execution-1\"\n loading={<TxnReceiptSkeleton />}\n props={{\n className: \"ml-2 pl-4 border-l border-border-body\",\n convertion: false,\n expand,\n outgoingReceipts: remainingOutgoingReceipts,\n receipt: lastOutgoingReceipt,\n }}\n src={`sarin.testnet/widget/lite.Txn.Receipt`}\n />\n )}\n <div className=\"relative ml-2 mb-3 py-3 px-4\">\n <div className=\"arrow absolute h-full left-0 top-0 border-l border-border-body\" />\n <Widget\n key=\"actions\"\n loading={<TxnActionSkeleton />}\n props={{\n actions: receipt.actions,\n open,\n receipt,\n setOpen,\n }}\n src={`sarin.testnet/widget/lite.Txn.Actions`}\n />\n </div>\n <Widget\n key=\"address-2\"\n loading={<TxnAddressSkeleton />}\n props={{ address: receipt.receiverId }}\n src={`sarin.testnet/widget/lite.Txn.Address`}\n />\n {lastNonRefundReceipt && (\n <Widget\n key=\"execution-2\"\n loading={<TxnReceiptSkeleton />}\n props={{\n convertion: false,\n expand,\n outgoingReceipts: nonRefundReceipts,\n receipt: lastNonRefundReceipt,\n }}\n src={`sarin.testnet/widget/lite.Txn.Receipt`}\n />\n )}\n </div>\n );\n};\nreturn Receipt(props);\n"
},
"lite.Home": {
"": "let HomeChartSkeleton = window?.HomeChartSkeleton || (() => <></>);\nlet HomeStatsSkeleton = window?.HomeStatsSkeleton || (() => <></>);\nconst App = () => {\n return (\n <div className=\"relative container mx-auto\">\n <div className=\"py-[58px] px-6\">\n <h1 className=\"font-heading font-bold text-[49px] tracking-[1px]\">\n Hello, I’m the Near stateless explorer\n </h1>\n <h2 className=\"font-heading font-medium text-[40px] tracking-[0.4px] mt-[-3px]\">\n With me, you can check real-time data on the NEAR blockchain.\n </h2>\n </div>\n <hr className=\"h-px border-0 border-b border-primary/20\" />\n <Widget\n key=\"chart\"\n loading={<HomeChartSkeleton />}\n src={`sarin.testnet/widget/lite.Home.Chart`}\n />\n <Widget\n key=\"stats\"\n loading={<HomeStatsSkeleton />}\n src={`sarin.testnet/widget/lite.Home.Stats`}\n />\n </div>\n );\n};\nreturn App(props);\n"
},
"lite.Txn.Actions": {
"": "let TxnActionSkeleton = window?.TxnActionSkeleton || (() => <></>);\nlet JsonView = window?.JsonView || (({ children }) => <pre>{children}</pre>);\nconst prettify = (args) => {\n try {\n return JSON.stringify(JSON.parse(atob(args)), undefined, 2);\n } catch (error) {\n return args;\n }\n};\nconst Actions = ({ actions, open, receipt, setOpen }) => {\n let { yoctoToNear, yoctoToTgas } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { gasLimit, refund, shortenString } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (\n !yoctoToNear ||\n !yoctoToTgas ||\n !formatNumber ||\n !gasLimit ||\n !refund ||\n !shortenString\n )\n return <TxnActionSkeleton />;\n const [active, setActive] = useState(\"output\");\n const result = useMemo(() => {\n let logs = \"No logs\";\n let status = receipt.outcome.status.receiptId;\n if (receipt.outcome.logs.length) {\n logs = receipt.outcome.logs.join(\"\\n\");\n }\n if (receipt.outcome.status.type === \"successValue\") {\n if (receipt.outcome.status.value.length === 0) {\n status = \"Empty result\";\n } else {\n status = prettify(receipt.outcome.status.value) ?? \"\";\n }\n }\n if (receipt.outcome.status.type === \"failure\") {\n status = prettify(receipt.outcome.status.error);\n }\n return { logs, status };\n }, [receipt]);\n return (\n <>\n <div className=\"space-y-2\">\n {actions.map((action, index) => (\n <Widget\n key={`action-${index}`}\n loading={<TxnActionSkeleton />}\n props={{ action, open, setOpen }}\n src={`sarin.testnet/widget/lite.Txn.Action`}\n />\n ))}\n </div>\n {open && (\n <div className=\"px-4 pt-6\">\n <div>\n <button\n className={` text-sm py-1 mr-4 ${\n active === \"output\"\n ? \"font-medium border-b-[3px] border-text-body\"\n : \"text-text-label\"\n }`}\n onClick={() => setActive(\"output\")}\n >\n Output\n </button>\n <button\n className={` text-sm py-1 mr-4 ${\n active === \"inspect\"\n ? \"font-medium border-b-[3px] border-text-body\"\n : \"text-text-label\"\n }`}\n onClick={() => setActive(\"inspect\")}\n >\n Inspect\n </button>\n </div>\n {active === \"output\" && (\n <div className=\"pt-6\">\n <h3 className=\"text-sm mb-1\">Logs</h3>\n <JsonView className=\"mb-6\">{result.logs}</JsonView>\n <h3 className=\"text-sm mb-1\">Result</h3>\n <JsonView className=\"mb-6\">{result.status}</JsonView>\n </div>\n )}\n {active === \"inspect\" && (\n <div className=\"text-sm pt-6 pb-3\">\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Receipt</h3>\n <p className=\"flex items-center group mb-2\">\n <Widget\n key=\"tooltip\"\n props={{\n children: shortenString(receipt.id),\n tooltip: receipt.id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"w-4 ml-1\",\n className: \"hidden text-primary w-3.5 group-hover:block\",\n text: receipt.id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Block</h3>\n <p className=\"flex items-center group mb-2\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link\n className=\"font-medium\"\n href={`/blocks/${receipt.outcome.block.hash}`}\n >\n {shortenString(receipt.outcome.block.hash)}\n </Link>\n ),\n tooltip: receipt.outcome.block.hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"w-4 ml-1\",\n className: \"hidden text-primary w-3.5 group-hover:block\",\n text: receipt.outcome.block.hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">From</h3>\n <p className=\"flex items-center group mb-2\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link\n className=\"font-medium\"\n href={`/address/${receipt.predecessorId}`}\n >\n {shortenString(receipt.predecessorId, 10, 10, 22)}\n </Link>\n ),\n tooltip: receipt.predecessorId,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"w-4 ml-1\",\n className: \"hidden text-primary w-3.5 group-hover:block\",\n text: receipt.predecessorId,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">To</h3>\n <p className=\"flex items-center group mb-2\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link\n className=\"font-medium\"\n href={`/address/${receipt.receiverId}`}\n >\n {shortenString(receipt.receiverId, 10, 10, 22)}\n </Link>\n ),\n tooltip: receipt.receiverId,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"w-4 ml-1\",\n className: \"hidden text-primary w-3.5 group-hover:block\",\n text: receipt.receiverId,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Gas Limit</h3>\n <p className=\"mb-2\">\n {formatNumber(yoctoToTgas(gasLimit(receipt.actions)), 2)}\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Gas Burned</h3>\n <p className=\"mb-2\">\n {formatNumber(\n yoctoToTgas(String(receipt.outcome.gasBurnt)),\n 2\n )}{\" \"}\n TGas\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Tokens Burned</h3>\n <p className=\"mb-2\">\n {formatNumber(yoctoToNear(receipt.outcome.tokensBurnt), 6)} Ⓝ\n </p>\n </div>\n <div className=\"flex items-center\">\n <h3 className=\"w-32 mb-2\">Refunded</h3>\n <p className=\"mb-2\">\n {formatNumber(\n yoctoToNear(refund(receipt.outcome.nestedReceipts)),\n 6\n )}{\" \"}\n Ⓝ\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </>\n );\n};\nreturn Actions(props);\n"
},
"lite.Txn.Action": {
"": "let TxnActionSkeleton = window?.TxnActionSkeleton || (() => <></>);\nlet JsonView = window?.JsonView || (({ children }) => <pre>{children}</pre>);\nconst kind = {\n addKey: {\n bg: \"bg-bg-key-add\",\n text: \"Access Key Created\",\n },\n createAccount: {\n bg: \"bg-bg-account-add\",\n text: \"Account Created\",\n },\n delegateAction: {\n bg: \"bg-bg-function\",\n text: \"Delegate Action\",\n },\n deleteAccount: {\n bg: \"bg-bg-account-delete\",\n text: \"Account Deleted\",\n },\n deleteKey: {\n bg: \"bg-bg-key-delete\",\n text: \"Access Key Deleted\",\n },\n deployContract: {\n bg: \"bg-bg-contract\",\n text: \"Contract Deployed\",\n },\n functionCall: {\n bg: \"bg-bg-function\",\n text: \"\",\n },\n stake: {\n bg: \"bg-bg-stake\",\n text: \"Restake\",\n },\n transfer: {\n bg: \"bg-bg-transfer\",\n text: \"Transfer\",\n },\n};\nconst prettify = (args) => {\n try {\n return JSON.stringify(JSON.parse(atob(args)), undefined, 2);\n } catch (error) {\n return args;\n }\n};\nconst Action = ({ action, open, setOpen }) => {\n let { yoctoToNear } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { shortenString } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (!yoctoToNear || !formatNumber || !shortenString)\n return <TxnActionSkeleton />;\n const method =\n action.kind === \"functionCall\"\n ? action.args.methodName\n : kind[action.kind].text;\n const args = useMemo(() => {\n if (action.kind === \"functionCall\" && action.args.args) {\n return prettify(action.args.args);\n }\n return \"\";\n }, [action]);\n return (\n <div>\n <button\n className={`h-7 text-sm text-black rounded py-1 px-3 ${\n kind[action.kind].bg\n }`}\n onClick={() => setOpen((o) => !o)}\n >\n {method.length > 22 ? (\n <Widget\n key=\"tooltip\"\n props={{\n children: shortenString(method, 10, 10, 22),\n tooltip: method,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n ) : (\n method\n )}\n <span className=\"inline-flex items-center justify-center w-3\">\n {open ? \"-\" : \"+\"}\n </span>\n </button>\n <span className=\"font-semibold text-xs\">\n {action.kind === \"transfer\"\n ? `${formatNumber(yoctoToNear(action.args.deposit), 6)} Ⓝ`\n : null}\n </span>\n {open && args && (\n <div className=\"px-4 py-6\">\n <JsonView>{args}</JsonView>\n </div>\n )}\n </div>\n );\n};\nreturn Action(props);\n"
},
"lite.Txn.Execution": {
"": "let TxnReceiptSkeleton = window?.TxnReceiptSkeleton || (() => <></>);\nconst Execution = ({ receipt }) => {\n const [expand, setExpand] = useState(false);\n return (\n <>\n <div className=\"flex justify-between items-center text-sm mb-6\">\n <span className=\"text-text-label\"> </span>\n <button onClick={() => setExpand((e) => !e)}>\n {expand ? \"Collapse All -\" : \"Expand All +\"}\n </button>\n </div>\n <Widget\n key=\"receipt\"\n loading={<TxnReceiptSkeleton />}\n props={{\n convertion: true,\n expand,\n outgoingReceipts: [],\n receipt,\n }}\n src={`sarin.testnet/widget/lite.Txn.Receipt`}\n />\n </>\n );\n};\nreturn Execution(props);\n"
},
"lite.Atoms.Error": {
"": "const Error = ({ text, title }) => {\n return (\n <div className=\"relative container mx-auto\">\n <div className=\"flex flex-col items-center py-10 px-5\">\n <Widget\n key=\"warning-icon\"\n props={{ className: \"text-text-warning w-12 mb-2\" }}\n src={`sarin.testnet/widget/lite.Icons.Warning`}\n />\n <h1 className=\"font-heading font-medium text-xl text-center tracking-[0.1px]\">\n {title}\n </h1>\n <p className=\"text-text-label text-sm text-center mt-1\">\n {text ?? \"Please try again or try changing the RPC endpoint\"}\n </p>\n </div>\n </div>\n );\n};\nreturn Error(props);\n"
},
"lite.Txn": {
"": "let TxnSkeleton = window?.TxnSkeleton || (() => <></>);\nlet TxnTabsSkeleton = window?.TxnTabsSkeleton || (() => <></>);\nlet Skeleton = window?.Skeleton || (({ children }) => <>{children}</>);\nconst Txn = ({ hash, rpcUrl }) => {\n let { rpcFetch } = VM.require(`sarin.testnet/widget/lite.libs.fetcher`);\n let { nsToDateTime, yoctoToNear } = VM.require(\n `sarin.testnet/widget/lite.libs.convertor`\n );\n let { formatNumber } = VM.require(\n `sarin.testnet/widget/lite.libs.formatter`\n );\n let { depositAmount, shortenString, txnFee } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (\n !rpcFetch ||\n !nsToDateTime ||\n !yoctoToNear ||\n !formatNumber ||\n !depositAmount ||\n !shortenString ||\n !txnFee\n )\n return <TxnSkeleton />;\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState({\n block: true,\n txn: true,\n });\n const [txn, setTxn] = useState(null);\n const [block, setBlock] = useState(null);\n useEffect(() => {\n if (rpcFetch && rpcUrl && hash) {\n rpcFetch(rpcUrl, \"tx\", {\n sender_account_id: \"bowen\",\n tx_hash: hash,\n wait_until: \"NONE\",\n })\n .then((response) => {\n setTxn(response);\n rpcFetch(rpcUrl, \"block\", {\n block_id: response.transaction_outcome.block_hash,\n })\n .then((response) => setBlock(response))\n .catch(setError)\n .finally(() => setLoading((state) => ({ ...state, block: false })));\n })\n .catch(setError)\n .finally(() => setLoading((state) => ({ ...state, txn: false })));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hash, rpcUrl]);\n if (error) {\n return (\n <Widget\n key=\"error\"\n props={{ title: \"Error Fetching Txn\" }}\n src={`sarin.testnet/widget/lite.Atoms.Error`}\n />\n );\n }\n return (\n <div className=\"relative container mx-auto\">\n <div className=\"pt-7 pb-[26px] px-5\">\n <Skeleton className=\"block h-[54px] w-[300px]\" loading={loading.txn}>\n <h1 className=\"flex items-center font-heading font-medium text-[36px] tracking-[0.1px] mr-4\">\n <span className=\"truncate\">{shortenString(hash)}</span>\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-3\",\n className: \"text-primary w-6\",\n text: hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </h1>\n </Skeleton>\n </div>\n <div className=\"flex flex-wrap\">\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">From</h2>\n <Skeleton className=\"block h-[39px] w-[200px]\" loading={loading.txn}>\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link href={`/address/${txn?.transaction.signer_id}`}>\n {shortenString(txn?.transaction.signer_id ?? \"\")}\n </Link>\n ),\n tooltip: txn?.transaction.signer_id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-1\",\n className: \"text-primary w-4\",\n text: txn?.transaction.signer_id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">To</h2>\n <Skeleton className=\"block h-[39px] w-[200px]\" loading={loading.txn}>\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link href={`/address/${txn?.transaction.receiver_id}`}>\n {shortenString(txn?.transaction.receiver_id ?? \"\")}\n </Link>\n ),\n tooltip: txn?.transaction.receiver_id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"ml-1\",\n className: \"text-primary w-4\",\n text: txn?.transaction.receiver_id,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Block</h2>\n <Skeleton className=\"block h-[39px] w-32\" loading={loading.block}>\n <div className=\"font-heading font-medium text-[26px]\">\n <Widget\n key=\"tooltip\"\n props={{\n children: (\n <Link href={`/blocks/${block?.header.height}`}>\n {formatNumber(String(block?.header.height ?? 0), 0)}\n </Link>\n ),\n tooltip: (\n <span>\n <span className=\"mr-1\">{block?.header.hash}</span>\n <Widget\n key=\"copy\"\n loading={<span className=\"block w-4 h-4 truncate\" />}\n props={{\n buttonClassName: \"h-4 align-text-bottom\",\n className: \"w-4\",\n text: block?.header.hash,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </span>\n ),\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Time</h2>\n <Skeleton\n className=\"block h-[39px] w-[280px]\"\n loading={loading.block}\n >\n <div className=\"font-heading font-medium text-[24px]\">\n {nsToDateTime(\n block?.header.timestamp_nanosec ?? \"0\",\n \"DD/MM/YY hh:mm:ss AA\"\n )}\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Amount</h2>\n <Skeleton className=\"block h-[39px] w-28\" loading={loading.txn}>\n <div className=\"font-heading font-medium text-[24px]\">\n {formatNumber(\n yoctoToNear(depositAmount(txn?.transaction.actions ?? [])),\n 6\n )}{\" \"}\n Ⓝ\n </div>\n </Skeleton>\n </div>\n <div className=\"w-full sm:w-1/2 lg:w-1/3 pl-5 mb-6 h-[60px]\">\n <h2 className=\"font-medium text-sm mb-0.5\">Fee</h2>\n <Skeleton className=\"block h-[39px] w-[140px]\" loading={loading.txn}>\n <div className=\"font-heading font-medium text-[24px]\">\n {formatNumber(\n yoctoToNear(\n txnFee(\n txn?.receipts_outcome ?? [],\n txn?.transaction_outcome.outcome.tokens_burnt ?? \"0\"\n )\n ),\n 6\n )}{\" \"}\n Ⓝ\n </div>\n </Skeleton>\n </div>\n </div>\n <Widget\n key=\"tabs\"\n loading={<TxnTabsSkeleton />}\n props={{ hash, rpcUrl }}\n src={`sarin.testnet/widget/lite.Txn.Tabs`}\n />\n </div>\n );\n};\nreturn Txn(props);\n"
},
"lite.Txn.Address": {
"": "let TxnAddressSkeleton = window?.TxnAddressSkeleton || (() => <></>);\nconst Address = ({ address }) => {\n let { shortenString } = VM.require(\n `sarin.testnet/widget/lite.libs.utils`\n );\n if (!shortenString) return <TxnAddressSkeleton />;\n return (\n <div className=\"flex items-center pb-3\">\n <span className=\"inline-block h-4 w-4 rounded-full bg-bg-skeleton mr-3\" />\n <span className=\"flex font-heading font-semibold text-sm group\">\n <Link href={`/address/${address}`}>\n {address.length > 22 ? (\n <Widget\n key=\"tooltip\"\n props={{\n children: shortenString(String(address), 10, 10, 22),\n tooltip: address,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Tooltip`}\n />\n ) : (\n address\n )}\n </Link>\n <Widget\n key=\"copy\"\n props={{\n buttonClassName: \"w-4 ml-1\",\n className: \"hidden text-primary w-3.5 group-hover:block\",\n text: address,\n }}\n src={`sarin.testnet/widget/lite.Atoms.Copy`}\n />\n </span>\n </div>\n );\n};\nreturn Address(props);\n"
}
}
}
}
}1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"F2AM8xuisWeBFANAPXZAMq3Rq2m3eGaTukb6haipuBr6","sender_account_id":"sarin.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.