Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ Upon installation, a configuration folder will be created at `~/.config/open-att

## Supported networks

| Network ID | Name | Network | Type |
| ---------- | ------------------------ | ------------ | ---------- |
| `1` | Ethereum Mainnet | `mainnet` | Production |
| `11155111` | Ethereum Testnet Sepolia | `sepolia` | Test |
| `137` | Polygon Mainnet | `polygon` | Production |
| `80001` | Polygon Testnet Mumbai | `mumbai` | Test |
| `50` | XDC Network | `xdc` | Production |
| `51` | XDC Apothem Network | `xdcapothem` | Test |
| Network ID | Name | Network | Type |
|------------|--------------------------|-----------------|------------|
| `1` | Ethereum Mainnet | `mainnet` | Production |
| `11155111` | Ethereum Testnet Sepolia | `sepolia` | Test |
| `137` | Polygon Mainnet | `polygon` | Production |
| `80001` | Polygon Testnet Mumbai | `mumbai` | Test |
| `50` | XDC Network | `xdc` | Production |
| `51` | XDC Apothem Network | `xdcapothem` | Test |
| `295` | Hedera Mainnet | `hederamainnet` | Production |
| `296` | Hedera Testnet | `hederatestnet` | Test |


---
Expand Down Expand Up @@ -429,6 +431,17 @@ The response looks like:
✔ success Token registry deployed at 0x4B127b8d5e53872d403ce43414afeb1db67B1842
```

Example - Hedera network using Title Escrow address.
```bash
open-attestation deploy token-registry "KrypCEBL" KRYE -n hederatestnet -f key.txt --factory-address 0xde5aBf7B2416b99cba15021E3CF35A2a56ac83c1 --standalone
```

The response looks like:

```
✔ success Token registry deployed at 0x67f98aB5E2836223bCFC3e5c03D701AeB3a8A30a
```

#### Issuing a document to token registry

The `token-registry issue` command issues a hash to a token registry deployed on the blockchain.
Expand Down
1 change: 1 addition & 0 deletions src/commands/config/config.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export enum TestNetwork {
Sepolia = "sepolia",
Mumbai = "mumbai (polygon)",
Apothem = "apothem (xdc)",
Hedera = "hedera (testnet)"
}
3 changes: 2 additions & 1 deletion src/commands/config/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const handler = async (args: CreateConfigCommand): Promise<void> => {
args.configTemplatePath = configTemplatePath;
}

const networks = [TestNetwork.Local, TestNetwork.Sepolia, TestNetwork.Mumbai, TestNetwork.Apothem];
const networks = [TestNetwork.Local, TestNetwork.Sepolia, TestNetwork.Mumbai, TestNetwork.Apothem, TestNetwork.Hedera];
const { network } = await inquirer.prompt({
type: "list",
name: "network",
Expand All @@ -84,6 +84,7 @@ const convertNetworkToNetworkCmdName = (selectedNetwork: TestNetwork): NetworkCm
[TestNetwork.Sepolia]: NetworkCmdName.Sepolia,
[TestNetwork.Mumbai]: NetworkCmdName.Maticmum,
[TestNetwork.Apothem]: NetworkCmdName.XDCApothem,
[TestNetwork.Hedera]: NetworkCmdName.HederaTestnet,
};
return network[selectedNetwork];
};
18 changes: 17 additions & 1 deletion src/common/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { providers } from "ethers";
import type { GasStationFunction } from "./gas-station";
import { gasStation } from "./gas-station";

export type networkCurrency = "ETH" | "MATIC" | "XDC";
export type networkCurrency = "ETH" | "MATIC" | "XDC" | "HBAR";

type SupportedNetwork = {
explorer: string;
Expand All @@ -21,6 +21,8 @@ export enum NetworkCmdName {
Maticmum = "maticmum",
XDC = "xdc",
XDCApothem = "xdcapothem",
HederaMainnet = "hederamainnet",
HederaTestnet = "hederatestnet"
}

const defaultInfuraProvider =
Expand Down Expand Up @@ -87,6 +89,20 @@ export const supportedNetwork: {
networkName: NetworkCmdName.XDCApothem,
currency: "XDC",
},
[NetworkCmdName.HederaMainnet]: {
explorer: "https://hashscan.io/mainnet",
provider: jsonRpcProvider("https://mainnet.hashio.io/api"),
networkId: 295,
networkName: NetworkCmdName.HederaMainnet,
currency: "HBAR",
},
[NetworkCmdName.HederaTestnet]: {
explorer: "https://hashscan.io/testnet",
provider: jsonRpcProvider("https://testnet.hashio.io/api"),
networkId: 296,
networkName: NetworkCmdName.HederaTestnet,
currency: "HBAR",
},
};

export const getSupportedNetwork = (networkCmdName: string): SupportedNetwork => {
Expand Down