Transaction Details
Tx Hash:
Dc5tmg4C4DsuKZL6x4Asz9
Status:
OnChain
Block:
Bundler:
0xF5d3B0bF5C6F4bEC970679Ee78caDbeA8bb72417
Timestamp:
Nov.24.2023 05:10:43 AM
Caller:
0x4dd428432096de33fdd9de1aa60a80386b47c92b
Signature:
0x5fee407c37cb51baa3c7139a179b975c7eaea0947f5b08c68820ce5c2ae99b2158333665c5d37d80775d6e0f73e1d62848c60f8bb79b0a0737ac80ef273fd5dc1b
SepId:
2
Namespace:
kage
Dataset:
Collection:
Action:
insertOne
Document:
{
  "delete": "const client = useMemo(() => {\n  return new GlacierClient('https://p0.onebitdev.com/glacier-gateway', {\n    provider,\n  });\n}, [provider]);",
  "update": "import { useState, useCallback, useMemo, useEffect } from 'react';\nimport { GlacierClient, NamespaceRecord } from '@glacier-network/client';\n\nimport useMetaMask from './useMetaMask';\n\nexport default function useGlacier() {\n  const [spaces, setSpaces] = useState([]);\n  const { provider, account, connect, eagerConnect } = useMetaMask();\n\n  const client = useMemo(() => {\n    return new GlacierClient('https://p0.onebitdev.com/glacier-gateway', {\n      provider,\n    });\n  }, [provider]);\n\n  const listNamespace = useCallback(async () => {\n    if (!account) return setSpaces([]);\n    const result = await client.namespaces(account);\n    setSpaces(result);\n  }, [client, account]);\n\n  const createNamespace = useCallback(\n    async (name: string) => {\n      const result = await client.createNamespace(name);\n      return result;\n    },\n    [client]\n  );\n\n  useEffect(() => {\n    listNamespace();\n  }, [listNamespace]);\n\n  return {\n    client,\n    spaces,\n    account,\n    connect,\n    eagerConnect,\n    listNamespace,\n    createNamespace,\n  };\n}"
}