Skip to content

feat/upgrade modules 8#39

Merged
solidsnakedev merged 4 commits into
mainfrom
feat/upgrade-modules-8
Sep 3, 2025
Merged

feat/upgrade modules 8#39
solidsnakedev merged 4 commits into
mainfrom
feat/upgrade-modules-8

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings September 3, 2025 22:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades modules to version 8, focusing on standardizing type representations and modernizing import patterns throughout the Evolution SDK.

  • Migrates from null to undefined for optional values across the codebase
  • Introduces new SDK modules for better organization (Unit, Label, PolicyId, RewardAddress)
  • Updates import patterns to use cleaner module namespacing

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/evolution/src/sdk/wallet/Wallet.ts Updates import alias and changes null to undefined for optional fields
packages/evolution/src/sdk/provider/types.ts Changes poolId and assetName types from null to undefined
packages/evolution/src/sdk/provider/internal/Ogmios.ts Major refactor with updated imports, type definitions, and null to undefined migration
packages/evolution/src/sdk/provider/Provider.ts Updates import patterns and return types to use string instead of specific types
packages/evolution/src/sdk/provider/Kupmios.ts Comprehensive refactor with new datum handling, updated imports, and implementation completion
packages/evolution/src/sdk/index.ts New barrel export file for SDK modules
packages/evolution/src/sdk/Unit.ts New module for unit parsing and creation functionality
packages/evolution/src/sdk/UTxO.ts Updates datum types to use discriminated unions and removes undefined option
packages/evolution/src/sdk/Script.ts Adds CBOR encoding utilities for script handling
packages/evolution/src/sdk/RewardAddress.ts New module for reward address operations
packages/evolution/src/sdk/PolicyId.ts New simple type alias for policy IDs
packages/evolution/src/sdk/Label.ts New module implementing CIP-67 label handling with CRC8 checksums
packages/evolution/src/sdk/Assets.ts Significant expansion with new utility functions and core type conversions
Comments suppressed due to low confidence (2)

packages/evolution/src/sdk/provider/internal/Ogmios.ts:1

  • The assignment expression inside the return statement is confusing and potentially error-prone. Should separate the assignment from the return, or clarify the intended behavior.
import type { Record } from "effect"

packages/evolution/src/sdk/provider/Kupmios.ts:1

  • Inconsistent null safety: line 202 accesses utxo.datumOption.type without optional chaining, but line 203 uses optional chaining. Both should use optional chaining for consistency.
import { FetchHttpClient } from "@effect/platform"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +62 to 64
export const isDatumHash = (datum: Datum): datum is { type: "datumHash"; hash: string } =>
datum !== undefined && "hash" in datum

Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The type guards are checking for property existence instead of the discriminating 'type' field. Since Datum is now a discriminated union, these should check datum.type === 'datumHash' and datum.type === 'inlineDatum' respectively.

Copilot uses AI. Check for mistakes.
Comment on lines +62 to 64
export const isDatumHash = (datum: Datum): datum is { type: "datumHash"; hash: string } =>
datum !== undefined && "hash" in datum

Copy link

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

The type guards are checking for property existence instead of the discriminating 'type' field. Since Datum is now a discriminated union, these should check datum.type === 'datumHash' and datum.type === 'inlineDatum' respectively.

Copilot uses AI. Check for mistakes.
@solidsnakedev solidsnakedev merged commit c54bb4a into main Sep 3, 2025
5 checks passed
@solidsnakedev solidsnakedev deleted the feat/upgrade-modules-8 branch September 3, 2025 22:21
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.

2 participants