diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index a53307f..a119644 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -21,7 +21,7 @@ on: default: false changelog: type: string - description: "Changelog (required if publishing)" + description: "Changelog (required if publishing, markdown format, do NOT include version or date header. Use sections like ### Added, ### Changed, etc.)" default: "" discord_notify: type: boolean @@ -122,23 +122,40 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - echo "📝 Prepending changelog for $VERSION" + echo "📝 Inserting changelog for $VERSION" FILE="changelog/${PACKAGE}-changelog.md" TEMP_FILE="${FILE}.tmp" + DATE=$(date +'%Y-%m-%d') + HEADER="## [${VERSION}] - ${DATE}" - echo -e "${VERSION} - ${CHANGELOG}\n" > "$TEMP_FILE" + if [ ! -f "$FILE" ]; then + echo -e "# Changelog\n" > "$FILE" + fi - if [ -f "$FILE" ]; then - cat "$FILE" >> "$TEMP_FILE" + # Find the line number of the "# Changelog" header + HEADER_LINE=$(grep -n "^# Changelog" "$FILE" | cut -d: -f1) + if [ -z "$HEADER_LINE" ]; then + # If not found, just prepend + HEADER_LINE=0 fi + # Write up to and including the header + if [ "$HEADER_LINE" -gt 0 ]; then + head -n "$HEADER_LINE" "$FILE" > "$TEMP_FILE" + fi + # Add the new entry + echo -e "\n${HEADER}\n\n${CHANGELOG}\n" >> "$TEMP_FILE" + # Add the rest of the file + if [ "$HEADER_LINE" -gt 0 ]; then + tail -n "+$((HEADER_LINE + 1))" "$FILE" >> "$TEMP_FILE" + fi mv "$TEMP_FILE" "$FILE" # Commit the updated package.json with new version git add packages/$PACKAGE/package.json git add changelog/* - git commit -m "chore($PACKAGE): bump version to $version" + git commit -m "chore($PACKAGE): bump version to $VERSION" # Create a tag with the version TAG="${PACKAGE}-${VERSION}" diff --git a/changelog/indexer-changelog.md b/changelog/indexer-changelog.md index 8f91c8c..692205a 100644 --- a/changelog/indexer-changelog.md +++ b/changelog/indexer-changelog.md @@ -1,5 +1,3 @@ -1.0.2 - ### Changed - **BREAKING**: SDK renamed to `@thenamespace/indexer` from `@namespacesdk/indexer` - Enhanced error handling with detailed error context and logging - Improved TypeScript types with comprehensive JSDoc documentation - Added response interceptors for better error reporting - Updated default timeout to 30 seconds - Enhanced HTTP client configuration with better defaults ### Added - Comprehensive JSDoc documentation for all interfaces and methods - Better error handling with enhanced error messages - Support for custom HTTP client configuration - Improved type safety with detailed interface documentation - Enhanced developer experience with better examples and documentation - Repository metadata and support links ### Fixed - Improved error handling for network failures and API errors - Better type definitions with proper semicolons and formatting - Enhanced request/response handling with proper async/await patterns - # Changelog All notable changes to the `@thenamespace/indexer` package will be documented in this file. diff --git a/changelog/offchain-manager-changelog.md b/changelog/offchain-manager-changelog.md index 7982f4f..a501f1e 100644 --- a/changelog/offchain-manager-changelog.md +++ b/changelog/offchain-manager-changelog.md @@ -1,5 +1,3 @@ -1.0.3 - ### Added - **New Blockchain Support**: Added support for 7 new blockchain networks: - Unichain - Berachain - WorldChain - Zora - Celo - Aptos - Algorand ### Enhanced - **Improved Address Validation**: - Enhanced Starknet address validation to support variable-length hex addresses (1-64 characters) - Improved Bitcoin address validation to support Legacy (P2PKH), Script (P2SH), Bech32 (P2WPKH/P2WSH), and Taproot (P2TR) formats - Updated Cosmos address validation to use proper bech32 format with 'cosmos1' prefix - Enhanced NEAR address validation to support both implicit accounts (64 hex chars) and named accounts (.near) - Improved Sui address validation to support variable-length hex addresses (1-64 characters) - Added Aptos address validation with variable-length hex support - Added Algorand address validation using Base32 format (58 characters) ### Testing - **Comprehensive Test Coverage**: - Added validation tests for all new blockchain chains - Enhanced Bitcoin address validation tests with multiple format support - Added Starknet address validation tests for both full and shortened addresses - Added Cosmos, NEAR, Sui, Aptos, and Algorand address validation tests - Added EVM-compatible chain address validation tests - # Changelog All notable changes to the `@thenamespace/offchain-manager` package will be documented in this file. diff --git a/packages/offchain-manager/scripts/test-manual.ts b/packages/offchain-manager/scripts/test-manual.ts index b8cac68..d8e6f45 100644 --- a/packages/offchain-manager/scripts/test-manual.ts +++ b/packages/offchain-manager/scripts/test-manual.ts @@ -86,6 +86,11 @@ async function runManualTests() { await client.addAddressRecord(`${label}.${TEST_DOMAIN}`, ChainName.Base, '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'); console.log(` ✅ Added Base chain address\n`); + // Test 8.5: Add Sui address record + console.log('8️⃣5️⃣ Testing Sui address addition...'); + await client.addAddressRecord(`${label}.${TEST_DOMAIN}`, ChainName.Sui, '0x556a3c6c150709c0a8486e3eb002ea8118ba79bdf349e710dc3bb85901f797c3'); + console.log(` ✅ Added Sui chain address\n`); + // Test 9: Get subnames for domain console.log('9️⃣ Testing subname listing...'); const subnames = await client.getFilteredSubnames({ diff --git a/packages/offchain-manager/src/dto/chains.ts b/packages/offchain-manager/src/dto/chains.ts index 94c7a70..309a663 100644 --- a/packages/offchain-manager/src/dto/chains.ts +++ b/packages/offchain-manager/src/dto/chains.ts @@ -117,7 +117,7 @@ export const chainMetadata: Record = { }, starknet: { label: "Starknet", - coin: 234567891, + coin: 9004, }, sol: { label: "Solana", @@ -145,7 +145,7 @@ export const chainMetadata: Record = { }, sui: { label: "Sui", - coin: 101, + coin: 784, }, unichain: { label: "Unichain",