Categorygithub.com/hana-network/protocol-contracts
module
0.0.0-20240809055825-4c6f18b3455e
Repository: https://github.com/hana-network/protocol-contracts.git
Documentation: pkg.go.dev

# README

HanaNetwork Protocol Contracts

This repository houses the HanaNetwork protocol contracts, including Solidity source code, generated Go bindings, deployed contract addresses, and helper utilities.

Importing Protocol Contracts

To incorporate the protocol contracts into your dApp project:

yarn add --dev @hananetwork/protocol-contracts

Usage Examples

Retrieving TSS Address (BSC Testnet)

import { getAddress } from "@hananetwork/protocol-contracts";

getAddress("tss", "hana_testnet");

Fetching HRC-20 BSC USDT Address (HanaNetwork Mainnet Beta)

import { getAddress } from "@hananetwork/protocol-contracts";

const usdtAddress = getAddress("hrc20", "hana_mainnet", "USDT.BSC");

Note: The third argument (symbol) is specific to HRC-20 address queries.

For a comprehensive list of contract addresses, refer to the Contract Addresses documentation.

Development Prerequisites

Ensure you have the following tools installed:

Development Workflow

Compiling Contracts

To compile Solidity contracts:

yarn compile

This command generates JSON artifacts in the artifacts directory.

Generating Go Bindings and Contract Addresses

To create Go bindings for the Solidity contracts:

yarn generate

This utilizes abigen to produce Go files in the pkg directory.

# Packages

No description provided by the author