master
nico 8 months ago
parent e9b460c091
commit d0c65a037b
  1. 8
      CONTRIBUTING.md
  2. 4
      README.md
  3. 2
      package.json
  4. 4
      public/index.html
  5. 2
      scripts/updateBridgeTokensList.js
  6. 12
      src/Routes.tsx
  7. 10
      src/api/client.ts
  8. 46
      src/api/rpc.ts
  9. 2
      src/components/BinancePairHistoricalPrice_Pool.tsx
  10. 4
      src/components/ONE_USDT_Rate.tsx
  11. 14
      src/components/appFooter/index.tsx
  12. 2
      src/components/appHeader/ConfigureButton.tsx
  13. 12
      src/components/appHeader/InfoButton.tsx
  14. 4
      src/components/appHeader/MenuMobile.tsx
  15. 4
      src/components/appHeader/ToolsButton.tsx
  16. 2
      src/components/appHeader/index.tsx
  17. 2
      src/components/approvals/approvalsColumns.tsx
  18. 2
      src/components/metrics/WalletsHistory.tsx
  19. 16
      src/components/tables/TransactionsTable.tsx
  20. 6
      src/components/transaction/TransactionDetails.tsx
  21. 20
      src/components/transaction/helpers.tsx
  22. 4
      src/components/ui/TokenValueBalanced.tsx
  23. 4
      src/components/ui/utils.tsx
  24. 32
      src/config/addressAliasMap.json
  25. 2
      src/config/bridgeTokensMap.json
  26. 2
      src/config/linkedContractsMap.json
  27. 4
      src/hooks/BinancePairHistoricalPrice.ts
  28. 6
      src/hooks/useONEExchangeRate.tsx
  29. 4
      src/pages/AddressPage/ContractDetails/AbiMethodView.tsx
  30. 6
      src/pages/AddressPage/ContractDetails/ConnectWallets.tsx
  31. 12
      src/pages/AddressPage/TokenInfo.tsx
  32. 10
      src/pages/AddressPage/index.tsx
  33. 8
      src/pages/AddressPage/tabs/inventory/InventoryItem.tsx
  34. 16
      src/pages/AddressPage/tabs/tools/TokenApprovals.tsx
  35. 6
      src/pages/AllTransactionsPage/index.tsx
  36. 24
      src/pages/ApprovalPage/index.tsx
  37. 6
      src/pages/ChartsPage/ActiveAddresses.tsx
  38. 2
      src/pages/ChartsPage/AverageBlockSize.tsx
  39. 2
      src/pages/ChartsPage/AverageFee.tsx
  40. 2
      src/pages/ChartsPage/DailyTransactions.tsx
  41. 6
      src/pages/ChartsPage/ViewChangeStats.tsx
  42. 2
      src/pages/ChartsPage/index.tsx
  43. 2
      src/pages/ERC1155List/ERC1155Table.tsx
  44. 2
      src/pages/ERC1155List/index.tsx
  45. 2
      src/pages/ERC20List/ERC20Table.tsx
  46. 2
      src/pages/ERC20List/index.tsx
  47. 2
      src/pages/ERC721List/ERC721Table.tsx
  48. 2
      src/pages/ERC721List/index.tsx
  49. 4
      src/pages/ExportData/export-utils.ts
  50. 2
      src/pages/ExportData/index.tsx
  51. 4
      src/pages/InventoryDetailsPage/InventoryDetailsPage.tsx
  52. 16
      src/pages/MainPage/LatestTransactionsTable.tsx
  53. 10
      src/pages/StackingTransactionPage/index.tsx
  54. 4
      src/pages/TopStatsPage/CommonTopTable.tsx
  55. 14
      src/pages/TransactionPage/index.tsx
  56. 6
      src/pages/tools/CheckWRC/index.tsx
  57. 2
      src/types/api.ts
  58. 42
      src/types/blockchain.ts
  59. 28
      src/utils/approvals.ts
  60. 44
      src/utils/getAddress/GetAddress.ts
  61. 10
      src/utils/getAddress/bech32.ts
  62. 2
      src/utils/getAddress/bytes.ts
  63. 18
      src/utils/getAddress/errors.ts
  64. 2
      src/utils/getAddress/keccak256.ts
  65. 2
      src/utils/getAddress/validators.ts
  66. 4
      src/utils/utils.ts

@ -3,19 +3,19 @@
When contributing to this repository, please first discuss the change you wish to make via issue, discord server or any other method with the owners of this repository before making a change. When contributing to this repository, please first discuss the change you wish to make via issue, discord server or any other method with the owners of this repository before making a change.
### Pull Request Process ### Pull Request Process
1) Fork a [repository](https://github.com/harmony-one/explorer-v2-frontend) and create your branch from `master`; 1) Fork a [repository](https://github.com/woop-chain/explorer-v2-frontend) and create your branch from `master`;
2) Run `yarn build` in the repository root 2) Run `yarn build` in the repository root
3) Update .env.example if new environment variables is created; 3) Update .env.example if new environment variables is created;
4) Create pull request linked with existed issue. 4) Create pull request linked with existed issue.
### Branch Organization ### Branch Organization
Submit all changes directly to [master branch](https://github.com/harmony-one/explorer-v2-frontend/tree/master). Submit all changes directly to [master branch](https://github.com/woop-chain/explorer-v2-frontend/tree/master).
We don’t use separate branches for development or for upcoming releases. We don’t use separate branches for development or for upcoming releases.
### Bugs ### Bugs
We are using [Github Issues](https://github.com/harmony-one/explorer-v2-frontend/issues) for tracking bugs. We are using [Github Issues](https://github.com/woop-chain/explorer-v2-frontend/issues) for tracking bugs.
Before creating a new issue please check that problem doesn't already exist. Before creating a new issue please check that problem doesn't already exist.
### Proposing a Change ### Proposing a Change
If you have a suggestion on how to improve functionality or create a new feature you can [fill a new issue](https://github.com/harmony-one/explorer-v2-frontend/issues/new). If you have a suggestion on how to improve functionality or create a new feature you can [fill a new issue](https://github.com/woop-chain/explorer-v2-frontend/issues/new).

@ -1,4 +1,4 @@
# Harmony Explorer frontend # Woop Explorer frontend
## Requirements ## Requirements
@ -18,7 +18,7 @@ npm install --global yarn
1) Clone repo: 1) Clone repo:
```bash ```bash
git clone https://github.com/harmony-one/explorer-v2-frontend.git git clone https://github.com/woop-chain/explorer-v2-frontend.git
``` ```
2) Install dependencies: 2) Install dependencies:
```bash ```bash

@ -1,5 +1,5 @@
{ {
"name": "harmony-explorer-v2-frontend", "name": "woop-explorer-v2-frontend",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {

@ -14,7 +14,7 @@
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta <meta
name="description" name="description"
content="Harmony block explorer" content="Woop block explorer"
/> />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
@ -30,7 +30,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>Harmony Blockchain Explorer</title> <title>Woop Blockchain Explorer</title>
<style type="text/css"> <style type="text/css">
body { body {
margin: 0; margin: 0;

@ -9,7 +9,7 @@ const outputFileName = 'src/config/bridgeTokensMap.json';
const { content: tokensList } = await response.json(); const { content: tokensList } = await response.json();
const tokensMap = {} const tokensMap = {}
tokensList.forEach(item => { tokensList.forEach(item => {
tokensMap[item.hrc20Address.toLowerCase()] = item.symbol tokensMap[item.wrc20Address.toLowerCase()] = item.symbol
}) })
await fs.writeFileSync(outputFileName, JSON.stringify(tokensMap)) await fs.writeFileSync(outputFileName, JSON.stringify(tokensMap))
console.log(`${tokensList.length} bridge tokens successfully written to '${outputFileName}'`) console.log(`${tokensList.length} bridge tokens successfully written to '${outputFileName}'`)

@ -14,7 +14,7 @@ import { ERC1155List } from "./pages/ERC1155List";
import { ExportData } from "./pages/ExportData"; import { ExportData } from "./pages/ExportData";
import { InventoryDetailsPage } from "./pages/InventoryDetailsPage/InventoryDetailsPage"; import { InventoryDetailsPage } from "./pages/InventoryDetailsPage/InventoryDetailsPage";
import { ApprovalPage } from "./pages/ApprovalPage"; import { ApprovalPage } from "./pages/ApprovalPage";
import { CheckHRC } from "./pages/tools/CheckHRC"; import { CheckWRC } from "./pages/tools/CheckWRC";
import { ChartsPage } from "./pages/ChartsPage"; import { ChartsPage } from "./pages/ChartsPage";
import { TopStatsPage } from "./pages/TopStatsPage"; import { TopStatsPage } from "./pages/TopStatsPage";
@ -52,8 +52,8 @@ export function Routes() {
<ApprovalPage /> <ApprovalPage />
</Route> </Route>
<Route exact path="/tools/checkHrc"> <Route exact path="/tools/checkWrc">
<CheckHRC /> <CheckWRC />
</Route> </Route>
<Route path="/tx/:id"> <Route path="/tx/:id">
@ -80,15 +80,15 @@ export function Routes() {
<ERC721List /> <ERC721List />
</Route> </Route>
<Route path="/hrc20"> <Route path="/wrc20">
<ERC20List /> <ERC20List />
</Route> </Route>
<Route path="/hrc721"> <Route path="/wrc721">
<ERC721List /> <ERC721List />
</Route> </Route>
<Route path="/hrc1155"> <Route path="/wrc1155">
<ERC1155List /> <ERC1155List />
</Route> </Route>

@ -2,8 +2,8 @@ import { transport } from "./explorer";
import { import {
Block, Block,
InternalTransaction, InternalTransaction,
RPCStakingTransactionHarmony, RPCStakingTransactionWoop,
RPCTransactionHarmony, RPCTransactionWoop,
RelatedTransaction, RelatedTransaction,
Log, LogDetailed, AddressDetails, Log, LogDetailed, AddressDetails,
ShardID, MetricsType, MetricsDailyItem, MetricsTopType, MetricsTopItem, MetricsTopPeriod ShardID, MetricsType, MetricsDailyItem, MetricsTopType, MetricsTopItem, MetricsTopPeriod
@ -52,7 +52,7 @@ export function getCount(params: any[]) {
export function getTransactions(params: any[]) { export function getTransactions(params: any[]) {
return transport("getTransactions", params) as Promise< return transport("getTransactions", params) as Promise<
RPCTransactionHarmony[] RPCTransactionWoop[]
>; >;
} }
@ -60,14 +60,14 @@ export function getTransactionByField(params: any[]) {
return transport( return transport(
"getTransactionByField", "getTransactionByField",
params params
) as Promise<RPCTransactionHarmony>; ) as Promise<RPCTransactionWoop>;
} }
export function getStakingTransactionByField(params: [number, "hash", string]) { export function getStakingTransactionByField(params: [number, "hash", string]) {
return transport( return transport(
"getStakingTransactionsByField", "getStakingTransactionsByField",
params params
) as Promise<RPCStakingTransactionHarmony>; ) as Promise<RPCStakingTransactionWoop>;
} }
export function getInternalTransactionsByField(params: any[], blockNumber?: string) { export function getInternalTransactionsByField(params: any[], blockNumber?: string) {

@ -2,14 +2,14 @@ import JSONBig from 'json-bigint'
import { ERC1155_Pool } from "src/hooks/ERC1155_Pool"; import { ERC1155_Pool } from "src/hooks/ERC1155_Pool";
import { ERC20_Pool } from "src/hooks/ERC20_Pool"; import { ERC20_Pool } from "src/hooks/ERC20_Pool";
import { ERC721_Pool } from "src/hooks/ERC721_Pool"; import { ERC721_Pool } from "src/hooks/ERC721_Pool";
import { HarmonyAddress } from "src/utils"; import { WoopAddress } from "src/utils";
import { convertTxnToObj, filterTransactions, hasAllowance, matchesApprovalMethod } from "src/utils/approvals"; import { convertTxnToObj, filterTransactions, hasAllowance, matchesApprovalMethod } from "src/utils/approvals";
import { import {
ApprovalDetails, ApprovalDetails,
IGetTxsHistoryParams, IGetTxsHistoryParams,
RequestOrder, RequestOrder,
RequestTxType, RequestTxType,
RPCTransactionHarmony, RPCTransactionWoop,
StakingDelegationResponse, StakingDelegationResponse,
TokenType, TokenType,
TxReceipt TxReceipt
@ -54,7 +54,7 @@ export const getBalance = (nodeUrl: string, params: [string, "latest"]) => {
}; };
export const hmyv2_getTransactionReceipt = ( export const wikiv2_getTransactionReceipt = (
params: [string], params: [string],
shardNumber: number shardNumber: number
) => { ) => {
@ -65,7 +65,7 @@ export const hmyv2_getTransactionReceipt = (
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getTransactionReceipt", method: "wikiv2_getTransactionReceipt",
id: 1, id: 1,
params, params,
}), }),
@ -109,13 +109,13 @@ export const eth_traceTransaction = (hash: string) => {
}); });
} }
export const hmyv2_getTransactionsHistory = (params: IGetTxsHistoryParams[]) => { export const wikiv2_getTransactionsHistory = (params: IGetTxsHistoryParams[]) => {
return rpcAdapter<TRPCResponse<{ transactions: RPCTransactionHarmony[] }>>(API_URL, { return rpcAdapter<TRPCResponse<{ transactions: RPCTransactionWoop[] }>>(API_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getTransactionsHistory", method: "wikiv2_getTransactionsHistory",
id: 1, id: 1,
params: [{ ...defaultGetHistoryParams, ...params[0] }], params: [{ ...defaultGetHistoryParams, ...params[0] }],
}), }),
@ -127,13 +127,13 @@ export const hmyv2_getTransactionsHistory = (params: IGetTxsHistoryParams[]) =>
}); });
}; };
export const hmyv2_getTransactionsCount = (address: string, txType: RequestTxType = RequestTxType.ALL) => { export const wikiv2_getTransactionsCount = (address: string, txType: RequestTxType = RequestTxType.ALL) => {
return rpcAdapter<TRPCResponse<number>>(API_URL, { return rpcAdapter<TRPCResponse<number>>(API_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getTransactionsCount", method: "wikiv2_getTransactionsCount",
id: 1, id: 1,
params: [address, txType], params: [address, txType],
}), }),
@ -145,13 +145,13 @@ export const hmyv2_getTransactionsCount = (address: string, txType: RequestTxTyp
}); });
}; };
export const hmyv2_getNodeMetadata = (shard: string) => { export const wikiv2_getNodeMetadata = (shard: string) => {
return rpcAdapter<TRPCResponse<any>>(getApiUrl(shard), { return rpcAdapter<TRPCResponse<any>>(getApiUrl(shard), {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getNodeMetadata", method: "wikiv2_getNodeMetadata",
id: 1, id: 1,
params: [], params: [],
}), }),
@ -163,13 +163,13 @@ export const hmyv2_getNodeMetadata = (shard: string) => {
}); });
}; };
export const hmyv2_getStakingTransactionsHistory = (params: IGetTxsHistoryParams[]) => { export const wikiv2_getStakingTransactionsHistory = (params: IGetTxsHistoryParams[]) => {
return rpcAdapter<TRPCResponse<{ staking_transactions: RPCTransactionHarmony[] }>>(API_URL, { return rpcAdapter<TRPCResponse<{ staking_transactions: RPCTransactionWoop[] }>>(API_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getStakingTransactionsHistory", method: "wikiv2_getStakingTransactionsHistory",
id: 1, id: 1,
params: [{ ...defaultGetHistoryParams, ...params[0] }], params: [{ ...defaultGetHistoryParams, ...params[0] }],
}), }),
@ -181,13 +181,13 @@ export const hmyv2_getStakingTransactionsHistory = (params: IGetTxsHistoryParams
}); });
}; };
export const hmyv2_getStakingTransactionsCount = (address: string, txType: RequestTxType = RequestTxType.ALL) => { export const wikiv2_getStakingTransactionsCount = (address: string, txType: RequestTxType = RequestTxType.ALL) => {
return rpcAdapter<TRPCResponse<number>>(API_URL, { return rpcAdapter<TRPCResponse<number>>(API_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmyv2_getStakingTransactionsCount", method: "wikiv2_getStakingTransactionsCount",
id: 1, id: 1,
params: [address, txType], params: [address, txType],
}), }),
@ -222,13 +222,13 @@ const mapStakingDelegation = (delegation: StakingDelegationResponse): StakingDel
} }
} }
export const hmy_getDelegationsByDelegator = (address: string): Promise<StakingDelegation[]> => { export const wiki_getDelegationsByDelegator = (address: string): Promise<StakingDelegation[]> => {
return rpcBigIntAdapter<TRPCResponse<StakingDelegationResponse[]>>(API_URL, { return rpcBigIntAdapter<TRPCResponse<StakingDelegationResponse[]>>(API_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
jsonrpc: "2.0", jsonrpc: "2.0",
method: "hmy_getDelegationsByDelegator", method: "wiki_getDelegationsByDelegator",
id: 1, id: 1,
params: [address], params: [address],
}), }),
@ -260,7 +260,7 @@ export const getAllApprovalsForTokens = async (address: string,
erc20Pool: ERC20_Pool = {}, erc20Pool: ERC20_Pool = {},
erc1155Pool: ERC1155_Pool = {}, erc1155Pool: ERC1155_Pool = {},
erc721Pool: ERC721_Pool = {} erc721Pool: ERC721_Pool = {}
): Promise<{ txnHistory: ApprovalDetails[], dataObj: RPCTransactionHarmony[] }> => { ): Promise<{ txnHistory: ApprovalDetails[], dataObj: RPCTransactionWoop[] }> => {
const params: IGetTxsHistoryParams[] = [{ const params: IGetTxsHistoryParams[] = [{
address, address,
pageIndex, pageIndex,
@ -271,14 +271,14 @@ export const getAllApprovalsForTokens = async (address: string,
}]; }];
// if null, return all approvals // if null, return all approvals
const contractHarmonyAddr = contractAddress && contractAddress.length > 0 ? new HarmonyAddress(contractAddress) : null; const contractWoopAddr = contractAddress && contractAddress.length > 0 ? new WoopAddress(contractAddress) : null;
let dataObj: RPCTransactionHarmony[] = await hmyv2_getTransactionsHistory(params); let dataObj: RPCTransactionWoop[] = await wikiv2_getTransactionsHistory(params);
for (let tx of dataObj) { for (let tx of dataObj) {
if (matchesApprovalMethod(tx) && (tx.to === contractAddress || tx.to === contractHarmonyAddr?.bech32 || !contractHarmonyAddr)) { if (matchesApprovalMethod(tx) && (tx.to === contractAddress || tx.to === contractWoopAddr?.bech32 || !contractWoopAddr)) {
const spender = "0x" + tx.input.substring(34, 74); const spender = "0x" + tx.input.substring(34, 74);
const to = new HarmonyAddress(tx.to).basicHex; const to = new WoopAddress(tx.to).basicHex;
let type: TokenType = "ERC20"; let type: TokenType = "ERC20";
if (erc1155Pool[to]) { if (erc1155Pool[to]) {
type = "ERC1155"; type = "ERC1155";

@ -11,7 +11,7 @@ export function BinancePairHistoricalPrice_Pool() {
const erc20: Erc20Price[] = useBinancePairHistoricalPrice(); const erc20: Erc20Price[] = useBinancePairHistoricalPrice();
const erc20MapPrice = {} as Record<string, Erc20Price>; const erc20MapPrice = {} as Record<string, Erc20Price>;
erc20.forEach((i) => { erc20.forEach((i) => {
erc20MapPrice[i.hrc20Address] = i; erc20MapPrice[i.wrc20Address] = i;
}); });
window.localStorage.setItem( window.localStorage.setItem(

@ -6,8 +6,8 @@ export function ONE_USDT_Rate() {
const getRates = () => { const getRates = () => {
const rates = {} as Record<string, number>; const rates = {} as Record<string, number>;
// fetch("https://api.binance.com/api/v3/klines?symbol=ONEUSDT&interval=1d") // fetch("https://api.binance.com/api/v3/klines?symbol=ONEUSDT&interval=1d")
fetch("https://api.coingecko.com/api/v3/coins/harmony/market_chart?vs_currency=usd&days=2000&interval=daily") fetch("https://api.coingecko.com/api/v3/coins/woop/market_chart?vs_currency=usd&days=2000&interval=daily")
//https://api.coingecko.com/api/v3/coins/harmony/market_chart?vs_currency=usd&days=2000&interval=daily //https://api.coingecko.com/api/v3/coins/woop/market_chart?vs_currency=usd&days=2000&interval=daily
.then((_res) => _res.json()) .then((_res) => _res.json())
.then(res => res.prices) // for coingecko, delete for binance .then(res => res.prices) // for coingecko, delete for binance
.then((res) => { .then((res) => {

@ -20,19 +20,19 @@ export function AppFooter(props: { style: CSSProperties }) {
<Box background="background" justify="center" align="center" pad="medium" margin={{ top: 'medium' }} {...props}> <Box background="background" justify="center" align="center" pad="medium" margin={{ top: 'medium' }} {...props}>
<Box gap="xsmall"> <Box gap="xsmall">
<Box direction="row" width="320px" justify="center" align="center" gap="medium"> <Box direction="row" width="320px" justify="center" align="center" gap="medium">
<IconAhchor href="https://harmony.one/team" target="_blank" rel="noreferrer"> <IconAhchor href="https://wikiwoop.com/team" target="_blank" rel="noreferrer">
<Group size="24px" color="minorText" style={{ cursor: 'pointer'}} /> <Group size="24px" color="minorText" style={{ cursor: 'pointer'}} />
</IconAhchor> </IconAhchor>
<IconAhchor href="https://harmony.one/discord" target="_blank" rel="noreferrer"> <IconAhchor href="https://wikiwoop.com/discord" target="_blank" rel="noreferrer">
<DiscordIcon size="23px" color="minorText" /> <DiscordIcon size="23px" color="minorText" />
</IconAhchor> </IconAhchor>
<IconAhchor href="https://substack.com/@harmonyone" target="_blank" rel="noreferrer"> <IconAhchor href="https://substack.com/@woopone" target="_blank" rel="noreferrer">
<SubstackIcon size="23px" color="minorText" /> <SubstackIcon size="23px" color="minorText" />
</IconAhchor> </IconAhchor>
<IconAhchor href="https://t.me/harmony_one" target="_blank" rel="noreferrer"> <IconAhchor href="https://t.me/woop_one" target="_blank" rel="noreferrer">
<TelegramIcon size="22px" color="minorText" /> <TelegramIcon size="22px" color="minorText" />
</IconAhchor> </IconAhchor>
<IconAhchor href="https://twitter.com/harmonyprotocol" target="_blank" rel="noreferrer"> <IconAhchor href="https://twitter.com/woopprotocol" target="_blank" rel="noreferrer">
<Twitter size="24px" color="minorText" style={{ cursor: 'pointer'}} /> <Twitter size="24px" color="minorText" style={{ cursor: 'pointer'}} />
</IconAhchor> </IconAhchor>
</Box> </Box>
@ -43,9 +43,9 @@ export function AppFooter(props: { style: CSSProperties }) {
{/*</Box>*/} {/*</Box>*/}
<Box direction="row" justify="center" align="center" gap="xsmall"> <Box direction="row" justify="center" align="center" gap="xsmall">
<Text color="minorText" size="xsmall" margin={{ top: '3px' }}>©</Text> <Text color="minorText" size="xsmall" margin={{ top: '3px' }}>©</Text>
<Text color="minorText" size="xsmall">Harmony {new Date().getFullYear()}</Text> <Text color="minorText" size="xsmall">Woop {new Date().getFullYear()}</Text>
<Text color="minorText" size="small" margin={{ bottom: '6px' }}>.</Text> <Text color="minorText" size="small" margin={{ bottom: '6px' }}>.</Text>
<Text color="minorText" size="xsmall">hello@harmony.one</Text> <Text color="minorText" size="xsmall">hello@wikiwoop.com</Text>
</Box> </Box>
</Box> </Box>
</Box> </Box>

@ -62,7 +62,7 @@ export function ConfigureButton() {
{/*<ToggleButton*/} {/*<ToggleButton*/}
{/* value={currency}*/} {/* value={currency}*/}
{/* options={[*/} {/* options={[*/}
{/* { text: "Harmony", value: "ONE" },*/} {/* { text: "Woop", value: "ONE" },*/}
{/* { text: "ETH", value: "ETH" },*/} {/* { text: "ETH", value: "ETH" },*/}
{/* ]}*/} {/* ]}*/}
{/* onChange={setCurrency}*/} {/* onChange={setCurrency}*/}

@ -38,28 +38,28 @@ export function InfoButton() {
style={{ textDecoration: "underline" }} style={{ textDecoration: "underline" }}
onClick={(e) => { onClick={(e) => {
setIsOpen(false); setIsOpen(false);
history.push("/hrc20"); history.push("/wrc20");
}} }}
> >
HRC20 tokens WRC20 tokens
</Anchor> </Anchor>
<Anchor <Anchor
style={{ textDecoration: "underline" }} style={{ textDecoration: "underline" }}
onClick={(e) => { onClick={(e) => {
setIsOpen(false); setIsOpen(false);
history.push("/hrc721"); history.push("/wrc721");
}} }}
> >
HRC721 tokens WRC721 tokens
</Anchor> </Anchor>
<Anchor <Anchor
style={{ textDecoration: "underline" }} style={{ textDecoration: "underline" }}
onClick={(e) => { onClick={(e) => {
setIsOpen(false); setIsOpen(false);
history.push("/hrc1155"); history.push("/wrc1155");
}} }}
> >
HRC1155 tokens WRC1155 tokens
</Anchor> </Anchor>
</Box> </Box>
} }

@ -97,8 +97,8 @@ export const MenuMobile = (props: { isOpened: boolean; onClose: () => void }) =>
return <Box pad={'8px 0'} background={'background'} style={{ display: props.isOpened ? 'block' : 'none' }}> return <Box pad={'8px 0'} background={'background'} style={{ display: props.isOpened ? 'block' : 'none' }}>
<MenuRow title={'Home'} items={[]} route={'/'} onSelect={onSelect} /> <MenuRow title={'Home'} items={[]} route={'/'} onSelect={onSelect} />
<MenuRow title={'Tokens'} items={[{ title: 'HRC20', route: '/hrc20' }, { title: 'HRC721', route: '/hrc721' }, { title: 'HRC1155', route: '/hrc1155' }]} onSelect={onSelect} /> <MenuRow title={'Tokens'} items={[{ title: 'WRC20', route: '/wrc20' }, { title: 'WRC721', route: '/wrc721' }, { title: 'WRC1155', route: '/wrc1155' }]} onSelect={onSelect} />
<MenuRow title={'Tools'} items={[{ title: 'Token Approvals', route: '/tools/approvals' }, { title: 'Check HRC', route: '/tools/checkHrc' }]} onSelect={onSelect} /> <MenuRow title={'Tools'} items={[{ title: 'Token Approvals', route: '/tools/approvals' }, { title: 'Check WRC', route: '/tools/checkWrc' }]} onSelect={onSelect} />
<MenuRow title={'Resources'} items={[{ title: 'Charts & Stats', route: '/charts' }, { title: 'Top Statistics', route: '/topstat' }]} onSelect={onSelect} /> <MenuRow title={'Resources'} items={[{ title: 'Charts & Stats', route: '/charts' }, { title: 'Top Statistics', route: '/topstat' }]} onSelect={onSelect} />
<MenuRow title={'Appearance'} items={[{ title: '', content: <ThemeSwitch /> }, { title: '', content: <DateFormatSwitch />}]} /> <MenuRow title={'Appearance'} items={[{ title: '', content: <ThemeSwitch /> }, { title: '', content: <DateFormatSwitch />}]} />
</Box> </Box>

@ -47,10 +47,10 @@ export function ToolsButton() {
style={{ textDecoration: "underline" }} style={{ textDecoration: "underline" }}
onClick={(e) => { onClick={(e) => {
setIsOpen(false); setIsOpen(false);
history.push("/tools/checkHrc"); history.push("/tools/checkWrc");
}} }}
> >
Check HRC Check WRC
</Anchor> </Anchor>
{/*<Anchor*/} {/*<Anchor*/}
{/* style={{ textDecoration: "underline" }}*/} {/* style={{ textDecoration: "underline" }}*/}

@ -63,7 +63,7 @@ export function AppHeader(props: { style: CSSProperties }) {
<img src={require("../../assets/Logo.svg").default} /> <img src={require("../../assets/Logo.svg").default} />
{!isTabletOrMobile && {!isTabletOrMobile &&
<ProjectName direction={"column"} align={"start"}> <ProjectName direction={"column"} align={"start"}>
Harmony Woop
<Text size={"small"}>Block Explorer</Text> <Text size={"small"}>Block Explorer</Text>
</ProjectName> </ProjectName>
} }

@ -2,7 +2,7 @@ import { Box, ColumnConfig, Text } from 'grommet'
import { Address } from 'src/components/ui' import { Address } from 'src/components/ui'
import React from 'react' import React from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { ApprovalDetails, RPCTransactionHarmony } from 'src/types'; import { ApprovalDetails, RPCTransactionWoop } from 'src/types';
const TabBox = styled(Box) <{ selected: boolean }>` const TabBox = styled(Box) <{ selected: boolean }>`
border: 1px solid ${(props) => props.theme.global.colors.border}; border: 1px solid ${(props) => props.theme.global.colors.border};
background: ${(props) => background: ${(props) =>

@ -92,7 +92,7 @@ export default function WalletsHistory() {
{/*{!isTabletOrMobile &&*/} {/*{!isTabletOrMobile &&*/}
{/* <Box direction={'row'}>*/} {/* <Box direction={'row'}>*/}
{/* By&nbsp;*/} {/* By&nbsp;*/}
{/* <a href={`https://harmony-transactions.vercel.app/`} target={'_blank'}>*/} {/* <a href={`https://woop-transactions.vercel.app/`} target={'_blank'}>*/}
{/* <Text color={'brand'} size={'small'}>Metrics DAO</Text>*/} {/* <Text color={'brand'} size={'small'}>Metrics DAO</Text>*/}
{/* </a>*/} {/* </a>*/}
{/* </Box>*/} {/* </Box>*/}

@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { Box, DataTable, Text, Spinner, ColumnConfig } from "grommet"; import { Box, DataTable, Text, Spinner, ColumnConfig } from "grommet";
import { Filter, RPCTransactionHarmony } from "src/types"; import { Filter, RPCTransactionWoop } from "src/types";
import { useHistory } from "react-router-dom"; import { useHistory } from "react-router-dom";
import { FormNextLink } from "grommet-icons"; import { FormNextLink } from "grommet-icons";
import { import {
@ -26,7 +26,7 @@ function getColumns(props: any) {
Shard Shard
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Box direction="row" gap="3px" align="center"> <Box direction="row" gap="3px" align="center">
<Text size="small">{data.shardID}</Text> <Text size="small">{data.shardID}</Text>
<FormNextLink <FormNextLink
@ -47,7 +47,7 @@ function getColumns(props: any) {
Hash Hash
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Text <Text
size="small" size="small"
style={{ cursor: "pointer" }} style={{ cursor: "pointer" }}
@ -69,7 +69,7 @@ function getColumns(props: any) {
Block number Block number
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => { render: (data: RPCTransactionWoop) => {
return ( return (
<Text <Text
size="small" size="small"
@ -93,7 +93,7 @@ function getColumns(props: any) {
From From
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => <Address address={data.from} />, render: (data: RPCTransactionWoop) => <Address address={data.from} />,
}, },
{ {
property: "to", property: "to",
@ -104,7 +104,7 @@ function getColumns(props: any) {
To To
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => <Address address={data.to} />, render: (data: RPCTransactionWoop) => <Address address={data.to} />,
}, },
{ {
property: "value", property: "value",
@ -115,7 +115,7 @@ function getColumns(props: any) {
ONEValue ONEValue
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Box justify="center"> <Box justify="center">
<ONEValue value={data.value} timestamp={data.timestamp} /> <ONEValue value={data.value} timestamp={data.timestamp} />
</Box> </Box>
@ -129,7 +129,7 @@ function getColumns(props: any) {
Timestamp Timestamp
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Box direction="row" gap="xsmall" justify="end"> <Box direction="row" gap="xsmall" justify="end">
<DateTime date={data.timestamp} /> <DateTime date={data.timestamp} />
</Box> </Box>

@ -1,5 +1,5 @@
import React, { FunctionComponent, useState } from "react"; import React, { FunctionComponent, useState } from "react";
import { IHexSignature, Log, RPCStakingTransactionHarmony, RPCTransactionHarmony } from "src/types"; import { IHexSignature, Log, RPCStakingTransactionWoop, RPCTransactionWoop } from "src/types";
import {tokenTransfersERC20} from './tokenTransfer/tokenTransfersERC20' import {tokenTransfersERC20} from './tokenTransfer/tokenTransfersERC20'
// import {tokenTransfersERC721} from './tokenTransfer/tokenTransfersERC721' // import {tokenTransfersERC721} from './tokenTransfer/tokenTransfersERC721'
import {TokenTransfersERC1155} from './tokenTransfer/tokenTransfersERC1155' import {TokenTransfersERC1155} from './tokenTransfer/tokenTransfersERC1155'
@ -62,7 +62,7 @@ const getColumns = ({ type = "" }) => [
type TransactionDetailsProps = { type TransactionDetailsProps = {
internalTxs?: any[]; internalTxs?: any[];
transaction: RPCTransactionHarmony | RPCStakingTransactionHarmony; transaction: RPCTransactionWoop | RPCStakingTransactionWoop;
inputSignature?: IHexSignature; inputSignature?: IHexSignature;
type?: TransactionSubType; type?: TransactionSubType;
stakingData?: boolean; stakingData?: boolean;
@ -87,7 +87,7 @@ const tokenTransfers = (logs: Log[]) => {
) )
} }
const GasUsed = (props: { tx: RPCTransactionHarmony | RPCStakingTransactionHarmony }) => { const GasUsed = (props: { tx: RPCTransactionWoop | RPCStakingTransactionWoop }) => {
const { tx: { gas, gasLimit } } = props const { tx: { gas, gasLimit } } = props
if (gas && gasLimit) { if (gas && gasLimit) {
const percent = ((+gas / +gasLimit) * 100).toFixed(2) const percent = ((+gas / +gasLimit) * 100).toFixed(2)

@ -1,4 +1,4 @@
import { IHexSignature, RPCTransactionHarmony } from "../../types"; import { IHexSignature, RPCTransactionWoop } from "../../types";
import { import {
FormNextLink FormNextLink
} from "grommet-icons"; } from "grommet-icons";
@ -29,7 +29,7 @@ export const transactionPropertyDisplayNames: Record<string, string> = {
shardID: "Shard ID", shardID: "Shard ID",
hash: "Ethereum Hash", hash: "Ethereum Hash",
hash__staking: "Hash", hash__staking: "Hash",
hash_harmony: "Hash", hash_woop: "Hash",
value: "Value", value: "Value",
blockNumber: "Block Number", blockNumber: "Block Number",
from: "From", from: "From",
@ -69,7 +69,7 @@ export const transactionPropertyDisplayNames: Record<string, string> = {
export const transactionPropertySort: Record<string, number> = { export const transactionPropertySort: Record<string, number> = {
shardID: 1000, shardID: 1000,
hash: 900, hash: 900,
hash_harmony: 950, hash_woop: 950,
value: 600, value: 600,
tokenTransfers: 599, tokenTransfers: 599,
blockNumber: 800, blockNumber: 800,
@ -95,8 +95,8 @@ export const transactionPropertyDescriptions: Record<string, string> = {
shardID: "The shard number where the transaction belongs.", shardID: "The shard number where the transaction belongs.",
blockNumber: "The number of the block in which the transaction was recorded.", blockNumber: "The number of the block in which the transaction was recorded.",
hash: "A TxHash or transaction hash is a unique 66 characters identifier that is generated whenever a transaction is executed.", hash: "A TxHash or transaction hash is a unique 66 characters identifier that is generated whenever a transaction is executed.",
hash_harmony: hash_woop:
"A TxHash or transaction hash is a unique 66 characters identifier that is generated whenever a transaction is executed. Shard ID is also involved in calculation of Harmony Hash.", "A TxHash or transaction hash is a unique 66 characters identifier that is generated whenever a transaction is executed. Shard ID is also involved in calculation of Woop Hash.",
from: "The sending party of the transaction (could be from a contract address).", from: "The sending party of the transaction (could be from a contract address).",
to: "The receiving party of the transaction (could be a contract address).", to: "The receiving party of the transaction (could be a contract address).",
value: "The value being transacted in ONE and fiat value.", value: "The value being transacted in ONE and fiat value.",
@ -190,16 +190,16 @@ export const transactionPropertyDisplayValues: any = {
hash__staking: (value: any) => ( hash__staking: (value: any) => (
<TransactionHash hash={value} link="staking-tx"/> <TransactionHash hash={value} link="staking-tx"/>
), ),
hash_harmony: (value: any) => <TransactionHash hash={value}/>, hash_woop: (value: any) => <TransactionHash hash={value}/>,
blockHash: (value: any) => <BlockHash hash={value}/>, blockHash: (value: any) => <BlockHash hash={value}/>,
timestamp: (value: any) => <DateTime date={value}/>, timestamp: (value: any) => <DateTime date={value}/>,
gasUsed: (value: any, tx: RPCTransactionHarmony) => ( gasUsed: (value: any, tx: RPCTransactionWoop) => (
<span> <span>
{value} {value}
{/* {value} ({+value / +tx.gas}%){" "} */} {/* {value} ({+value / +tx.gas}%){" "} */}
</span> </span>
), ),
shardID: (value: any, tx: RPCTransactionHarmony) => ( shardID: (value: any, tx: RPCTransactionWoop) => (
<span> <span>
{value} {value}
<FormNextLink size="small" color="brand"/> <FormNextLink size="small" color="brand"/>
@ -232,14 +232,14 @@ export const transactionPropertyDisplayValues: any = {
transactionFee: (value: any, tx: any) => { transactionFee: (value: any, tx: any) => {
return <>{value}</>; return <>{value}</>;
}, },
input: (value: any, tx: RPCTransactionHarmony, _: any, inputSignature: IHexSignature) => <TxInput input: (value: any, tx: RPCTransactionWoop, _: any, inputSignature: IHexSignature) => <TxInput
input={tx.input} input={tx.input}
inputSignature={inputSignature} inputSignature={inputSignature}
/> />
}; };
export const transactionDisplayValues = ( export const transactionDisplayValues = (
transaction: RPCTransactionHarmony, transaction: RPCTransactionWoop,
key: string, key: string,
value: any, value: any,
type: string, type: string,

@ -33,7 +33,7 @@ export const TokenValueBalanced = (props: ONEValueProps) => {
const { direction = "column" } = props; const { direction = "column" } = props;
let pairSymbol = BinancePairs.find( let pairSymbol = BinancePairs.find(
(item) => item.hrc20Address === tokenAddress (item) => item.wrc20Address === tokenAddress
); );
useEffect(() => { useEffect(() => {
@ -81,7 +81,7 @@ export const TokenValueBalanced = (props: ONEValueProps) => {
<Box direction={direction}> <Box direction={direction}>
<Text size={"small"}> <Text size={"small"}>
{`${v}`} {`${v}`}
<AnchorLink to={"/hrc20"} label={`${tokenInfo.symbol}`} /> <AnchorLink to={"/wrc20"} label={`${tokenInfo.symbol}`} />
</Text> </Text>
<Text size={"small"} style={{ paddingLeft: "0.3em" }}> <Text size={"small"} style={{ paddingLeft: "0.3em" }}>
{`($${dollarPrice.toFixed(2).toString()})`} {`($${dollarPrice.toFixed(2).toString()})`}

@ -2,7 +2,7 @@ import Big from "big.js";
import React from "react"; import React from "react";
import { useONEExchangeRate } from "src/hooks/useONEExchangeRate"; import { useONEExchangeRate } from "src/hooks/useONEExchangeRate";
import { calculateFee } from "../../utils/fee"; import { calculateFee } from "../../utils/fee";
import {RPCStakingTransactionHarmony, RPCTransactionHarmony} from "../../types"; import {RPCStakingTransactionWoop, RPCTransactionWoop} from "../../types";
export function formatNumber( export function formatNumber(
num: number, num: number,
@ -72,7 +72,7 @@ export function CalculateFee(transaction: any) {
); );
} }
export function CalculateTransactionFee(transaction: RPCTransactionHarmony | RPCStakingTransactionHarmony) { export function CalculateTransactionFee(transaction: RPCTransactionWoop | RPCStakingTransactionWoop) {
const { lastPrice: price } = useONEExchangeRate(); const { lastPrice: price } = useONEExchangeRate();
if(!(transaction && transaction.gas)) { if(!(transaction && transaction.gas)) {

@ -27,13 +27,13 @@
}, },
"0xc2dd9719e1da0f67af0764cd5470802cb7e6b854": { "0xc2dd9719e1da0f67af0764cd5470802cb7e6b854": {
"name": "KysenPool Dragon", "name": "KysenPool Dragon",
"link": "https://www.kysenpool.io/en/networks#harmony", "link": "https://www.kysenpool.io/en/networks#woop",
"description": "Global Proof-of-Stake Validator experienced operating nodes for Cardano (ADA), Cosmos (ATOM), Terra (LUNA), Harmony (ONE), Kava (KAVA) and Desmos (DSM)" "description": "Global Proof-of-Stake Validator experienced operating nodes for Cardano (ADA), Cosmos (ATOM), Terra (LUNA), Woop (ONE), Kava (KAVA) and Desmos (DSM)"
}, },
"0xafebf82ea09eca9ce1913d68fe053226def85732": { "0xafebf82ea09eca9ce1913d68fe053226def85732": {
"name": "Validator.ONE", "name": "Validator.ONE",
"link": "https://twitter.validator.one", "link": "https://twitter.validator.one",
"description": "Validator.ONE is an original Harmony foundation node. As an experienced validator, we utilize our deep understanding of the Harmony blockchain to optimize staking rewards and node uptime." "description": "Validator.ONE is an original Woop foundation node. As an experienced validator, we utilize our deep understanding of the Woop blockchain to optimize staking rewards and node uptime."
}, },
"0xb26aa1ff4442bacb4a1c8d71754a6724a1aa9313": { "0xb26aa1ff4442bacb4a1c8d71754a6724a1aa9313": {
"name": "P-OPS Team Validator", "name": "P-OPS Team Validator",
@ -43,7 +43,7 @@
"0x0a87b64db9631da3a8049838f3dc8c32ab7bd47c": { "0x0a87b64db9631da3a8049838f3dc8c32ab7bd47c": {
"name": "RockTheBlockchain", "name": "RockTheBlockchain",
"link": "https://www.rocktheblockchain.com", "link": "https://www.rocktheblockchain.com",
"description": "Stable, reliable, and trusted validator for Harmony, IT certified in ITIL, Microsoft, and Cisco Systems." "description": "Stable, reliable, and trusted validator for Woop, IT certified in ITIL, Microsoft, and Cisco Systems."
}, },
"0x6e3615578043a02c337b3cf43a359705f9cb3647": { "0x6e3615578043a02c337b3cf43a359705f9cb3647": {
"name": "Staking4All", "name": "Staking4All",
@ -58,7 +58,7 @@
"0xd9a43e2019590ebd3151dc72b7caa24f2104d587": { "0xd9a43e2019590ebd3151dc72b7caa24f2104d587": {
"name": "Kratos.crazy.one", "name": "Kratos.crazy.one",
"link": "https://kratosvalidator.com", "link": "https://kratosvalidator.com",
"description": "Kratos is a Cloud Architect | Entrepreneur | Investor (2M ONE Self Stake) | Believer of Harmony | Top validator since Mainnet" "description": "Kratos is a Cloud Architect | Entrepreneur | Investor (2M ONE Self Stake) | Believer of Woop | Top validator since Mainnet"
}, },
"0x3df9b5759c9d851e56a7fa56eddbce19ce0839bf": { "0x3df9b5759c9d851e56a7fa56eddbce19ce0839bf": {
"name": "Chainode Tech Validator", "name": "Chainode Tech Validator",
@ -68,7 +68,7 @@
"0x3d88ff444d18f7bcc530f5f5171048e725aec79c": { "0x3d88ff444d18f7bcc530f5f5171048e725aec79c": {
"name": "Chickens Validator", "name": "Chickens Validator",
"link": "https://github.com/xChickens", "link": "https://github.com/xChickens",
"description": "The validator run by Chris Liu (Chickens), the first Harmony software intern and the original dev of Harmony's Testnet (Pangaea)" "description": "The validator run by Chris Liu (Chickens), the first Woop software intern and the original dev of Woop's Testnet (Pangaea)"
}, },
"0x63e7e9bb58aa72739a7cec06f6ea9fe73eb7a598": { "0x63e7e9bb58aa72739a7cec06f6ea9fe73eb7a598": {
"name": "Fortune Validator", "name": "Fortune Validator",
@ -78,12 +78,12 @@
"0xd143988234df9117f4baa00b5f8d4a56d64e56ea": { "0xd143988234df9117f4baa00b5f8d4a56d64e56ea": {
"name": "StrongMindsHold", "name": "StrongMindsHold",
"link": "https://twitter.com/TimPos4?s=09", "link": "https://twitter.com/TimPos4?s=09",
"description": "We are a proven professional staking service provider with an exemplary record on the Harmony blockchain" "description": "We are a proven professional staking service provider with an exemplary record on the Woop blockchain"
}, },
"0x05bdb096a46a57b057a839a7a21de7f699851c1e": { "0x05bdb096a46a57b057a839a7a21de7f699851c1e": {
"name": "Smart Stake", "name": "Smart Stake",
"link": "https://SmartStake.io", "link": "https://SmartStake.io",
"description": "Transparent, professional, & feature rich service. Harmony grant recipient." "description": "Transparent, professional, & feature rich service. Woop grant recipient."
}, },
"one13jewk8w7jah3r9jfahh8rlzpr5r6valascd0mn": { "one13jewk8w7jah3r9jfahh8rlzpr5r6valascd0mn": {
"name": "JungleCity", "name": "JungleCity",
@ -91,14 +91,14 @@
"description": "Foundational Node Validator - Actively managed hardware-secured nodes with geo-separate active-active backups." "description": "Foundational Node Validator - Actively managed hardware-secured nodes with geo-separate active-active backups."
}, },
"0xfe6f41ef98fba9cd1d0e7f9a7d58069374517264": { "0xfe6f41ef98fba9cd1d0e7f9a7d58069374517264": {
"name": "HarmonyHUB", "name": "WoopHUB",
"link": "https://harmonyHUB.one", "link": "https://woopHUB.one",
"description": "Formerly Harmony Community Node - HarmonyHUB is a news aggreagator meant to deliver you the news, and save you time." "description": "Formerly Woop Community Node - WoopHUB is a news aggreagator meant to deliver you the news, and save you time."
}, },
"0xf54b44ab06c2934cc9578b3da95ec695d07ab15b": { "0xf54b44ab06c2934cc9578b3da95ec695d07ab15b": {
"name": "Honest Mining", "name": "Honest Mining",
"link": "https://honestmining.com", "link": "https://honestmining.com",
"description": "Best Harmony ONE Staking Platform" "description": "Best Woop ONE Staking Platform"
}, },
"0x1d283773701ef4e8b54fe5fbd8df7519875aaacf": { "0x1d283773701ef4e8b54fe5fbd8df7519875aaacf": {
"name": "Fuzz.Fi Validator", "name": "Fuzz.Fi Validator",
@ -108,16 +108,16 @@
"0x79f8e1b732ba63987873d5eb86c81364c2cf5021": { "0x79f8e1b732ba63987873d5eb86c81364c2cf5021": {
"name": "Mass Stake | Embiei", "name": "Mass Stake | Embiei",
"link": "https://www.massstake.com", "link": "https://www.massstake.com",
"description": "Member of the Foundational Nodes, more than 2 years as a Harmony validator" "description": "Member of the Foundational Nodes, more than 2 years as a Woop validator"
}, },
"0x3736aC8400751bf07c6A2E4db3F4f3D9D422abB2": { "0x3736aC8400751bf07c6A2E4db3F4f3D9D422abB2": {
"name": "Gnosis Safe Mastercopy: 1.2.0", "name": "Gnosis Safe Mastercopy: 1.2.0",
"link": "https://multisig.harmony.one", "link": "https://multisig.wikiwoop.com",
"description": "Logic for Gnosis Safe proxies version 1.2.0" "description": "Logic for Gnosis Safe proxies version 1.2.0"
}, },
"0x4f9b1dEf3a0f6747bF8C870a27D3DeCdf029100e": { "0x4f9b1dEf3a0f6747bF8C870a27D3DeCdf029100e": {
"name": "Gnosis Safe Proxy Factory: 1.2.0", "name": "Gnosis Safe Proxy Factory: 1.2.0",
"link": "https://multisig.harmony.one", "link": "https://multisig.wikiwoop.com",
"description": "Factory contract to deploy Gnosis Safe proxies version 1.2.0" "description": "Factory contract to deploy Gnosis Safe proxies version 1.2.0"
}, },
"0x1548c6227cbd78e51eb0a679c1f329b9a5a99beb": { "0x1548c6227cbd78e51eb0a679c1f329b9a5a99beb": {
@ -138,7 +138,7 @@
}, },
"0x00000000000000000000000000000000000000fc": { "0x00000000000000000000000000000000000000fc": {
"name": "Staking precompile", "name": "Staking precompile",
"link": "https://staking.harmony.one", "link": "https://staking.wikiwoop.com",
"description": "This address is used for Metamask staking and smart contract staking. Use the staking website to stake ONE tokens. Please do not directly send tokens to this contract." "description": "This address is used for Metamask staking and smart contract staking. Use the staking website to stake ONE tokens. Please do not directly send tokens to this contract."
} }
} }

File diff suppressed because one or more lines are too long

@ -2,6 +2,6 @@
"0x4d64b78eaf6129fac30ab51e6d2d679993ea9ddd": { "0x4d64b78eaf6129fac30ab51e6d2d679993ea9ddd": {
"address": "0x4cd2563118e57b19179d8dc033f2b0c5b5d69ff5", "address": "0x4cd2563118e57b19179d8dc033f2b0c5b5d69ff5",
"name": "1country domains", "name": "1country domains",
"type": "HRC1155" "type": "WRC1155"
} }
} }

File diff suppressed because one or more lines are too long

@ -3,12 +3,12 @@ import useAPIPolling, { APIPollingOptions } from './polling'
import { singletonHook } from 'react-singleton-hook'; import { singletonHook } from 'react-singleton-hook';
// const url = 'https://api.binance.com/api/v1/ticker/24hr?symbol=ONEUSDT' // const url = 'https://api.binance.com/api/v1/ticker/24hr?symbol=ONEUSDT'
const url = 'https://api.coingecko.com/api/v3/simple/price?ids=harmony&vs_currencies=usd&include_24hr_change=true' const url = 'https://api.coingecko.com/api/v3/simple/price?ids=woop&vs_currencies=usd&include_24hr_change=true'
const coinGeckoMapper = (res: any) => { const coinGeckoMapper = (res: any) => {
return { return {
lastPrice: res.harmony.usd, lastPrice: res.woop.usd,
priceChangePercent: res.harmony.usd_24h_change priceChangePercent: res.woop.usd_24h_change
} }
} }

@ -87,9 +87,9 @@ export const AbiMethodsView = (props: {
? web3 ? web3
: process.env.REACT_APP_RPC_URL_SHARD0; : process.env.REACT_APP_RPC_URL_SHARD0;
const hmyWeb3 = new Web3(web3URL); const wikiWeb3 = new Web3(web3URL);
const contract = new hmyWeb3.eth.Contract([abiMethod], address); const contract = new wikiWeb3.eth.Contract([abiMethod], address);
if (abiMethod.name) { if (abiMethod.name) {
let res; let res;

@ -86,19 +86,19 @@ export const Wallet = (params: {
<Box direction={"column"}> <Box direction={"column"}>
<Text size="small" color="errorText"> <Text size="small" color="errorText">
Selected Metamask wallet network is unsupported. Please switch Selected Metamask wallet network is unsupported. Please switch
network to Harmony {isMainNet ? "Mainnet" : "Testnet"} network to Woop {isMainNet ? "Mainnet" : "Testnet"}
</Text> </Text>
<ActionButton <ActionButton
style={{ width: "250px" }} style={{ width: "250px" }}
margin={{ top: "small" }} margin={{ top: "small" }}
onClick={() => onClick={() =>
window.open( window.open(
"https://docs.harmony.one/home/network/wallets/browser-extensions-wallets/metamask-wallet", "https://docs.wikiwoop.com/home/network/wallets/browser-extensions-wallets/metamask-wallet",
"_blank" "_blank"
) )
} }
> >
Readme Harmony Metamask setup Readme Woop Metamask setup
</ActionButton> </ActionButton>
</Box> </Box>
) )

@ -197,7 +197,7 @@ export function TokensInfo(props: { value: Token[] }) {
<Box direction={"row"} style={{ paddingTop: "3px" }}> <Box direction={"row"} style={{ paddingTop: "3px" }}>
{erc20Tokens.length ? ( {erc20Tokens.length ? (
<Box direction={"row"}> <Box direction={"row"}>
HRC20{" "} WRC20{" "}
<Box <Box
background={"backgroundBack"} background={"backgroundBack"}
style={{ style={{
@ -214,7 +214,7 @@ export function TokensInfo(props: { value: Token[] }) {
) : null} ) : null}
{erc721Tokens.length ? ( {erc721Tokens.length ? (
<Box direction={"row"} margin={{ left: '8px' }}> <Box direction={"row"} margin={{ left: '8px' }}>
HRC721{" "} WRC721{" "}
<Box <Box
background={"backgroundBack"} background={"backgroundBack"}
style={{ style={{
@ -231,7 +231,7 @@ export function TokensInfo(props: { value: Token[] }) {
) : null} ) : null}
{erc1155Tokens.length ? ( {erc1155Tokens.length ? (
<Box direction={"row"} margin={{ left: '8px' }}> <Box direction={"row"} margin={{ left: '8px' }}>
HRC1155{" "} WRC1155{" "}
<Box <Box
background={"backgroundBack"} background={"backgroundBack"}
style={{ style={{
@ -263,7 +263,7 @@ export function TokensInfo(props: { value: Token[] }) {
pad={"xsmall"} pad={"xsmall"}
background={"backgroundBack"} background={"backgroundBack"}
> >
<Text>HRC20 tokens</Text> <Text>WRC20 tokens</Text>
</Box> </Box>
), ),
}, },
@ -281,7 +281,7 @@ export function TokensInfo(props: { value: Token[] }) {
pad={"xsmall"} pad={"xsmall"}
background={"backgroundBack"} background={"backgroundBack"}
> >
<Text>HRC721 tokens</Text> <Text>WRC721 tokens</Text>
</Box> </Box>
), ),
}, },
@ -299,7 +299,7 @@ export function TokensInfo(props: { value: Token[] }) {
pad={"xsmall"} pad={"xsmall"}
background={"backgroundBack"} background={"backgroundBack"}
> >
<Text>HRC1155 tokens</Text> <Text>WRC1155 tokens</Text>
</Box> </Box>
), ),
}, },

@ -19,7 +19,7 @@ import {
TRelatedTransaction, TRelatedTransaction,
} from "src/api/client.interface"; } from "src/api/client.interface";
import { Inventory } from "./tabs/inventory/Inventory"; import { Inventory } from "./tabs/inventory/Inventory";
import { getAllBalance, hmy_getDelegationsByDelegator, StakingDelegation } from "src/api/rpc"; import { getAllBalance, wiki_getDelegationsByDelegator, StakingDelegation } from "src/api/rpc";
import { ISourceCode, loadSourceCode } from "../../api/explorerV1"; import { ISourceCode, loadSourceCode } from "../../api/explorerV1";
import { AddressDetails, RelatedTransaction, ShardID } from "../../types"; import { AddressDetails, RelatedTransaction, ShardID } from "../../types";
import { ContractDetails } from "./ContractDetails"; import { ContractDetails } from "./ContractDetails";
@ -140,7 +140,7 @@ export function AddressPage() {
useEffect(() => { useEffect(() => {
const getStakingInfo = async () => { const getStakingInfo = async () => {
try { try {
const data = await hmy_getDelegationsByDelegator(id) const data = await wiki_getDelegationsByDelegator(id)
setDelegations(data) setDelegations(data)
} catch (e) { } catch (e) {
console.error('Cannot get staking info', (e as Error).message) console.error('Cannot get staking info', (e as Error).message)
@ -249,7 +249,7 @@ export function AddressPage() {
const erc1155Token = erc1155Map[id] || {}; const erc1155Token = erc1155Map[id] || {};
if (type === "erc20") { if (type === "erc20") {
return `HRC20 ${erc20Token.name || ''}`; return `WRC20 ${erc20Token.name || ''}`;
} }
if (type === "erc721") { if (type === "erc721") {
@ -257,7 +257,7 @@ export function AddressPage() {
} }
if (type === "erc1155") { if (type === "erc1155") {
const title = `HRC1155 ${erc1155Token.name || ""}`; const title = `WRC1155 ${erc1155Token.name || ""}`;
const { meta = {}, ...restErc1155 } = erc1155Token; const { meta = {}, ...restErc1155 } = erc1155Token;
return meta.image ? ( return meta.image ? (
<Box direction={"row"} align={"center"}> <Box direction={"row"} align={"center"}>
@ -340,7 +340,7 @@ export function AddressPage() {
<Transactions {...txsCommonProps} type={"internal_transaction"} /> <Transactions {...txsCommonProps} type={"internal_transaction"} />
</Tab> </Tab>
<Tab title={<Text size="small">HRC20 Transfers</Text>}> <Tab title={<Text size="small">WRC20 Transfers</Text>}>
<Transactions {...txsCommonProps} type={"erc20"} /> <Transactions {...txsCommonProps} type={"erc20"} />
</Tab> </Tab>

@ -3,7 +3,7 @@ import styled from "styled-components";
import { IUserERC721Assets } from "src/api/client.interface"; import { IUserERC721Assets } from "src/api/client.interface";
import { Box, Spinner, Text } from "grommet"; import { Box, Spinner, Text } from "grommet";
import { Address } from "src/components/ui"; import { Address } from "src/components/ui";
import HarmonyLogo from '../../../../assets/Logo.svg'; import WoopLogo from '../../../../assets/Logo.svg';
export interface IInventoryItemProps { export interface IInventoryItemProps {
item: IUserERC721Assets; item: IUserERC721Assets;
@ -111,7 +111,7 @@ export function InventoryItem(props: IInventoryItemProps) {
> >
{isLoading ? ( {isLoading ? (
<ErrorPreview direction={"column"} justify={"center"} align={"center"}> <ErrorPreview direction={"column"} justify={"center"} align={"center"}>
<Image src={HarmonyLogo} /> <Image src={WoopLogo} />
<Box style={{ position: 'absolute' }}> <Box style={{ position: 'absolute' }}>
<Spinner /> <Spinner />
</Box> </Box>
@ -123,7 +123,7 @@ export function InventoryItem(props: IInventoryItemProps) {
justify={"center"} justify={"center"}
align={"center"} align={"center"}
> >
<Image src={HarmonyLogo} /> <Image src={WoopLogo} />
<Box style={{ position: 'absolute', bottom: '8px' }}> <Box style={{ position: 'absolute', bottom: '8px' }}>
<Text style={{ opacity: 0.5 }}>No Image</Text> <Text style={{ opacity: 0.5 }}>No Image</Text>
</Box> </Box>
@ -145,7 +145,7 @@ export function InventoryItem(props: IInventoryItemProps) {
justify={"center"} justify={"center"}
align={"center"} align={"center"}
> >
<Image src={HarmonyLogo} /> <Image src={WoopLogo} />
<Box style={{ position: 'absolute', bottom: '8px' }}> <Box style={{ position: 'absolute', bottom: '8px' }}>
<Text style={{ opacity: 0.5 }}>No Image</Text> <Text style={{ opacity: 0.5 }}>No Image</Text>
</Box> </Box>

@ -1,7 +1,7 @@
import { Box, Text } from "grommet"; import { Box, Text } from "grommet";
import { useState } from "react"; import { useState } from "react";
import { ApprovalDetails, RPCTransactionHarmony } from "src/types"; import { ApprovalDetails, RPCTransactionWoop } from "src/types";
import { HarmonyAddress } from "src/utils"; import { WoopAddress } from "src/utils";
import { ApprovalsHeader } from "src/components/approvals/approvalsHeader"; import { ApprovalsHeader } from "src/components/approvals/approvalsHeader";
import { Wallet } from "../../ContractDetails/ConnectWallets"; import { Wallet } from "../../ContractDetails/ConnectWallets";
import { ApprovalsRenderer } from "src/components/approvals/approvalsRenderer"; import { ApprovalsRenderer } from "src/components/approvals/approvalsRenderer";
@ -40,18 +40,18 @@ export function TokenApprovals(props: { contractAddress?: string }) {
return; return;
} }
const harmonyAddress = new HarmonyAddress(account); const woopAddress = new WoopAddress(account);
const contractHarmonyAddr = contractAddress.length > 0 ? new HarmonyAddress(contractAddress) : null; const contractWoopAddr = contractAddress.length > 0 ? new WoopAddress(contractAddress) : null;
const key = account + (contractHarmonyAddr ? contractAddress : ""); const key = account + (contractWoopAddr ? contractAddress : "");
const pageSize = 100; const pageSize = 100;
let pageIndex = ApprovalCache.get(account + "-" + key + "-index") || 0; let pageIndex = ApprovalCache.get(account + "-" + key + "-index") || 0;
let result: { txnHistory: ApprovalDetails[], dataObj: RPCTransactionHarmony[] } = { txnHistory: ApprovalCache.get(account + "-" + key + "-txnHistory") || [], dataObj: [] }; let result: { txnHistory: ApprovalDetails[], dataObj: RPCTransactionWoop[] } = { txnHistory: ApprovalCache.get(account + "-" + key + "-txnHistory") || [], dataObj: [] };
try { try {
do { do {
result = await getAllApprovalsForTokens(harmonyAddress.basicHex, result = await getAllApprovalsForTokens(woopAddress.basicHex,
contractHarmonyAddr?.basicHex || "", contractWoopAddr?.basicHex || "",
pageIndex, pageIndex,
pageSize, pageSize,
result.txnHistory, result.txnHistory,

@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
import { Box, Heading, Text } from "grommet"; import { Box, Heading, Text } from "grommet";
import { BasePage, BaseContainer } from "src/components/ui"; import { BasePage, BaseContainer } from "src/components/ui";
import { TransactionsTable } from "../../components/tables/TransactionsTable"; import { TransactionsTable } from "../../components/tables/TransactionsTable";
import { Filter, RPCTransactionHarmony } from "../../types"; import { Filter, RPCTransactionWoop } from "../../types";
import { useHistory } from "react-router-dom"; import { useHistory } from "react-router-dom";
import { getTransactions, getCount } from "src/api/client"; import { getTransactions, getCount } from "src/api/client";
import { ShardDropdown } from "src/components/ui/ShardDropdown"; import { ShardDropdown } from "src/components/ui/ShardDropdown";
@ -19,7 +19,7 @@ export function AllTransactionsPage() {
filters: [{ type: "gte", property: "block_number", value: 0 }], filters: [{ type: "gte", property: "block_number", value: 0 }],
}; };
const [trxs, setTrxs] = useState<RPCTransactionHarmony[]>([]); const [trxs, setTrxs] = useState<RPCTransactionWoop[]>([]);
const [count, setCount] = useState<string>(""); const [count, setCount] = useState<string>("");
const [filter, setFilter] = useState<Filter>(initFilter); const [filter, setFilter] = useState<Filter>(initFilter);
@ -56,7 +56,7 @@ export function AllTransactionsPage() {
try { try {
let trxs = await getTransactions([+shardNumber, filter]); let trxs = await getTransactions([+shardNumber, filter]);
setTrxs(trxs as RPCTransactionHarmony[]); setTrxs(trxs as RPCTransactionWoop[]);
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }

@ -2,14 +2,14 @@ import React, { useEffect, useState } from "react";
import { Box, Heading, Tab, Tabs, Text } from "grommet"; import { Box, Heading, Tab, Tabs, Text } from "grommet";
import { BasePage, BaseContainer } from "src/components/ui"; import { BasePage, BaseContainer } from "src/components/ui";
import { TransactionsTable } from "../../components/tables/TransactionsTable"; import { TransactionsTable } from "../../components/tables/TransactionsTable";
import { ApprovalDetails, Filter, RPCTransactionHarmony } from "../../types"; import { ApprovalDetails, Filter, RPCTransactionWoop } from "../../types";
import { useHistory } from "react-router-dom"; import { useHistory } from "react-router-dom";
import { getTransactions, getCount } from "src/api/client"; import { getTransactions, getCount } from "src/api/client";
import { ShardDropdown } from "src/components/ui/ShardDropdown"; import { ShardDropdown } from "src/components/ui/ShardDropdown";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { ToolsTab } from "../AddressPage/tabs/tools"; import { ToolsTab } from "../AddressPage/tabs/tools";
import { ApprovalsRenderer } from "src/components/approvals/approvalsRenderer"; import { ApprovalsRenderer } from "src/components/approvals/approvalsRenderer";
import { HarmonyAddress } from "src/utils"; import { WoopAddress } from "src/utils";
import { ApiCache } from "src/api/ApiCache"; import { ApiCache } from "src/api/ApiCache";
import { getAllApprovalsForTokens } from "src/api/rpc"; import { getAllApprovalsForTokens } from "src/api/rpc";
import { revokePermission } from "src/utils/approvals"; import { revokePermission } from "src/utils/approvals";
@ -50,15 +50,15 @@ export function ApprovalPage() {
return; return;
} }
const harmonyAddress = new HarmonyAddress(account); const woopAddress = new WoopAddress(account);
const key = account; const key = account;
let pageIndex = ApprovalCache.get(key + "-index") || 0; let pageIndex = ApprovalCache.get(key + "-index") || 0;
const pageSize = 100; const pageSize = 100;
let result: { txnHistory: ApprovalDetails[], dataObj: RPCTransactionHarmony[] } = { txnHistory: ApprovalCache.get(key + "-txnHistory") || [], dataObj: [] }; let result: { txnHistory: ApprovalDetails[], dataObj: RPCTransactionWoop[] } = { txnHistory: ApprovalCache.get(key + "-txnHistory") || [], dataObj: [] };
try { try {
do { do {
result = await getAllApprovalsForTokens(harmonyAddress.basicHex, result = await getAllApprovalsForTokens(woopAddress.basicHex,
"", "",
pageIndex, pageIndex,
pageSize, pageSize,
@ -117,7 +117,7 @@ export function ApprovalPage() {
return ( return (
<BaseContainer pad={{ horizontal: "0" }}> <BaseContainer pad={{ horizontal: "0" }}>
<Heading size="small" margin={{ bottom: "medium", top: "0" }}> <Heading size="small" margin={{ bottom: "medium", top: "0" }}>
Harmony Token Approvals Woop Token Approvals
</Heading> </Heading>
<BasePage pad={"small"} style={{ overflow: "inherit" }}> <BasePage pad={"small"} style={{ overflow: "inherit" }}>
<Box direction="column"> <Box direction="column">
@ -149,30 +149,30 @@ export function ApprovalPage() {
}} }}
> >
<Tab title={<Text size="small">HRC20</Text>}> <Tab title={<Text size="small">WRC20</Text>}>
</Tab> </Tab>
<Tab title={<Text size="small">HRC1155</Text>}> <Tab title={<Text size="small">WRC1155</Text>}>
</Tab> </Tab>
<Tab title={<Text size="small">HRC721</Text>}> <Tab title={<Text size="small">WRC721</Text>}>
</Tab> </Tab>
</Tabs> </Tabs>
<Box margin={{top: "small"}}> <Box margin={{top: "small"}}>
{ {
activeIndex === 0 && activeIndex === 0 &&
<ApprovalsRenderer data={data.filter(details => erc20Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all HRC20" /> <ApprovalsRenderer data={data.filter(details => erc20Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all WRC20" />
} }
{ {
activeIndex === 1 && activeIndex === 1 &&
<ApprovalsRenderer data={data.filter(details => erc1155Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all HRC1155" /> <ApprovalsRenderer data={data.filter(details => erc1155Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all WRC1155" />
} }
{ {
activeIndex === 2 && activeIndex === 2 &&
<ApprovalsRenderer data={data.filter(details => erc721Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all HRC721" /> <ApprovalsRenderer data={data.filter(details => erc721Pool[details.assetAddress])} isLoading={isLoading} revokeClicked={revokePermissions} account={metamaskAddress} title="for all WRC721" />
} }
</Box> </Box>
</Box>} </Box>}

@ -28,15 +28,15 @@ export const ActiveAddresses = () => {
}, []) }, [])
const dailyPageProps = { const dailyPageProps = {
title: 'Harmony Daily Active Addresses', title: 'Woop Daily Active Addresses',
description: 'The Active Address chart shows the daily number of unique addresses that were active on the network as a sender or receiver', description: 'The Active Address chart shows the daily number of unique addresses that were active on the network as a sender or receiver',
unitLabel: 'addresses', unitLabel: 'addresses',
items, items,
isLoading, isLoading,
loadingError, loadingError,
chart: { chart: {
yAxisLabel: 'Active Harmony Addresses', yAxisLabel: 'Active Woop Addresses',
tooltipLabel: 'Active Harmony Addresses' tooltipLabel: 'Active Woop Addresses'
}, },
renderMaxValue: (value: string, date: string) => { renderMaxValue: (value: string, date: string) => {
return `Highest number of ${value} addresses on ${date}` return `Highest number of ${value} addresses on ${date}`

@ -28,7 +28,7 @@ export const AverageBlockSize = () => {
}, []) }, [])
const dailyPageProps = { const dailyPageProps = {
title: 'Harmony Average Block Size', title: 'Woop Average Block Size',
unitLabel: 'blocksize', unitLabel: 'blocksize',
items, items,
isLoading, isLoading,

@ -28,7 +28,7 @@ export const AverageFee = () => {
}, []) }, [])
const dailyPageProps = { const dailyPageProps = {
title: 'Harmony Daily Average Fee', title: 'Woop Daily Average Fee',
unitLabel: 'fee', unitLabel: 'fee',
items, items,
isLoading, isLoading,

@ -28,7 +28,7 @@ export const DailyTransactions = () => {
}, []) }, [])
const dailyPageProps = { const dailyPageProps = {
title: 'Harmony Daily Transactions', title: 'Woop Daily Transactions',
unitLabel: 'transactions', unitLabel: 'transactions',
items, items,
isLoading, isLoading,

@ -1,6 +1,6 @@
import {useEffect, useState} from 'react' import {useEffect, useState} from 'react'
import { StatPage } from './StatPage'; import { StatPage } from './StatPage';
import { hmyv2_getNodeMetadata } from 'src/api/rpc'; import { wikiv2_getNodeMetadata } from 'src/api/rpc';
import { config } from 'src/config'; import { config } from 'src/config';
const CONSENSUS = "consensus" const CONSENSUS = "consensus"
@ -19,7 +19,7 @@ export const ViewChangeStats = () => {
try { try {
setIsLoading(true) setIsLoading(true)
for (let i in availableShards) { for (let i in availableShards) {
const nodeMetadata = await hmyv2_getNodeMetadata(i) const nodeMetadata = await wikiv2_getNodeMetadata(i)
const blockHeight = nodeMetadata[CONSENSUS][BLOCK_NUM] const blockHeight = nodeMetadata[CONSENSUS][BLOCK_NUM]
const viewId = nodeMetadata[CONSENSUS][VIEW_ID] const viewId = nodeMetadata[CONSENSUS][VIEW_ID]
const viewChange = viewId - blockHeight const viewChange = viewId - blockHeight
@ -41,7 +41,7 @@ export const ViewChangeStats = () => {
}, []) }, [])
const viewChangeProps = { const viewChangeProps = {
title: 'Harmony View Change Statistics', title: 'Woop View Change Statistics',
description: '', description: '',
items: items, items: items,
keys: ['viewChange', 'viewId', 'blockHeight'], keys: ['viewChange', 'viewId', 'blockHeight'],

@ -85,7 +85,7 @@ export function ChartsPage() {
return ( return (
<BaseContainer pad={{ horizontal: "0" }}> <BaseContainer pad={{ horizontal: "0" }}>
<Heading size="small" margin={{ bottom: "medium", top: "0" }}> <Heading size="small" margin={{ bottom: "medium", top: "0" }}>
<Box direction={"row"}>Harmony One Charts</Box> <Box direction={"row"}>Woop One Charts</Box>
</Heading> </Heading>
<BasePage pad={'0'} style={{overflow: 'inherit'}}> <BasePage pad={'0'} style={{overflow: 'inherit'}}>
<Box border={{ side: 'bottom' }} pad={"small"}> <Box border={{ side: 'bottom' }} pad={"small"}>

@ -145,7 +145,7 @@ function getColumns(props: any) {
render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}> render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}>
<Text size={'small'}>{data.name}</Text> <Text size={'small'}>{data.name}</Text>
{data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}> {data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}>
<Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Harmony Bridge'} />}> <Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Woop Bridge'} />}>
<StatusGood size={'14px'} color={'successText'} /> <StatusGood size={'14px'} color={'successText'} />
</Tip> </Tip>
</div>} </div>}

@ -78,7 +78,7 @@ export const ERC1155List = () => {
return ( return (
<> <>
<Heading size="xsmall" margin={{ top: "0" }}> <Heading size="xsmall" margin={{ top: "0" }}>
HRC1155 Tokens WRC1155 Tokens
</Heading> </Heading>
<BasePage> <BasePage>
<Box width="100%" pad={{ bottom: "medium" }}> <Box width="100%" pad={{ bottom: "medium" }}>

@ -131,7 +131,7 @@ function getColumns(props: any) {
render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}> render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}>
<Text size={'small'}>{data.name}</Text> <Text size={'small'}>{data.name}</Text>
{data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}> {data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}>
<Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Harmony Bridge'} />}> <Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Woop Bridge'} />}>
<StatusGood size={'14px'} color={'successText'} /> <StatusGood size={'14px'} color={'successText'} />
</Tip> </Tip>
</div>} </div>}

@ -79,7 +79,7 @@ export const ERC20List = () => {
return ( return (
<> <>
<Heading size="xsmall" margin={{ top: "0" }}> <Heading size="xsmall" margin={{ top: "0" }}>
HRC20 Tokens WRC20 Tokens
</Heading> </Heading>
<BasePage> <BasePage>
<Box width="100%" pad={{ bottom: "medium" }}> <Box width="100%" pad={{ bottom: "medium" }}>

@ -130,7 +130,7 @@ function getColumns(props: any) {
render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}> render: (data: Erc20) => <Box direction={'row'} style={{ display: 'flex', alignItems: 'center' }}>
<Text size={'small'}>{data.name}</Text> <Text size={'small'}>{data.name}</Text>
{data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}> {data.isBridged && <div style={{ marginLeft: "4px", height: '14px', cursor: 'pointer' }}>
<Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Harmony Bridge'} />}> <Tip dropProps={{ align: { bottom: "top" }}} content={<TipContent showArrow={true} message={'Token is available on Woop Bridge'} />}>
<StatusGood size={'14px'} color={'successText'} /> <StatusGood size={'14px'} color={'successText'} />
</Tip> </Tip>
</div>} </div>}

@ -78,7 +78,7 @@ export const ERC721List = () => {
return ( return (
<> <>
<Heading size="xsmall" margin={{ top: "0" }}> <Heading size="xsmall" margin={{ top: "0" }}>
HRC721 Tokens WRC721 Tokens
</Heading> </Heading>
<BasePage> <BasePage>
<Box width="100%" pad={{ bottom: "medium" }}> <Box width="100%" pad={{ bottom: "medium" }}>

@ -41,7 +41,7 @@ const mapRelatedTxToExport = (ownerAddress: string, tx: RelatedTransaction, oneP
} }
} }
const mapHrc20TxToExport = (ownerAddress: string, tx: any, erc20Map: Record<string, Erc20>, erc721Map: Record<string, ERC721>, erc1155Map: Record<string, ERC1155>) => { const mapWrc20TxToExport = (ownerAddress: string, tx: any, erc20Map: Record<string, Erc20>, erc721Map: Record<string, ERC721>, erc1155Map: Record<string, ERC1155>) => {
const txDate = dayjs(tx.timestamp) const txDate = dayjs(tx.timestamp)
const token = erc20Map[tx.address] || erc721Map[tx.address] || erc1155Map[tx.address] const token = erc20Map[tx.address] || erc721Map[tx.address] || erc1155Map[tx.address]
const precision = token ? token.decimals : 18 const precision = token ? token.decimals : 18
@ -95,7 +95,7 @@ export const downloadCSV = (params: IDownloadCsvParams, filename: string) => {
const mapTx = (tx: any) => { const mapTx = (tx: any) => {
if(type === 'erc20') { if(type === 'erc20') {
return mapHrc20TxToExport(address, tx, erc20Map, erc721Map, erc1155Map) return mapWrc20TxToExport(address, tx, erc20Map, erc721Map, erc1155Map)
} else if (type === 'internal_transaction') { } else if (type === 'internal_transaction') {
return mapInternalTxToExport(address, tx, onePrice) return mapInternalTxToExport(address, tx, onePrice)
} }

@ -14,7 +14,7 @@ import {useERC20Pool} from "../../hooks/ERC20_Pool";
import {useERC721Pool} from "../../hooks/ERC721_Pool"; import {useERC721Pool} from "../../hooks/ERC721_Pool";
import {useERC1155Pool} from "../../hooks/ERC1155_Pool"; import {useERC1155Pool} from "../../hooks/ERC1155_Pool";
const erc20TransfersURL = 'https://api-hrc-tx.t.hmny.io' const erc20TransfersURL = 'https://api-wrc-tx.t.hmny.io'
const IconError = styled(StatusCritical)` const IconError = styled(StatusCritical)`
margin-right: 5px; margin-right: 5px;

@ -10,7 +10,7 @@ import {Address, BasePage} from "src/components/ui";
import {ERC1155, useERC1155Pool} from "src/hooks/ERC1155_Pool"; import {ERC1155, useERC1155Pool} from "src/hooks/ERC1155_Pool";
import {ERC721, useERC721Pool} from "src/hooks/ERC721_Pool"; import {ERC721, useERC721Pool} from "src/hooks/ERC721_Pool";
import styled from "styled-components"; import styled from "styled-components";
import HarmonyLogo from '../../assets/Logo.svg'; import WoopLogo from '../../assets/Logo.svg';
import { linkedContractsMap, config } from '../../config' import { linkedContractsMap, config } from '../../config'
import {ERC1155Icon} from "../../components/ui/ERC1155Icon"; import {ERC1155Icon} from "../../components/ui/ERC1155Icon";
import dayjs from "dayjs"; import dayjs from "dayjs";
@ -79,7 +79,7 @@ const NFTImage = (props: NFTImageProps) => {
return <ImageContainer width={'inherit'} height={'inherit'} justify={'center'} align={'center'}> return <ImageContainer width={'inherit'} height={'inherit'} justify={'center'} align={'center'}>
{isLoading && {isLoading &&
<Image src={HarmonyLogo} style={{ height: '50%' }} /> <Image src={WoopLogo} style={{ height: '50%' }} />
} }
<Image <Image
src={imageUrl} src={imageUrl}

@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Box, DataTable, Spinner, Text } from "grommet"; import { Box, DataTable, Spinner, Text } from "grommet";
import { RPCTransactionHarmony } from "src/types"; import { RPCTransactionWoop } from "src/types";
import { useHistory } from "react-router-dom"; import { useHistory } from "react-router-dom";
import { Address } from "src/components/ui"; import { Address } from "src/components/ui";
import { getTransactions } from "src/api/client"; import { getTransactions } from "src/api/client";
@ -20,7 +20,7 @@ function getColumns(props: any) {
Shard Shard
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Box direction="row" gap="3px" align="center"> <Box direction="row" gap="3px" align="center">
<Text size="small">{data.shardID}</Text> <Text size="small">{data.shardID}</Text>
<FormNextLink <FormNextLink
@ -39,7 +39,7 @@ function getColumns(props: any) {
Hash Hash
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Text size="small" style={{ cursor: "pointer" }} color="brand"> <Text size="small" style={{ cursor: "pointer" }} color="brand">
<Address <Address
type={"tx"} type={"tx"}
@ -58,7 +58,7 @@ function getColumns(props: any) {
From From
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Address address={data.from} isShort hideCopyBtn /> <Address address={data.from} isShort hideCopyBtn />
), ),
}, },
@ -69,7 +69,7 @@ function getColumns(props: any) {
To To
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<Address address={data.to} isShort hideCopyBtn /> <Address address={data.to} isShort hideCopyBtn />
), ),
}, },
@ -80,7 +80,7 @@ function getColumns(props: any) {
Timestamp Timestamp
</Text> </Text>
), ),
render: (data: RPCTransactionHarmony) => ( render: (data: RPCTransactionWoop) => (
<DateTime <DateTime
date={new Date(data.timestamp)} date={new Date(data.timestamp)}
/> />
@ -102,7 +102,7 @@ export function LatestTransactionsTable() {
const hidden = useWindowFocused(); const hidden = useWindowFocused();
const history = useHistory(); const history = useHistory();
const [transactions, setTransactions] = useState<RPCTransactionHarmony[]>([]); const [transactions, setTransactions] = useState<RPCTransactionWoop[]>([]);
const { availableShards } = config const { availableShards } = config
useEffect(() => { useEffect(() => {
@ -128,7 +128,7 @@ export function LatestTransactionsTable() {
setTransactions( setTransactions(
trxsList trxsList
.sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1)) .sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1))
.slice(0, 10) as RPCTransactionHarmony[] .slice(0, 10) as RPCTransactionWoop[]
); );
} catch (err) { } catch (err) {
console.log(err); console.log(err);

@ -1,4 +1,4 @@
import { RPCStakingTransactionHarmony } from "src/types"; import { RPCStakingTransactionWoop } from "src/types";
import { BasePage } from "src/components/ui"; import { BasePage } from "src/components/ui";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
@ -8,13 +8,13 @@ import { getStakingTransactionByField } from "src/api/client";
import { TransactionDetails } from "src/components/transaction/TransactionDetails"; import { TransactionDetails } from "src/components/transaction/TransactionDetails";
import { StakingTransactionType } from "src/types"; import { StakingTransactionType } from "src/types";
import { TransactionSubType } from "src/components/transaction/helpers"; import { TransactionSubType } from "src/components/transaction/helpers";
import { hmyv2_getTransactionReceipt } from "src/api/rpc"; import { wikiv2_getTransactionReceipt } from "src/api/rpc";
import { config } from "../../config"; import { config } from "../../config";
export const StakingTransactionPage = () => { export const StakingTransactionPage = () => {
// @ts-ignore // @ts-ignore
const { id } = useParams(); const { id } = useParams();
const [tx, setTx] = useState<RPCStakingTransactionHarmony | null>(null); const [tx, setTx] = useState<RPCStakingTransactionWoop | null>(null);
const { availableShards } = config const { availableShards } = config
@ -41,7 +41,7 @@ export const StakingTransactionPage = () => {
} }
try { try {
const txnReceipt = await hmyv2_getTransactionReceipt([id], shardNumber) const txnReceipt = await wikiv2_getTransactionReceipt([id], shardNumber)
if (txnReceipt && txnReceipt.result) { if (txnReceipt && txnReceipt.result) {
if (tx.type === "CollectRewards" && tx.amount === null) { if (tx.type === "CollectRewards" && tx.amount === null) {
tx.amount = txnReceipt.result.logs[0].data tx.amount = txnReceipt.result.logs[0].data
@ -54,7 +54,7 @@ export const StakingTransactionPage = () => {
} }
} catch {} } catch {}
} }
setTx(tx as RPCStakingTransactionHarmony); setTx(tx as RPCStakingTransactionWoop);
}; };
exec(); exec();
}, [id]); }, [id]);

@ -3,7 +3,7 @@ import {Box, Text} from "grommet";
import {MetricsTopItem, MetricsTopType} from "../../types"; import {MetricsTopItem, MetricsTopType} from "../../types";
import styled from "styled-components"; import styled from "styled-components";
import {Address} from "../../components/ui"; import {Address} from "../../components/ui";
import {ReactComponent as HarmonyLogo} from '../../assets/Logo.svg'; import {ReactComponent as WoopLogo} from '../../assets/Logo.svg';
export interface TopTableProps { export interface TopTableProps {
@ -92,7 +92,7 @@ const TopTableRow = (props: TopTableRowProps) => {
</Box> </Box>
<Box width={columnsWidth[2]} direction={'row'} align={'center'} gap={'6px'}> <Box width={columnsWidth[2]} direction={'row'} align={'center'} gap={'6px'}>
{isOneTransfer && <LogoWrapper> {isOneTransfer && <LogoWrapper>
<HarmonyLogo width={'12px'} height={'12px'} /> <WoopLogo width={'12px'} height={'12px'} />
</LogoWrapper> } </LogoWrapper> }
<Text size={'xsmall'}>{valueFormatEn}</Text> <Text size={'xsmall'}>{valueFormatEn}</Text>
</Box> </Box>

@ -1,7 +1,7 @@
import { TransactionDetails } from "src/components/transaction/TransactionDetails"; import { TransactionDetails } from "src/components/transaction/TransactionDetails";
import { InternalTransactionList } from "src/components/transaction/InternalTransactionList"; import { InternalTransactionList } from "src/components/transaction/InternalTransactionList";
import { TransactionLogs } from "src/components/transaction/TransactionLogs"; import { TransactionLogs } from "src/components/transaction/TransactionLogs";
import {IHexSignature, InternalTransaction, RPCTransactionHarmony, TxReceipt} from "src/types"; import {IHexSignature, InternalTransaction, RPCTransactionWoop, TxReceipt} from "src/types";
import { BaseContainer, BasePage } from "src/components/ui"; import { BaseContainer, BasePage } from "src/components/ui";
import { useHistory, useParams } from "react-router-dom"; import { useHistory, useParams } from "react-router-dom";
@ -14,7 +14,7 @@ import {
getByteCodeSignatureByHash, getByteCodeSignatureByHash,
} from "src/api/client"; } from "src/api/client";
import { revertErrorMessage } from "src/web3/parseByteCode"; import { revertErrorMessage } from "src/web3/parseByteCode";
import { hmyv2_getTransactionReceipt } from "src/api/rpc"; import { wikiv2_getTransactionReceipt } from "src/api/rpc";
import useQuery from "../../hooks/useQuery"; import useQuery from "../../hooks/useQuery";
import { config } from "../../config"; import { config } from "../../config";
@ -29,7 +29,7 @@ const extractError = (err: any) => {
return errorMessage || err; return errorMessage || err;
}; };
const getTxInputSignature = async (trx: RPCTransactionHarmony) => { const getTxInputSignature = async (trx: RPCTransactionWoop) => {
let signature let signature
try { try {
const signatures = await getByteCodeSignatureByHash([trx.input.slice(0, 10)]) const signatures = await getByteCodeSignatureByHash([trx.input.slice(0, 10)])
@ -42,7 +42,7 @@ const getTxInputSignature = async (trx: RPCTransactionHarmony) => {
return signature return signature
} }
const getTransactionErrorMessage = (txHash: string, tx: RPCTransactionHarmony) => { const getTransactionErrorMessage = (txHash: string, tx: RPCTransactionWoop) => {
if(txHash.length !== 66) { if(txHash.length !== 66) {
return 'Invalid Txn hash' return 'Invalid Txn hash'
} }
@ -59,7 +59,7 @@ export const TransactionPage = () => {
const activeTab = query.get('activeTab') || '0'; const activeTab = query.get('activeTab') || '0';
// hash or number // hash or number
const [tx, setTx] = useState<RPCTransactionHarmony>({} as RPCTransactionHarmony); const [tx, setTx] = useState<RPCTransactionWoop>({} as RPCTransactionWoop);
const [txReceipt, setTxReceipt] = useState<TxReceipt>(); const [txReceipt, setTxReceipt] = useState<TxReceipt>();
const [trxs, setTrxs] = useState<InternalTransaction[]>([]); const [trxs, setTrxs] = useState<InternalTransaction[]>([]);
const [logs, setLogs] = useState<any[]>([]); const [logs, setLogs] = useState<any[]>([]);
@ -94,7 +94,7 @@ export const TransactionPage = () => {
} }
if (trx) { if (trx) {
const txnReceipt = await hmyv2_getTransactionReceipt([id], shard); const txnReceipt = await wikiv2_getTransactionReceipt([id], shard);
if (txnReceipt && txnReceipt.result) { if (txnReceipt && txnReceipt.result) {
setTxReceipt(txnReceipt.result) setTxReceipt(txnReceipt.result)
if(txnReceipt.result.gasUsed) { if(txnReceipt.result.gasUsed) {
@ -108,7 +108,7 @@ export const TransactionPage = () => {
} }
const txData = trx || {} const txData = trx || {}
setTx(txData as RPCTransactionHarmony); setTx(txData as RPCTransactionWoop);
setInputSignature(trxInputSignature) setInputSignature(trxInputSignature)
return txData return txData
}; };

@ -95,7 +95,7 @@ const erc20ABIManager = ABIManager(ERC20ABI as IABI)
const erc721ABIManager = ABIManager(ERC721ABI as IABI) const erc721ABIManager = ABIManager(ERC721ABI as IABI)
const erc1155ABIManager = ABIManager(ERC1155ABI as IABI) const erc1155ABIManager = ABIManager(ERC1155ABI as IABI)
export function CheckHRC() { export function CheckWRC() {
const query = useQuery(); const query = useQuery();
const history = useHistory(); const history = useHistory();
const queryAddress = query.get('address') || ''; const queryAddress = query.get('address') || '';
@ -178,7 +178,7 @@ export function CheckHRC() {
setMatchedEvents([]) setMatchedEvents([])
if (contractAddress) { if (contractAddress) {
history.push({ history.push({
pathname: "/tools/checkHrc", pathname: "/tools/checkWrc",
search: `?address=${contractAddress}` search: `?address=${contractAddress}`
}); });
getContract() getContract()
@ -202,7 +202,7 @@ export function CheckHRC() {
return ( return (
<BaseContainer pad={{ horizontal: "0" }}> <BaseContainer pad={{ horizontal: "0" }}>
<Heading size="small" margin={{ bottom: "medium", top: "0" }}> <Heading size="small" margin={{ bottom: "medium", top: "0" }}>
Check HRC Check WRC
</Heading> </Heading>
<BasePage pad={"small"} style={{ overflow: "inherit" }}> <BasePage pad={"small"} style={{ overflow: "inherit" }}>
<Box> <Box>

@ -2,7 +2,7 @@ import * as blockchain from './blockchain'
export type FilterType = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' export type FilterType = 'gt' | 'gte' | 'lt' | 'lte' | 'eq'
export type FilterProperty = 'number' | 'block_number' | 'address' | 'to' export type FilterProperty = 'number' | 'block_number' | 'address' | 'to'
export type TransactionQueryField = 'block_number' | 'block_hash' | 'hash' | 'hash_harmony' export type TransactionQueryField = 'block_number' | 'block_hash' | 'hash' | 'hash_woop'
export type StakingTransactionQueryField = 'block_number' | 'block_hash' | 'hash' export type StakingTransactionQueryField = 'block_number' | 'block_hash' | 'hash'
export type TransactionQueryValue = export type TransactionQueryValue =
| blockchain.BlockNumber | blockchain.BlockNumber

@ -5,10 +5,10 @@ export type RPCETHMethod =
| "eth_getBlocks" | "eth_getBlocks"
| "trace_block"; | "trace_block";
export type RPCHarmonyMethod = export type RPCWoopMethod =
| "hmy_getBlockByNumber" | "wiki_getBlockByNumber"
| "hmy_getTransactionByHash" | "wiki_getTransactionByHash"
| "hmy_getBlocks" | "wiki_getBlocks"
| "debug_traceTransaction"; | "debug_traceTransaction";
export type ShardID = 0 | 1 | 2 | 3; export type ShardID = 0 | 1 | 2 | 3;
@ -46,7 +46,7 @@ export type TokenType =
| "ERC1155" | "ERC1155"
| "ERC721"; | "ERC721";
export type RPCBlockHarmony = { export type RPCBlockWoop = {
difficulty: string; difficulty: string;
extraData: string; extraData: string;
gasLimit: string; gasLimit: string;
@ -63,8 +63,8 @@ export type RPCBlockHarmony = {
size: string; size: string;
stateRoot: string; stateRoot: string;
timestamp: string; timestamp: string;
transactions: RPCTransactionHarmony[]; transactions: RPCTransactionWoop[];
stakingTransactions: RPCStakingTransactionHarmony[]; stakingTransactions: RPCStakingTransactionWoop[];
transactionsRoot: string; transactionsRoot: string;
uncles: string[]; uncles: string[];
epoch: string; epoch: string;
@ -74,7 +74,7 @@ export type RPCBlockHarmony = {
type Modify<T, R> = Omit<T, keyof R> & R; type Modify<T, R> = Omit<T, keyof R> & R;
export type Block = Modify< export type Block = Modify<
RPCBlockHarmony, RPCBlockWoop,
{ {
number: string; number: string;
epoch: string; epoch: string;
@ -88,10 +88,10 @@ export type Block = Modify<
>; >;
export type Address = string; export type Address = string;
export type AddressHarmony = string; export type AddressWoop = string;
export type TransactionHash = string; export type TransactionHash = string;
export type TransactionHarmonyHash = string; export type TransactionWoopHash = string;
export type RPCTransaction = { export type RPCTransaction = {
blockHash: BlockHash; blockHash: BlockHash;
@ -111,15 +111,15 @@ export type RPCTransaction = {
value: string; value: string;
}; };
export type RPCTransactionHarmony = { export type RPCTransactionWoop = {
blockHash: BlockHash; blockHash: BlockHash;
blockNumber: BlockHexNumber; blockNumber: BlockHexNumber;
from: AddressHarmony; from: AddressWoop;
to: AddressHarmony; to: AddressWoop;
gas: string; gas: string;
gasPrice: string; gasPrice: string;
gasLimit: string; gasLimit: string;
hash: TransactionHarmonyHash; hash: TransactionWoopHash;
ethHash: TransactionHash; ethHash: TransactionHash;
input: ByteCode; input: ByteCode;
nonce: string; nonce: string;
@ -139,16 +139,16 @@ export type StakingTransactionType =
| "Undelegate" | "Undelegate"
| "Delegate"; | "Delegate";
export type RPCStakingTransactionHarmony = { export type RPCStakingTransactionWoop = {
type: StakingTransactionType; type: StakingTransactionType;
blockHash: BlockHash; blockHash: BlockHash;
blockNumber: BlockHexNumber; blockNumber: BlockHexNumber;
from: AddressHarmony; from: AddressWoop;
to: AddressHarmony; to: AddressWoop;
gas: string; gas: string;
gasPrice: string; gasPrice: string;
gasLimit: string; gasLimit: string;
hash: TransactionHarmonyHash; hash: TransactionWoopHash;
input: ByteCode; input: ByteCode;
nonce: string; nonce: string;
r: string; r: string;
@ -163,7 +163,7 @@ export type RPCStakingTransactionHarmony = {
}; };
// todo // todo
export type StakingTransaction = RPCStakingTransactionHarmony; export type StakingTransaction = RPCStakingTransactionWoop;
export type Topic = string; export type Topic = string;
export type ByteCode = string; export type ByteCode = string;
@ -235,7 +235,7 @@ export type InternalTransaction = {
}; };
export type Transaction = { export type Transaction = {
harmony: RPCTransactionHarmony; woop: RPCTransactionWoop;
eth: RPCTransaction; eth: RPCTransaction;
}; };
@ -245,7 +245,7 @@ export type AddressTransactionType =
| "internal_transaction"; | "internal_transaction";
export type Address2Transaction = { export type Address2Transaction = {
blockNumber: BlockNumber; blockNumber: BlockNumber;
transactionHash: TransactionHash | TransactionHarmonyHash; transactionHash: TransactionHash | TransactionWoopHash;
address: Address; address: Address;
transactionType: AddressTransactionType; transactionType: AddressTransactionType;
}; };

@ -1,5 +1,5 @@
import { HarmonyAddress } from "./getAddress/GetAddress"; import { WoopAddress } from "./getAddress/GetAddress";
import { ApprovalDetails, RPCTransactionHarmony, TokenType } from "../types/blockchain"; import { ApprovalDetails, RPCTransactionWoop, TokenType } from "../types/blockchain";
import Web3 from "web3"; import Web3 from "web3";
import { AbiItem } from 'web3-utils'; import { AbiItem } from 'web3-utils';
import detectEthereumProvider from "@metamask/detect-provider"; import detectEthereumProvider from "@metamask/detect-provider";
@ -42,7 +42,7 @@ const approvalNonFungibleABI: AbiItem[] = [
]; ];
export const convertTxnToObj = (tx: any, type: TokenType): ApprovalDetails => { export const convertTxnToObj = (tx: any, type: TokenType): ApprovalDetails => {
const assetAddress = new HarmonyAddress(tx.to).basicHex; const assetAddress = new WoopAddress(tx.to).basicHex;
const approvedObj: ApprovalDetails = { const approvedObj: ApprovalDetails = {
hash: tx.hash, hash: tx.hash,
@ -51,7 +51,7 @@ export const convertTxnToObj = (tx: any, type: TokenType): ApprovalDetails => {
spender: "0x" + tx.input.substring(34, 74), spender: "0x" + tx.input.substring(34, 74),
allowance: allowanceAmount(tx), allowance: allowanceAmount(tx),
action: "action", action: "action",
account: new HarmonyAddress(tx.from).basicHex, account: new WoopAddress(tx.from).basicHex,
contract: tx.to, contract: tx.to,
type: type type: type
}; };
@ -92,11 +92,11 @@ const unlimitedAllowance = "ffffffffffffffffffffffffffffffffffffffffffffffffffff
const EMPTY_ADDRESS = "0x0000000000000000000000000000000000000000"; const EMPTY_ADDRESS = "0x0000000000000000000000000000000000000000";
export const matchesApproveAllNonFungible = (tx: RPCTransactionHarmony): boolean => { export const matchesApproveAllNonFungible = (tx: RPCTransactionWoop): boolean => {
return tx.input.includes(approvalAll1155Hash) || tx.input.includes(approvalAll721Hash); return tx.input.includes(approvalAll1155Hash) || tx.input.includes(approvalAll721Hash);
} }
export const matchesApprovalMethod = (tx: RPCTransactionHarmony): boolean => { export const matchesApprovalMethod = (tx: RPCTransactionWoop): boolean => {
return tx.input.includes(approval20Hash) || return tx.input.includes(approval20Hash) ||
tx.input.includes(approval721Hash) || tx.input.includes(approval721Hash) ||
@ -105,14 +105,14 @@ export const matchesApprovalMethod = (tx: RPCTransactionHarmony): boolean => {
tx.input.includes(approvalAll721Hash); tx.input.includes(approvalAll721Hash);
} }
export const filterTransactions = (tx: RPCTransactionHarmony, export const filterTransactions = (tx: RPCTransactionWoop,
txnHistory: ApprovalDetails[], txnHistory: ApprovalDetails[],
spender: string, spender: string,
erc20: ERC20_Pool = {}, erc20: ERC20_Pool = {},
erc1155: ERC1155_Pool = {}, erc1155: ERC1155_Pool = {},
erc721: ERC721_Pool = {}): ApprovalDetails[] => { erc721: ERC721_Pool = {}): ApprovalDetails[] => {
// filter txn history. if erc20 then just remove // filter txn history. if erc20 then just remove
const to = new HarmonyAddress(tx.to).basicHex; const to = new WoopAddress(tx.to).basicHex;
if (erc20[to]) { if (erc20[to]) {
// remove any other occurrence of the spender and the contract in the list of txn (current tx is latest) // remove any other occurrence of the spender and the contract in the list of txn (current tx is latest)
txnHistory = txnHistory.filter(transaction => !(transaction.spender === spender && transaction.contract === tx.to)); txnHistory = txnHistory.filter(transaction => !(transaction.spender === spender && transaction.contract === tx.to));
@ -139,7 +139,7 @@ export const filterTransactions = (tx: RPCTransactionHarmony,
} }
export const hasAllowance = (tx: RPCTransactionHarmony, spender: string, type: TokenType): boolean => { export const hasAllowance = (tx: RPCTransactionWoop, spender: string, type: TokenType): boolean => {
if (type === "ERC20" && tx.input.includes(approval20Hash)) { if (type === "ERC20" && tx.input.includes(approval20Hash)) {
const allowance = tx.input.substring(74); const allowance = tx.input.substring(74);
return parseInt(allowance, 16) !== 0; return parseInt(allowance, 16) !== 0;
@ -156,7 +156,7 @@ export const hasAllowance = (tx: RPCTransactionHarmony, spender: string, type: T
return false; return false;
} }
export const allowanceAmount = (tx: RPCTransactionHarmony): string => { export const allowanceAmount = (tx: RPCTransactionWoop): string => {
if (tx.input.includes(approval20Hash)) { if (tx.input.includes(approval20Hash)) {
const allowance = tx.input.substring(74); const allowance = tx.input.substring(74);
if (allowance.includes(unlimitedAllowance)) { if (allowance.includes(unlimitedAllowance)) {
@ -178,19 +178,19 @@ export const revokePermission = async (tx: ApprovalDetails) => {
// web3.eth.abi.encodeFunctionSignature // web3.eth.abi.encodeFunctionSignature
const hmyWeb3 = new Web3(web3Provider); const wikiWeb3 = new Web3(web3Provider);
if (tx.type === "ERC20") { if (tx.type === "ERC20") {
const contract = new hmyWeb3.eth.Contract(approvalERC20ABI, contractAddress); const contract = new wikiWeb3.eth.Contract(approvalERC20ABI, contractAddress);
await contract.methods.approve(spender, 0).send({ from: account }); await contract.methods.approve(spender, 0).send({ from: account });
} }
else if (tx.type === "ERC1155" || tx.type === "ERC721") { else if (tx.type === "ERC1155" || tx.type === "ERC721") {
if (tx.isFullApproval) { if (tx.isFullApproval) {
const contract = new hmyWeb3.eth.Contract(approvalNonFungibleABI, contractAddress); const contract = new wikiWeb3.eth.Contract(approvalNonFungibleABI, contractAddress);
await contract.methods.setApprovalForAll(spender, false).send({ from: account }); // clear approvals for all await contract.methods.setApprovalForAll(spender, false).send({ from: account }); // clear approvals for all
} }
else { else {
const contract = new hmyWeb3.eth.Contract(approvalNonFungibleABI, contractAddress); const contract = new wikiWeb3.eth.Contract(approvalNonFungibleABI, contractAddress);
await contract.methods.approve(EMPTY_ADDRESS, tx.tokenId).send({ from: account }); // clear approval for tokenId await contract.methods.approve(EMPTY_ADDRESS, tx.tokenId).send({ from: account }); // clear approval for tokenId
} }
} }

@ -11,25 +11,25 @@ import { fromBech32, toBech32, HRP, tHRP } from "./bech32";
* *
* ``` * ```
* // Step 1: import the class * // Step 1: import the class
* const { HarmonyAddress } = require('@harmony-js/crypto'); * const { WoopAddress } = require('@woop-js/crypto');
* *
* // Step 2: call functions * // Step 2: call functions
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const res = HarmonyAddress.isValidBech32(addr); * const res = WoopAddress.isValidBech32(addr);
* console.log(res); * console.log(res);
* ``` * ```
*/ */
export class HarmonyAddress { export class WoopAddress {
/** /**
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const res = HarmonyAddress.isValidBech32(addr); * const res = WoopAddress.isValidBech32(addr);
* console.log(res); * console.log(res);
* ``` * ```
*/ */
static isValidBasic(str: string) { static isValidBasic(str: string) {
const toTest = new HarmonyAddress(str); const toTest = new WoopAddress(str);
return toTest.raw === toTest.basic; return toTest.raw === toTest.basic;
} }
@ -37,12 +37,12 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const res = HarmonyAddress.isValidBech32(addr); * const res = WoopAddress.isValidBech32(addr);
* console.log(res); * console.log(res);
* ``` * ```
*/ */
static isValidBech32(str: string) { static isValidBech32(str: string) {
const toTest = new HarmonyAddress(str); const toTest = new WoopAddress(str);
return toTest.raw === toTest.bech32; return toTest.raw === toTest.bech32;
} }
@ -50,12 +50,12 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const res = HarmonyAddress.isValidBech32TestNet(addr); * const res = WoopAddress.isValidBech32TestNet(addr);
* console.log(res); * console.log(res);
* ``` * ```
*/ */
static isValidBech32TestNet(str: string) { static isValidBech32TestNet(str: string) {
const toTest = new HarmonyAddress(str); const toTest = new WoopAddress(str);
return toTest.raw === toTest.bech32TestNet; return toTest.raw === toTest.bech32TestNet;
} }
@ -68,7 +68,7 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const instance = new HarmonyAddress(addr); * const instance = new WoopAddress(addr);
* console.log(instance.basicHex); * console.log(instance.basicHex);
* ``` * ```
*/ */
@ -80,7 +80,7 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const instance = new HarmonyAddress(addr); * const instance = new WoopAddress(addr);
* console.log(instance.bech32); * console.log(instance.bech32);
* ``` * ```
*/ */
@ -92,7 +92,7 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const instance = new HarmonyAddress(addr); * const instance = new WoopAddress(addr);
* console.log(instance.bech32TestNet); * console.log(instance.bech32TestNet);
* ``` * ```
*/ */
@ -113,7 +113,7 @@ export class HarmonyAddress {
* @example * @example
* ``` * ```
* const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' * const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7'
* const instance = new HarmonyAddress(addr); * const instance = new WoopAddress(addr);
* const res = instance.getBasic(addr); * const res = instance.getBasic(addr);
* console.log(res) * console.log(res)
* ``` * ```
@ -142,32 +142,32 @@ export class HarmonyAddress {
} }
/** /**
* Using this function to get Harmony format address * Using this function to get Woop format address
* *
* @param address * @param address
* *
* @example * @example
* ```javascript * ```javascript
* const { Harmony } = require('@harmony-js/core'); * const { Woop } = require('@woop-js/core');
* const { ChainID, ChainType } = require('@harmony-js/utils'); * const { ChainID, ChainType } = require('@woop-js/utils');
* const { randomBytes } = require('@harmony-js/crypto') * const { randomBytes } = require('@woop-js/crypto')
* *
* const hmy = new Harmony( * const wiki = new Woop(
* 'http://localhost:9500', * 'http://localhost:9500',
* { * {
* chainType: ChainType.Harmony, * chainType: ChainType.Woop,
* chainId: ChainID.HmyLocal, * chainId: ChainID.WikiLocal,
* }, * },
* ); * );
* *
* const bytes = randomBytes(20); * const bytes = randomBytes(20);
* const hAddress = hmy.crypto.getAddress(bytes); * const hAddress = wiki.crypto.getAddress(bytes);
* console.log(hAddress) * console.log(hAddress)
* ``` * ```
*/ */
export function getAddress(address: string) { export function getAddress(address: string) {
try { try {
return new HarmonyAddress(address); return new WoopAddress(address);
} catch (error) { } catch (error) {
throw error; throw error;
} }

@ -1,6 +1,6 @@
/** /**
* @packageDocumentation * @packageDocumentation
* @module harmony-crypto * @module woop-crypto
* @hidden * @hidden
*/ */
@ -127,7 +127,7 @@ export const bech32Decode = (bechString: string) => {
return { hrp, data: Buffer.from(data.slice(0, data.length - 6)) }; return { hrp, data: Buffer.from(data.slice(0, data.length - 6)) };
}; };
// HRP is the human-readable part of Harmony bech32 addresses // HRP is the human-readable part of Woop bech32 addresses
export const HRP = "one"; export const HRP = "one";
export const tHRP = "tone"; export const tHRP = "tone";
@ -184,14 +184,14 @@ export const convertBits = (
/** /**
* toBech32Address * toBech32Address
* *
* bech32Encodes a canonical 20-byte Ethereum-style address as a bech32 Harmony * bech32Encodes a canonical 20-byte Ethereum-style address as a bech32 Woop
* address. * address.
* *
* The expected format is one1<address><checksum> where address and checksum * The expected format is one1<address><checksum> where address and checksum
* are the result of bech32 encoding a Buffer containing the address bytes. * are the result of bech32 encoding a Buffer containing the address bytes.
* *
* @param {string} 20 byte canonical address * @param {string} 20 byte canonical address
* @returns {string} 38 char bech32 bech32Encoded Harmony address * @returns {string} 38 char bech32 bech32Encoded Woop address
*/ */
export const toBech32 = (address: string, useHRP: string = HRP): string => { export const toBech32 = (address: string, useHRP: string = HRP): string => {
if (!isAddress(address)) { if (!isAddress(address)) {
@ -214,7 +214,7 @@ export const toBech32 = (address: string, useHRP: string = HRP): string => {
/** /**
* fromBech32Address * fromBech32Address
* *
* @param {string} address - a valid Harmony bech32 address * @param {string} address - a valid Woop bech32 address
* @returns {string} a canonical 20-byte Ethereum-style address * @returns {string} a canonical 20-byte Ethereum-style address
*/ */
export const fromBech32 = (address: string, useHRP: string = HRP): string => { export const fromBech32 = (address: string, useHRP: string = HRP): string => {

@ -1,6 +1,6 @@
/** /**
* @packageDocumentation * @packageDocumentation
* @module harmony-crypto * @module woop-crypto
* @hidden * @hidden
*/ */

@ -1,9 +1,9 @@
/** /**
# @harmony-js/crypto # @woop-js/crypto
This package provides a collection of apis related to address management, kestore, encoding, and encrypt/decrypt. This package provides a collection of apis related to address management, kestore, encoding, and encrypt/decrypt.
## Installation ## Installation
``` ```
npm install @harmony-js/crypto npm install @woop-js/crypto
``` ```
## Usage ## Usage
```javascript ```javascript
@ -13,23 +13,23 @@ npm install @harmony-js/crypto
* randomBytes, * randomBytes,
* toBech32, * toBech32,
* fromBech32, * fromBech32,
* HarmonyAddress, * WoopAddress,
* generatePrivateKey, * generatePrivateKey,
* getPubkeyFromPrivateKey, * getPubkeyFromPrivateKey,
* getAddressFromPublicKey, * getAddressFromPublicKey,
* getAddressFromPrivateKey, * getAddressFromPrivateKey,
* encryptPhrase, * encryptPhrase,
* decryptPhrase * decryptPhrase
* } = require('@harmony-js/crypto'); * } = require('@woop-js/crypto');
* const { isPrivateKey, isAddress, isPublicKey } = require('@harmony-js/utils'); * const { isPrivateKey, isAddress, isPublicKey } = require('@woop-js/utils');
``` ```
Address apis Address apis
```javascript ```javascript
const bytes = randomBytes(20); const bytes = randomBytes(20);
const addr = new HarmonyAddress(bytes); const addr = new WoopAddress(bytes);
console.log(addr.checksum); console.log(addr.checksum);
console.log(addr.bech32); console.log(addr.bech32);
console.log(HarmonyAddress.isValidBech32(addr.bech32)); console.log(WoopAddress.isValidBech32(addr.bech32));
``` ```
RLP apis RLP apis
```javascript ```javascript
@ -51,7 +51,7 @@ console.log(isAddress(addrPrv));
``` ```
Encrypt/decrypt apis Encrypt/decrypt apis
```javascript ```javascript
* const { Wallet } = require('@harmony-js/account'); * const { Wallet } = require('@woop-js/account');
* const myPhrase = new Wallet().newMnemonic(); * const myPhrase = new Wallet().newMnemonic();
* console.log(myPhrase); * console.log(myPhrase);
* const pwd = '1234'; * const pwd = '1234';
@ -64,7 +64,7 @@ Encrypt/decrypt apis
``` ```
* *
* @packageDocumentation * @packageDocumentation
* @module harmony-crypto * @module woop-crypto
*/ */
// This file is ported from ether.js/src.ts/errors.ts // This file is ported from ether.js/src.ts/errors.ts

@ -1,6 +1,6 @@
/** /**
* @packageDocumentation * @packageDocumentation
* @module harmony-crypto * @module woop-crypto
* @ignore * @ignore
*/ */

@ -1,6 +1,6 @@
/** /**
* @packageDocumentation * @packageDocumentation
* @module harmony-utils * @module woop-utils
*/ */
export const isKeyString = (keyString: string, lengh: number): boolean => { export const isKeyString = (keyString: string, lengh: number): boolean => {

@ -1,6 +1,6 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import Big from "big.js"; import Big from "big.js";
import { RelatedTransaction, RelatedTransactionType, RPCTransactionHarmony, TransactionExtraMark } from "../types"; import { RelatedTransaction, RelatedTransactionType, RPCTransactionWoop, TransactionExtraMark } from "../types";
import { getAddress } from "./getAddress/GetAddress"; import { getAddress } from "./getAddress/GetAddress";
import { bridgeTokensMap } from "src/config"; import { bridgeTokensMap } from "src/config";
@ -33,7 +33,7 @@ export const copyTextToClipboard = (value: string) => {
}; };
export const mapBlockchainTxToRelated = ( export const mapBlockchainTxToRelated = (
tx: RPCTransactionHarmony, tx: RPCTransactionWoop,
type: RelatedTransactionType = 'transaction' type: RelatedTransactionType = 'transaction'
): RelatedTransaction => { ): RelatedTransaction => {
const resultedTx = { const resultedTx = {

Loading…
Cancel
Save