Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 0 additions & 13 deletions .changeset/ats-sdk-new-methods.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/balances-at-snapshot-implementation.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/contracts-folder-restructuring.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/coupon-typechain-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-sdk": major
---

Migrated all coupon operations from `BondToken` to a new dedicated `CouponToken` export, replacing `BondRead__factory` and `Bond__factory` with `Coupon__factory` across all coupon queries and transactions. Added new `getCouponsFor` method for paginated coupon balances per account.
11 changes: 0 additions & 11 deletions .changeset/fix-downstream-contracts-imports.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/fix-npm-vulnerabilities.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/good-rooms-strive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-contracts": major
---

refactor split voting functions in a new facet
13 changes: 0 additions & 13 deletions .changeset/hwc-test-fixes.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/orange-teams-find.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/reduce-redundant-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-contracts": patch
---

Some minor changes were made in a couple os smart contracts in order to reduce redundant code.
5 changes: 5 additions & 0 deletions .changeset/sdk-nominal-value.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-sdk": minor
---

Add nominal value support to the SDK, contracts, and dapp.
5 changes: 5 additions & 0 deletions .changeset/twelve-suns-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashgraph/asset-tokenization-contracts": major
---

split coupon from bondFacet
26 changes: 26 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependencies
node_modules

# Build outputs
dist
build
artifacts
typechain-types
cache

# Git
.git
.github
.husky
.changeset
.claude

# Environment files (values passed via --build-arg)
.env
.env.sample
.env.local
.env.*.local

# Documentation & non-build files
docs
Smart Contracts Audit Report.pdf
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,4 @@ asset-tokenization-studio.iml
.kiro/
.claude/
CLAUDE.md

.tasks
.tasks/
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ You can also run the documentation site locally:
npm run docs:start
```

If you want to deploy documentation to Github Pages or Netlify you need to build the static content using the following command:

```bash
npm run docs:build
```

To test documentation ready for deployment run the following command:

```bash
npm run docs:serve
```

## Architecture

### High-Level Overview
Expand Down
35 changes: 35 additions & 0 deletions apps/ats/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# @hashgraph/asset-tokenization-dapp

## 6.0.0

### Major Changes

- 77aa333: Migrate to HWC 2

### Minor Changes

- 77aa333: Implement comprehensive bond tokenization SDK with KPI-linked rates and coupon management:
- Add CreateBondFixedRate and CreateBondKpiLinkedRate commands for bond creation
- Implement setInterestRate, setRate, getRate, and getInterestRate for rate management
- Add KPI data infrastructure: addKpiData, getLatestKpiData, getMinDate, getIsCheckPointDate, setImpactData
- Implement coupon management: getCouponsOrdered, GetCouponFromOrderedListAt, getOrderedLiistTotal
- Add scheduled coupon distribution: GetScheduledCouponListing, getScheduledCouponListingCount
- Enhance RPC and Hedera transaction adapters for bond operations

### Patch Changes

- 77aa333: Fix failing tests in web app and SDK:
- Mock ESM-only packages (@hashgraph/hedera-wallet-connect, @reown/appkit) in web jest config to resolve CJS/ESM incompatibility
- Fix HederaWalletConnectTransactionAdapter unit test: use jest.spyOn for read-only rpcProvider property
- Update environmentMock paths for custodial adapters (hs/hts/custodial β†’ hs/custodial) following file restructure
- Remove mocks for deleted HederaTransactionAdapter and abstract CustodialTransactionAdapter
- Add register() and createBond() mocks to DFNS, Fireblocks, and AWSKMS custodial adapter mocks
- Grant \_KPI_MANAGER_ROLE to bond creator in createBond mock to enable addKpiData tests

- 3048bbf: Enable docusarus documentation deployments with Netlify and fix ats web deployment build
- Updated dependencies [77aa333]
- Updated dependencies [2e5fdcf]
- Updated dependencies [5e58601]
- Updated dependencies [77aa333]
- Updated dependencies [77aa333]
- Updated dependencies [3048bbf]
- @hashgraph/asset-tokenization-sdk@6.0.0

## 5.0.0

### Major Changes
Expand Down
87 changes: 87 additions & 0 deletions apps/ats/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# ----------------------------------------------------------
# Stage 1: Install dependencies
# ----------------------------------------------------------
FROM node:24-slim AS deps

WORKDIR /app

# Copy root package files
COPY package.json package-lock.json ./

# Copy all workspace package.json files so npm ci resolves the full workspace tree
COPY packages/ats/contracts/package.json packages/ats/contracts/
COPY packages/ats/sdk/package.json packages/ats/sdk/
COPY apps/ats/web/package.json apps/ats/web/
COPY packages/mass-payout/contracts/package.json packages/mass-payout/contracts/
COPY packages/mass-payout/sdk/package.json packages/mass-payout/sdk/
COPY apps/mass-payout/backend/package.json apps/mass-payout/backend/
COPY apps/mass-payout/frontend/package.json apps/mass-payout/frontend/
COPY apps/docs/package.json apps/docs/

# Root config files referenced by workspace packages
COPY prettier.config.mjs eslint.config.mjs .prettierignore .npmrc ./

RUN npm ci

# ----------------------------------------------------------
# Stage 2: Build contracts -> SDK -> web
# ----------------------------------------------------------
FROM deps AS builder

# Copy ATS contracts source
COPY packages/ats/contracts/ packages/ats/contracts/

# Build contracts (generates typechain types needed by SDK)
RUN npm run ats:contracts:build

# Copy ATS SDK source
COPY packages/ats/sdk/ packages/ats/sdk/

# Build SDK
RUN npm run ats:sdk:build

# Environment variables baked into the bundle at build time by Vite.

# Required β€” pass via: docker build --build-arg REACT_APP_RPC_FACTORY=0.0.xxx ...
ARG REACT_APP_MIRROR_NODE
ARG REACT_APP_RPC_NODE
ARG REACT_APP_RPC_RESOLVER
ARG REACT_APP_RPC_FACTORY

# Optional β€” override if needed
ARG REACT_APP_EQUITY_CONFIG_ID=0x0000000000000000000000000000000000000000000000000000000000000001
ARG REACT_APP_EQUITY_CONFIG_VERSION=0
ARG REACT_APP_BOND_CONFIG_ID=0x0000000000000000000000000000000000000000000000000000000000000002
ARG REACT_APP_BOND_CONFIG_VERSION=0
ARG REACT_APP_SHOW_DISCLAIMER=true
ARG REACT_APP_PROJECT_ID
ARG REACT_APP_DAPP_NAME=Asset Tokenization Studio
ARG REACT_APP_DAPP_DESCRIPTION=Asset Tokenization Studio. Built on Hedera Hashgraph.
ARG REACT_APP_DAPP_URL
ARG REACT_APP_DAPP_ICONS

# Copy ATS web source and build
COPY apps/ats/web/ apps/ats/web/

RUN npm run ats:web:build

# ----------------------------------------------------------
# Stage 3: Serve with nginx
# ----------------------------------------------------------
FROM nginx:alpine

COPY --from=builder /app/apps/ats/web/dist /usr/share/nginx/html
COPY apps/ats/web/nginx.conf /etc/nginx/conf.d/default.conf

RUN chown -R nginx:nginx /usr/share/nginx/html && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
touch /var/run/nginx.pid && \
chown nginx:nginx /var/run/nginx.pid


USER 101

EXPOSE 5174

CMD ["nginx", "-g", "daemon off;"]
14 changes: 14 additions & 0 deletions apps/ats/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ npm run dev

Open a browser and navigate to the URL displayed in the terminal (by default: _http://localhost:5173_)

## Docker

You can also build and run the web app as a Docker container using Docker Compose:

```bash
cd apps/ats/web
cp .env.sample .env # then edit with your values
docker compose up --build
```

The app will be available at `http://localhost:5174`.

For full details, see the [Full Development Setup - Docker](https://github.com/hashgraph/asset-tokenization-studio/tree/main/docs/ats/getting-started/full-setup.md#step-6-docker-optional).

# Test

The following _src_ folders contain _**tests**_ subfolders within them with their corresponding tests:
Expand Down
25 changes: 25 additions & 0 deletions apps/ats/web/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
ats:
build:
context: ../../../
dockerfile: ./apps/ats/web/Dockerfile
platforms:
- "linux/amd64"
args:
REACT_APP_MIRROR_NODE: ${REACT_APP_MIRROR_NODE}
REACT_APP_RPC_NODE: ${REACT_APP_RPC_NODE}
REACT_APP_RPC_RESOLVER: ${REACT_APP_RPC_RESOLVER}
REACT_APP_RPC_FACTORY: ${REACT_APP_RPC_FACTORY}
# # Optional
# REACT_APP_EQUITY_CONFIG_ID: ${REACT_APP_EQUITY_CONFIG_ID}
# REACT_APP_EQUITY_CONFIG_VERSION: ${REACT_APP_EQUITY_CONFIG_VERSION}
# REACT_APP_BOND_CONFIG_ID: ${REACT_APP_BOND_CONFIG_ID}
# REACT_APP_BOND_CONFIG_VERSION: ${REACT_APP_BOND_CONFIG_VERSION}
# REACT_APP_SHOW_DISCLAIMER: ${REACT_APP_SHOW_DISCLAIMER}
# REACT_APP_PROJECT_ID: ${REACT_APP_PROJECT_ID}
# REACT_APP_DAPP_NAME: ${REACT_APP_DAPP_NAME}
# REACT_APP_DAPP_DESCRIPTION: ${REACT_APP_DAPP_DESCRIPTION}
# REACT_APP_DAPP_URL: ${REACT_APP_DAPP_URL}
# REACT_APP_DAPP_ICONS: ${REACT_APP_DAPP_ICONS}
ports:
- "5174:5174"
13 changes: 13 additions & 0 deletions apps/ats/web/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
server {
listen 5174;
listen [::]:5174;
server_name _;
root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}

error_page 404 /index.html;
}
2 changes: 1 addition & 1 deletion apps/ats/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/asset-tokenization-dapp",
"version": "5.0.0",
"version": "6.0.0",
"license": "Apache-2.0",
"scripts": {
"build": "tsc && vite build",
Expand Down
5 changes: 5 additions & 0 deletions apps/ats/web/src/dotenv-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

// dotenv mock for browser compatibility β€” Vite handles env vars via import.meta.env
export const config = () => ({});
export default { config };
Loading
Loading