2021-08-08 22:49:45 +00:00
|
|
|
import { BlockTag } from "@ethersproject/abstract-provider";
|
2021-07-23 22:46:21 +00:00
|
|
|
|
2021-07-09 16:54:59 +00:00
|
|
|
export const fourBytesURL = (
|
|
|
|
assetsURLPrefix: string,
|
|
|
|
fourBytes: string
|
|
|
|
): string => `${assetsURLPrefix}/signatures/${fourBytes}`;
|
|
|
|
|
|
|
|
export const tokenLogoURL = (
|
|
|
|
assetsURLPrefix: string,
|
|
|
|
address: string
|
|
|
|
): string => `${assetsURLPrefix}/assets/${address}/logo.png`;
|
2021-07-23 22:46:21 +00:00
|
|
|
|
2021-08-08 22:49:45 +00:00
|
|
|
export const blockURL = (blockNum: BlockTag) => `/block/${blockNum}`;
|
2021-07-23 22:46:21 +00:00
|
|
|
|
2021-08-08 22:49:45 +00:00
|
|
|
export const blockTxsURL = (blockNum: BlockTag) => `/block/${blockNum}/txs`;
|
2021-07-24 23:04:49 +00:00
|
|
|
|
|
|
|
export const sourcifyMetadata = (
|
|
|
|
checksummedAddress: string,
|
|
|
|
networkId: number
|
|
|
|
) =>
|
|
|
|
`http://localhost:7000/sourcify/contracts/full_match/${networkId}/${checksummedAddress}/metadata.json`;
|
2021-07-24 23:33:45 +00:00
|
|
|
|
|
|
|
export const sourcifySourceFile = (
|
|
|
|
checksummedAddress: string,
|
|
|
|
networkId: number,
|
|
|
|
filepath: string
|
|
|
|
) =>
|
|
|
|
`http://localhost:7000/sourcify/contracts/full_match/${networkId}/${checksummedAddress}/sources/${filepath}`;
|