Skip to content

Production Release for Canton Demo 2025.06.12#168

Merged
thibauld merged 27 commits intomainfrom
dev
Jun 12, 2025
Merged

Production Release for Canton Demo 2025.06.12#168
thibauld merged 27 commits intomainfrom
dev

Conversation

@thibauld
Copy link
Collaborator

What?

Please describe what you're trying to accomplish in this PR.

Why?

What problem does this solve? Why is this important? What's the context?

Screenshots (optional)

AdamMomen and others added 27 commits June 9, 2025 16:24
- Implemented a new POST endpoint `/cross-id-check` to validate cap table data from the request body.
- Added error handling for empty requests and validation errors, returning appropriate HTTP status codes and messages.
- Enhanced logging for server errors during the verification process.
Created with git submodule add --name fairmint-canton --force https://github.com/Fairmint/canton src/chain-operations/canton/lib/fairmint-canton
POC Canton demo integration
@thibauld thibauld changed the title Dev Production Release for Canton Demo 2025.06.12 Jun 12, 2025
@thibauld thibauld merged commit 8e753fe into main Jun 12, 2025
2 of 3 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing Parameter Causes Deployment Failure

The deployCapTable function now requires a fourth issuer parameter. Existing callers, such as the /issuer/create-fairmint-reflection route, were not updated and still pass only three arguments. When a Canton chain ID is used, the issuer parameter is undefined, causing deployCapTableCanton to throw a TypeError when attempting to access issuer.legal_name. This prevents cap-table deployment and breaks issuer creation on Canton networks.

src/chain-operations/deployCapTable.js#L23-L32

};
async function deployCapTable(issuerId, initial_shares_authorized, chainId, issuer) {
if (isCantonChainId(chainId)) {
return deployCapTableCanton(issuerId, initial_shares_authorized, chainId, issuer);
}
// Get provider for specified chain
const wallet = await getWallet(chainId);
console.log("🗽 | Wallet address: ", wallet.address);

Fix in Cursor


Bug: Canton Chain ID Handling Regression

The getContractInstance() function now returns null for Canton chain IDs. Existing read-only routes (e.g., /stockClass/id/:id, /stakeholder/id/:id) unconditionally use req.contract without null-checking, causing "Cannot read properties of null" errors when attempting to invoke contract methods. This regression breaks these previously working endpoints for Canton issuers.

src/chain-operations/getContractInstances.js#L17-L23

export const getContractInstance = (address, chainId) => {
if (isCantonChainId(chainId)) {
console.log(`Canton chain ${chainId} contract instance is not supported yet`);
return null;
}

Fix in Cursor


Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants