Skip to content

Commit

Permalink
feat: removal of hedera network (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
rongquan1 authored Dec 5, 2024
1 parent a03aa22 commit 6a4392d
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 1,894 deletions.
255 changes: 194 additions & 61 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
"@hapi/joi": "^17.1.1",
"@rjsf/core": "^3.1.0",
"@tradetrust-tt/decentralized-renderer-react-components": "^3.14.3",
"@tradetrust-tt/dnsprove": "^2.14.2",
"@tradetrust-tt/document-store": "^2.7.0",
"@tradetrust-tt/token-registry": "^4.12.1",
"@tradetrust-tt/tradetrust": "^6.9.4",
"@tradetrust-tt/tradetrust-cli": "^2.22.1",
"@tradetrust-tt/tradetrust-ui-components": "^2.22.2",
"@tradetrust-tt/tradetrust-utils": "^1.14.1",
"@tradetrust-tt/dnsprove": "^2.15.0",
"@tradetrust-tt/document-store": "^4.1.0",
"@tradetrust-tt/token-registry": "^4.15.0",
"@tradetrust-tt/tradetrust": "^6.9.7",
"@tradetrust-tt/tradetrust-cli": "^2.23.0",
"@tradetrust-tt/tradetrust-ui-components": "^3.0.0",
"@tradetrust-tt/tradetrust-utils": "^1.14.3",
"@tradetrust-tt/tt-verify": "^8.10.2",
"ajv": "^8.6.0",
"axios": "^1.7.2",
Expand Down
23 changes: 0 additions & 23 deletions scripts/setup-contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,3 @@ merkleRootToIssue.forEach((hash) => {
`${CLI_PATH} document-store issue --address ${DOCUMENT_STORE_ADDRESS} --hash ${hash} -n local -k ${ACCOUNT_KEY}`
);
});

const ACCOUNT_KEY_HEDERA_TESTNET = "0xe82294532bcfcd8e0763ee5cef194f36f00396be59b94fb418f5f8d83140d9a7";
const DOCUMENT_STORE_ADDRESS_HEDERA_TESTNET = "0x4Bf7E4777a8D1b6EdD5F2d9b8582e2817F0B0953";

const TITLE_ESCROW_FACTORY_ADDRESS_HEDERA_TESTNET = "0x63A223E025256790E88778a01f480eBA77731D04";

// Need to deploy as it will use the 1st contract address: 0x63a223e025256790e88778a01f480eba77731d04
shell.exec(`${CLI_PATH} deploy title-escrow-factory -n hederatestnet -k ${ACCOUNT_KEY_HEDERA_TESTNET}`);

shell.exec(
`${CLI_PATH} deploy token-registry "DEMO TOKEN REGISTRY" DTR -n hederatestnet -k ${ACCOUNT_KEY_HEDERA_TESTNET} --factory-address ${TITLE_ESCROW_FACTORY_ADDRESS_HEDERA_TESTNET} --standalone`
);

shell.exec(`${CLI_PATH} deploy document-store "My Document Store" -n hederatestnet -k ${ACCOUNT_KEY_HEDERA_TESTNET}`);

const merkleRootToIssueHederaTestnet = ["0xbc4f35f03982a760505785d62565e29b88377db1243b273bd598e4763bacb83c"];

// Issue a verifiable document for revoke flow
merkleRootToIssueHederaTestnet.forEach((hash) => {
shell.exec(
`${CLI_PATH} document-store issue --address ${DOCUMENT_STORE_ADDRESS_HEDERA_TESTNET} --hash ${hash} -n hederatestnet -k ${ACCOUNT_KEY_HEDERA_TESTNET}`
);
});
2 changes: 0 additions & 2 deletions src/common/config/validate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ const configFileSchema = Joi.object({
"amoy",
"xdc",
"xdcapothem",
"hederamainnet",
"hederatestnet",
"stabilitytestnet",
"stability",
"astron"
Expand Down
34 changes: 0 additions & 34 deletions src/constants/chainInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export enum ChainId {
XDC = 50,
XDCApothem = 51,

// Hedera Network
HederaMainnet = 295,
HederaTestnet = 296,

// Stability Network
StabilityTestnet = 20180427,
Stability = 101010,
Expand Down Expand Up @@ -131,34 +127,6 @@ export const ChainInfo: ChainInfo = {
decimals: 18,
},
},
[ChainId.HederaMainnet]: {
label: "Hedera Network Mainnet",
chain: "Hedera",
chainId: ChainId.HederaMainnet,
networkName: "hederamainnet",
explorerUrl: "https://hashscan.io/mainnet",
explorerApiUrl: "https://hashscan.io/mainnet",
rpcUrl: "https://mainnet.hashio.io/api",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
[ChainId.HederaTestnet]: {
label: "Hedera Network TestNet",
chain: "Hedera",
chainId: ChainId.HederaTestnet,
networkName: "hederatestnet",
explorerUrl: "https://hashscan.io/testnet",
explorerApiUrl: "https://hashscan.io/testnet",
rpcUrl: "https://testnet.hashio.io/api",
nativeCurrency: {
name: "HBAR",
symbol: "HBAR",
decimals: 18,
},
},
[ChainId.StabilityTestnet]: {
label: "Stability Network TestNet",
chain: "FREE",
Expand Down Expand Up @@ -207,7 +175,6 @@ export const supportedMainnet = [
ChainInfo[ChainId.Ethereum].networkName,
ChainInfo[ChainId.Polygon].networkName,
ChainInfo[ChainId.XDC].networkName,
ChainInfo[ChainId.HederaMainnet].networkName,
ChainInfo[ChainId.Stability].networkName,
ChainInfo[ChainId.Astron].networkName,
];
Expand All @@ -216,7 +183,6 @@ export const supportedTestnet = [
ChainInfo[ChainId.Sepolia].networkName,
ChainInfo[ChainId.Amoy].networkName,
ChainInfo[ChainId.XDCApothem].networkName,
ChainInfo[ChainId.HederaTestnet].networkName,
ChainInfo[ChainId.StabilityTestnet].networkName,
];

Expand Down
Loading

0 comments on commit 6a4392d

Please sign in to comment.