Helpers for Knine projects. Part of Knine JS SDK
yarn add @knine-sdk/helpers
A set of functions for generating links to etherscan
import { getEtherscanTxLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';
const link = getEtherscanTxLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/tx/0x0000000000000000000000000000000000000000000000000000000000000000
import { getEtherscanTokenLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';
const link = getEtherscanTokenLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000
import { getEtherscanAddressLink } from '@knine-sdk/helpers';
import { CHAINS } from '@knine-sdk/constants';
const link = getEtherscanAddressLink(
CHAINS.Mainnet,
'0x0000000000000000000000000000000000000000',
);
console.log(link); // https://etherscan.io/address/0x0000000000000000000000000000000000000000
import { openWindow } from '@knine-sdk/helpers';
openWindow('https://knine.io');