diff --git a/.github/workflows/docker-publish.yaml.orig b/.github/workflows/docker-publish.yaml.orig deleted file mode 100644 index c604eee2..00000000 --- a/.github/workflows/docker-publish.yaml.orig +++ /dev/null @@ -1,134 +0,0 @@ -name: Publish Docker image - -on: - push: - branches: - - "develop" - tags: - - "*" - -env: - IMAGE_NAME: ${{ github.repository }} - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm64 - steps: - - name: Prepare - run: | - platform=${{ matrix.platform }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Docker Setup Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker Login - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Docker Metadata action - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otterscan/otterscan - ghcr.io/${{ env.IMAGE_NAME }} - - - name: Build and push by digest - id: build - uses: docker/build-push-action@v5 - with: - context: . - platforms: ${{ matrix.platform }} - labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Export digest - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - - name: Upload digest - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM_PAIR }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest - needs: - - build - permissions: - contents: read - packages: write - - steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otterscan/otterscan - ghcr.io/${{ env.IMAGE_NAME }} - - - name: Docker Login - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Create manifest list and push - working-directory: /tmp/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *) - - - name: Inspect image - run: | - docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/docker-publish.yaml.rej b/.github/workflows/docker-publish.yaml.rej deleted file mode 100644 index 1f0ada9b..00000000 --- a/.github/workflows/docker-publish.yaml.rej +++ /dev/null @@ -1,25 +0,0 @@ ---- .github/workflows/docker-publish.yaml -+++ .github/workflows/docker-publish.yaml -@@ -47,15 +37,19 @@ jobs: - uses: docker/metadata-action@v5 - with: - images: | -- otterscan/otterscan -- ghcr.io/${{ env.IMAGE_NAME }} -+ zilliqa/otterscan -+ tags: | -+ type=ref,enable=false,priority=600,prefix=pr-,suffix=,event=pr -+ type=ref,event=branch -+ type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} -+ type=semver,pattern={{raw}} - - - name: Build and push Docker images - uses: docker/build-push-action@v5 - with: - context: . - push: true -- platforms: linux/amd64,linux/arm64 -+ platforms: linux/amd64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache diff --git a/.github/workflows/integration-deployment.yaml b/.github/workflows/integration-deployment.yaml deleted file mode 100644 index 6e750e4e..00000000 --- a/.github/workflows/integration-deployment.yaml +++ /dev/null @@ -1,30 +0,0 @@ -on: [push] -jobs: - deploy-mainnet: - uses: ./.github/workflows/pages-deployment.yaml - secrets: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ${{ secrets.CLOUDFLARE_INTEG_MAINNET_PROJECT }} - viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_MAINNET_SETTINGS }} - deploy-gnosis: - uses: ./.github/workflows/pages-deployment.yaml - secrets: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ${{ secrets.CLOUDFLARE_INTEG_GNOSIS_PROJECT }} - viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_GNOSIS_SETTINGS }} - deploy-op-mainnet: - uses: ./.github/workflows/pages-deployment.yaml - secrets: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ${{ secrets.CLOUDFLARE_INTEG_OP_MAINNET_PROJECT }} - viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_OP_MAINNET_SETTINGS }} - deploy-e3-sepolia: - uses: ./.github/workflows/pages-deployment.yaml - secrets: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: ${{ secrets.CLOUDFLARE_INTEG_E3_SEPOLIA_PROJECT }} - viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_E3_SEPOLIA_SETTINGS }} diff --git a/.gitignore.orig b/.gitignore.orig deleted file mode 100644 index 1bfcf404..00000000 --- a/.gitignore.orig +++ /dev/null @@ -1,30 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage -/storybook-static -/cypress/screenshots -/cypress/videos - -# production -/build -/dist - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -/.vscode -.gitsigners diff --git a/.gitignore.rej b/.gitignore.rej deleted file mode 100644 index 7402d100..00000000 --- a/.gitignore.rej +++ /dev/null @@ -1,12 +0,0 @@ ---- .gitignore -+++ .gitignore -@@ -14,6 +21,9 @@ - - # testing - /coverage -+/storybook-static -+/cypress/screenshots -+/cypress/videos - - # production - /build diff --git a/.prettierignore b/.prettierignore index 039e68fc..fcaeae70 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,6 @@ scripts chains topic0 trustwallet + +node_modules +.github diff --git a/.storybook/main.ts.rej b/.storybook/main.ts.rej deleted file mode 100644 index a73eae80..00000000 --- a/.storybook/main.ts.rej +++ /dev/null @@ -1,12 +0,0 @@ ---- .storybook/main.ts -+++ .storybook/main.ts -@@ -17,6 +17,9 @@ const config: StorybookConfig = { - typescript: { - reactDocgen: false, - }, -+ core: { -+ disableTelemetry: true, -+ }, - }; - - export default config; diff --git a/.storybook/preview-head.html.rej b/.storybook/preview-head.html.rej deleted file mode 100644 index 70f0fc25..00000000 --- a/.storybook/preview-head.html.rej +++ /dev/null @@ -1,6 +0,0 @@ ---- .storybook/preview-head.html -+++ .storybook/preview-head.html -@@ -1,3 +1,3 @@ - + diff --git a/.storybook/preview.tsx.rej b/.storybook/preview.tsx.rej deleted file mode 100644 index 4d41d099..00000000 --- a/.storybook/preview.tsx.rej +++ /dev/null @@ -1,20 +0,0 @@ ---- .storybook/preview.tsx -+++ .storybook/preview.tsx -@@ -1,12 +1,11 @@ --import React from "react"; --import { Decorator } from "@storybook/react"; --import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport"; --import { BrowserRouter as Router } from "react-router-dom"; - import "@fontsource/fira-code/index.css"; --import "@fontsource/space-grotesk/index.css"; --import "@fontsource/roboto/index.css"; - import "@fontsource/roboto-mono/index.css"; -+import "@fontsource/roboto/index.css"; - import "@fontsource/space-grotesk/files/space-grotesk-latin-400-normal.woff2"; -+import "@fontsource/space-grotesk/index.css"; -+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport"; -+import { Decorator } from "@storybook/react"; -+import { BrowserRouter as Router } from "react-router-dom"; - import "../src/index.css"; - - export const parameters = { diff --git a/Dockerfile.rej b/Dockerfile.rej deleted file mode 100644 index fc32bfef..00000000 --- a/Dockerfile.rej +++ /dev/null @@ -1,42 +0,0 @@ ---- Dockerfile -+++ Dockerfile -@@ -1,10 +1,10 @@ --FROM node:20.8.1-alpine3.17 AS builder -+FROM node:20.10.0-alpine3.17 AS builder - WORKDIR /otterscan-build --COPY ["package.json", "package-lock.json", "/otterscan-build/"] --RUN npm ci --COPY ["run-nginx.sh", "tsconfig.json", "tsconfig.node.json", "postcss.config.js", "tailwind.config.js", "vite.config.ts", "index.html", "/otterscan-build/"] --COPY ["public", "/otterscan-build/public/"] --COPY ["src", "/otterscan-build/src/"] -+COPY --link ["package.json", "package-lock.json", "/otterscan-build/"] -+RUN npm ci --fetch-timeout 600000 --verbose -+COPY --link ["run-nginx.sh", "tsconfig.json", "tsconfig.node.json", "postcss.config.js", "tailwind.config.js", "vite.config.ts", "index.html", "/otterscan-build/"] -+COPY --link ["public", "/otterscan-build/public/"] -+COPY --link ["src", "/otterscan-build/src/"] - RUN npm run build - - # Add brotli module to official nginx image -@@ -71,14 +71,14 @@ RUN set -ex \ - && rm -rf /tmp/packages - RUN apk update && apk add jq - WORKDIR /usr/share/nginx/html/ --COPY --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/chains chains/ --COPY --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/topic0 topic0/ --COPY --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/assets assets/ --COPY --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/signatures signatures/ --COPY nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf --COPY nginx/nginx.conf /etc/nginx/nginx.conf --COPY --from=builder /otterscan-build/dist /usr/share/nginx/html/ --COPY --from=builder /otterscan-build/run-nginx.sh / -+COPY --link --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/chains chains/ -+COPY --link --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/topic0 topic0/ -+COPY --link --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/assets assets/ -+COPY --link --from=otterscan/otterscan-assets:v1.1.1 /usr/share/nginx/html/signatures signatures/ -+COPY --link nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -+COPY --link nginx/nginx.conf /etc/nginx/nginx.conf -+COPY --link --from=builder /otterscan-build/dist /usr/share/nginx/html/ -+COPY --link --from=builder /otterscan-build/run-nginx.sh / - WORKDIR / - - CMD ["/run-nginx.sh"] diff --git a/README.md.rej b/README.md.rej deleted file mode 100644 index e4a2ae3a..00000000 --- a/README.md.rej +++ /dev/null @@ -1,10 +0,0 @@ ---- README.md -+++ README.md -@@ -118,4 +118,6 @@ Follow the creator on Twitter for more updates ([@wmitsuda](https://twitter.com/ - - ### Donation address - --If you like this project, feel free to send donations to `otterscan.eth` or use our gitcoin grant page: https://gitcoin.co/grants/3224/otterscan -+If you like this project, feel free to send donations to `otterscan.eth` on any EVM chain (it's an EOA). -+ -+We also participate regularly on Gitcoin Grants rounds. diff --git a/src/App.tsx b/src/App.tsx index 1a3b29a2..e00769c3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -66,7 +66,7 @@ const App = () => { } - /> + /> } diff --git a/src/ConnectionErrorPanel.tsx b/src/ConnectionErrorPanel.tsx index 27e499ad..5fd600f0 100644 --- a/src/ConnectionErrorPanel.tsx +++ b/src/ConnectionErrorPanel.tsx @@ -31,7 +31,7 @@ const ConnectionErrorPanel: React.FC = ({ )} {connStatus === ConnectionStatus.NOT_ERIGON && ( <> - + Make sure your Zilliqa node is running. @@ -43,8 +43,7 @@ const ConnectionErrorPanel: React.FC = ({ - + > )} diff --git a/src/Header.tsx b/src/Header.tsx index 9d451b5c..4867fdad 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -12,7 +12,7 @@ import Otter from "./otter.png?w=128&h=128&webp"; const CameraScanner = lazy(() => import("./search/CameraScanner")); type HeaderProps = { sourcifyPresent: boolean }; -const Header: FC = ({ sourcifyPresent }) => { +const Header: FC = ({ sourcifyPresent }) => { const { config, provider } = useContext(RuntimeContext); const [searchRef, handleChange, handleSubmit] = useGenericSearch(); const [isScanning, setScanning] = useState(false); @@ -41,7 +41,7 @@ const Header: FC = ({ sourcifyPresent }) => {
- { sourcifyPresent && } + {sourcifyPresent && }
@@ -87,7 +87,7 @@ const Header: FC = ({ sourcifyPresent }) => {
- { sourcifyPresent && } + {sourcifyPresent && }
diff --git a/src/Home.tsx b/src/Home.tsx index 484eed8a..3ad26e2e 100644 --- a/src/Home.tsx +++ b/src/Home.tsx @@ -1,9 +1,13 @@ import { faQrcode } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FC, lazy, memo, useContext, useState } from "react"; -import { NavLink } from "react-router-dom"; +import { NavLink, useSearchParams } from "react-router-dom"; +import Header from "./Header"; import Logo from "./Logo"; import Timestamp from "./components/Timestamp"; +import ChainInfo from "./execution/ChainInfo"; +import RecentBlocks from "./execution/block/RecentBlocks"; +import RecentDSBlocks from "./execution/block/RecentDSBlocks"; import { useGenericSearch } from "./search/search"; import { blockURL, slotURL } from "./url"; import { useFinalizedSlotNumber, useSlotTimestamp } from "./useConsensus"; @@ -11,10 +15,6 @@ import { useLatestBlockHeader } from "./useLatestBlock"; import { RuntimeContext } from "./useRuntime"; import { usePageTitle } from "./useTitle"; import { commify } from "./utils/utils"; -import Header from "./Header"; -import ChainInfo from "./execution/ChainInfo"; -import RecentBlocks from "./execution/block/RecentBlocks"; -import RecentDSBlocks from "./execution/block/RecentDSBlocks"; const CameraScanner = lazy(() => import("./search/CameraScanner")); @@ -29,94 +29,102 @@ const Home: FC = () => { usePageTitle("Home"); + const [searchParams, setSearchParams] = useSearchParams(); + const isDevMode = searchParams.get("dev") === "1"; + return ( <>
- +
- - - - + {isDevMode ? ( + + + + ) : ( +
+ )} + - -
-
- {isScanning && setScanning(false)} />} -
- +
-
-
- +
+ {isScanning && setScanning(false)} />} +
+ +
+ +
+ + +
-
- - - {!(config?.branding?.hideAnnouncements ?? false) && - config?.experimental && ( + + {!(config?.branding?.hideAnnouncements ?? false) && + config?.experimental && ( + + 🧪 EXPERIMENTAL CONTRACT BROWSER 🧪 + + )} + {latestBlock && ( - 🧪 EXPERIMENTAL CONTRACT BROWSER 🧪 +
Latest block: {commify(latestBlock.number)}
+ +
Ziliqa Otterscan Version: {config?.version}
)} - {latestBlock && ( - -
Latest block: {commify(latestBlock.number)}
- -
Ziliqa Otterscan Version: {config?.version}
-
- )} - {finalizedSlotNumber !== undefined && ( - -
Finalized slot: {commify(finalizedSlotNumber)}
- {slotTime && } -
- )} -
- + {finalizedSlotNumber !== undefined && ( + +
Finalized slot: {commify(finalizedSlotNumber)}
+ {slotTime && } +
+ )} +
+ ); }; diff --git a/src/components/BlockNotFound.tsx b/src/components/BlockNotFound.tsx index 47452214..d5d0aab8 100644 --- a/src/components/BlockNotFound.tsx +++ b/src/components/BlockNotFound.tsx @@ -7,7 +7,9 @@ type BlockNotFoundProps = { const BlockNotFound: React.FC = ({ blockNumberOrHash }) => ( -
Tx Block "{blockNumberOrHash}" not found.
+
+ Tx Block "{blockNumberOrHash}" not found. +
); diff --git a/src/components/Copy.tsx b/src/components/Copy.tsx index eaff6b47..64b69414 100644 --- a/src/components/Copy.tsx +++ b/src/components/Copy.tsx @@ -21,7 +21,7 @@ const Copy: React.FC = ({ value, rounded }) => { return ( - - ))} - -
- - {selected && ( - <> - {match.metadata.sources[selected].content ? ( - - ) : ( - - )} - + {!scillaCode && ( +
+ {match === undefined && ( + Getting data from Sourcify repository... + )} + {match === null && ( + + Address is not a contract or could not find contract metadata in + Sourcify repository. + + )} + {match !== undefined && match !== null && ( + <> + {match.metadata.output.abi && ( + )} -
- - )} - - )} +
+ +
+ + {selected} + + + + + {provider && ( +
+ + Open in Remix + +
+ )} +
+
+ + {Object.entries(match.metadata.sources).map(([k]) => ( + + + + ))} + +
+
+ {selected && ( + <> + {match.metadata.sources[selected].content ? ( + + ) : ( + + )} + + )} +
+ + )} + + )}
- {code === undefined && Getting contract bytecode...} - { scillaCode && } + {code === undefined && Getting contract bytecode...} + {scillaCode && } {!scillaCode && code && ( <>
Contract Bytecode
diff --git a/src/execution/transaction/LogEntry.tsx b/src/execution/transaction/LogEntry.tsx index 35198516..56dfe693 100644 --- a/src/execution/transaction/LogEntry.tsx +++ b/src/execution/transaction/LogEntry.tsx @@ -227,9 +227,10 @@ const LogEntry: FC = ({ log }) => { - ) : (
- )} + /> + ) : ( +
+ )} diff --git a/src/execution/transaction/Logs.tsx b/src/execution/transaction/Logs.tsx index 505f8232..2eeefb8d 100644 --- a/src/execution/transaction/Logs.tsx +++ b/src/execution/transaction/Logs.tsx @@ -10,22 +10,21 @@ type LogsProps = { const Logs: FC = ({ logs }) => (
- { " " } - {logs && ( - <> - {logs.length > 0 ? ( - <> - {logs.map((l, i) => ( - - ))} - - ) : ( -
Transaction didn't emit any logs
- )} - -)} -{ " " } -
+ {" "} + {logs && ( + <> + {logs.length > 0 ? ( + <> + {logs.map((l, i) => ( + + ))} + + ) : ( +
Transaction didn't emit any logs
+ )} + + )}{" "} +
); diff --git a/src/search/PendingResults.tsx b/src/search/PendingResults.tsx index 28d24130..40be4038 100644 --- a/src/search/PendingResults.tsx +++ b/src/search/PendingResults.tsx @@ -10,7 +10,7 @@ const PendingResults: React.FC = () => (
-
+
); export const PendingRecentBlockResults: React.FC = React.memo(() => ( @@ -23,7 +23,6 @@ export const PendingRecentBlockResults: React.FC = React.memo(() => ( )); - export const PendingBlockResults: React.FC = React.memo(() => (
diff --git a/src/search/RecentDSBlockItem.tsx b/src/search/RecentDSBlockItem.tsx index 31bd35ca..724af956 100644 --- a/src/search/RecentDSBlockItem.tsx +++ b/src/search/RecentDSBlockItem.tsx @@ -1,8 +1,7 @@ -import { commify } from "../utils/utils"; import { DsBlockObj } from "@zilliqa-js/core/dist/types/src/types"; import DSBlockLink from "../components/DSBlockLink"; import TimestampAge from "../components/TimestampAge"; -import { zilliqaToOtterscanTimestamp } from "../utils/utils"; +import { commify, zilliqaToOtterscanTimestamp } from "../utils/utils"; type DSBlockItemProps = { block: DsBlockObj; diff --git a/src/search/RecentDSBlockResultHeader.tsx b/src/search/RecentDSBlockResultHeader.tsx index f4cf3bd2..9c4890d4 100644 --- a/src/search/RecentDSBlockResultHeader.tsx +++ b/src/search/RecentDSBlockResultHeader.tsx @@ -10,4 +10,3 @@ const RecentDSBlockResultHeader: React.FC = () => ( ); export default React.memo(RecentDSBlockResultHeader); - diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index 5057c1f3..97060603 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -258,7 +258,6 @@ export const useRecentBlocks = ( return { data, isLoading: isLoading || isValidating }; }; - export const useBlockDataFromTransaction = ( provider: JsonRpcApiProvider | undefined, txData: TransactionData | null | undefined, diff --git a/src/useLatestBlock.ts b/src/useLatestBlock.ts index e32904bc..8ecf32be 100644 --- a/src/useLatestBlock.ts +++ b/src/useLatestBlock.ts @@ -4,7 +4,6 @@ import { Block, JsonRpcApiProvider } from "ethers"; import { useEffect, useState } from "react"; import { formatter } from "./utils/formatter"; - const refreshRate = 30000; // In milliseconds /** @@ -46,7 +45,6 @@ export const useLatestBlockHeader = (provider?: JsonRpcApiProvider) => { return latestBlock; }; - /** * Returns the latest chain information AND hoook an internal listener * that'll update and trigger a component reder as a side effect every @@ -137,7 +135,6 @@ export const useBCInfoStateInfo = ( return state; }; - /** * Returns the latest block number AND hook an internal listener * that'll update and trigger a component render as a side effect diff --git a/src/useRuntime.ts b/src/useRuntime.ts index 01ef1950..0d3941c6 100644 --- a/src/useRuntime.ts +++ b/src/useRuntime.ts @@ -27,13 +27,11 @@ export type OtterscanRuntime = { */ provider?: JsonRpcApiProvider; - /** * Zilliqa object; may be undefined if not ready because of config fetching, * probing occurring, etc. */ zilliqa?: Zilliqa; - }; export const useRuntime = (): OtterscanRuntime => { diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 4dd41a52..2665f2ae 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,4 +1,3 @@ - import { getAddressFromPublicKey } from "@zilliqa-js/crypto"; import { validation } from "@zilliqa-js/util"; @@ -122,4 +121,3 @@ export const pubKeyToAddr: (k: string) => string = (pubKey: string) => { if (!validation.isPubKey(strippedPubKey)) return "Invalid public key"; else return getAddressFromPublicKey(strippedPubKey).toLowerCase(); }; -