Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into pb/jan23
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalaji committed Jan 24, 2025
2 parents 5f65330 + f8d1792 commit fe11a7b
Show file tree
Hide file tree
Showing 59 changed files with 331 additions and 823 deletions.
11 changes: 0 additions & 11 deletions .changeset/chatty-starfishes-double.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/many-llamas-count.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nervous-dragons-applaud.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-waves-camp.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quick-walls-deny.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tender-feet-sit.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thirty-apricots-eat.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/weak-dingos-thank.md

This file was deleted.

7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ COPY solidity ./solidity

RUN yarn build

# Baked-in registry version
# keep for back-compat until we update all usage of the monorepo image (e.g. key-funder)
ENV REGISTRY_URI="/hyperlane-registry"
ARG REGISTRY_COMMIT="main"
RUN git clone https://github.com/hyperlane-xyz/hyperlane-registry.git "$REGISTRY_URI" \
&& cd "$REGISTRY_URI" \
&& git fetch origin "$REGISTRY_COMMIT" \
&& git checkout "$REGISTRY_COMMIT"

# Add entrypoint script that allows overriding the registry commit
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
18 changes: 18 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
set -e

# Set default registry URI, same as Dockerfile
REGISTRY_URI="/hyperlane-registry"

# Only update registry if REGISTRY_COMMIT is set
if [ -n "$REGISTRY_COMMIT" ]; then
echo "Updating Hyperlane registry to commit: ${REGISTRY_COMMIT}"
OLDPWD=$(pwd)
cd "$REGISTRY_URI"
git fetch origin "$REGISTRY_COMMIT"
git checkout "$REGISTRY_COMMIT"
cd "$OLDPWD"
fi

# Execute the main container command
exec "$@"
7 changes: 0 additions & 7 deletions solidity/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ docs
flattened/
buildArtifact.json
fixtures/
# ZKSync
artifacts-zk
cache-zk
core-utils/zksync/artifacts/output
.zksolc-libraries-cache/
typechain-types/
typechain/
17 changes: 17 additions & 0 deletions solidity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @hyperlane-xyz/core

## 5.10.0

### Minor Changes

- db8c09011: Add ZKSync support and restructure build artifacts:

- Add ZKSync compilation support
- Restructure typechain directory location to core-utils/typechain
- Add ZKSync-specific artifact generation and exports
- Update build process to handle both standard and ZKSync artifacts
- Add new exports for ZKSync build artifacts and contract types

### Patch Changes

- 11cf66c5e: Export empty zksync buildArtifact to satisfy package.json exports
- @hyperlane-xyz/utils@8.3.0

## 5.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/PackageVersioned.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pragma solidity >=0.6.11;
**/
abstract contract PackageVersioned {
// GENERATED CODE - DO NOT EDIT
string public constant PACKAGE_VERSION = "5.9.2";
string public constant PACKAGE_VERSION = "5.10.0";
}
2 changes: 0 additions & 2 deletions solidity/core-utils/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion solidity/core-utils/zksync/buildArtifact.ts

This file was deleted.

103 changes: 0 additions & 103 deletions solidity/core-utils/zksync/index.ts

This file was deleted.

39 changes: 0 additions & 39 deletions solidity/exportBuildArtifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,3 @@ else
echo 'Failed to process build artifact with jq'
exit 1
fi

# ZKSYNC

if [ "$ZKSYNC" = "true" ]; then
# Define the artifacts directory
artifactsDir="./artifacts-zk/build-info"
# Define the output file
outputFileJson="./dist/zksync/buildArtifact.json"
outputFileJs="./dist/zksync/buildArtifact.js"
outputFileTsd="./dist/zksync/buildArtifact.d.ts"

# log that we're in the script
echo 'Finding and processing ZKSync hardhat build artifact...'

# Find most recently modified JSON build artifact
if [ "$(uname)" = "Darwin" ]; then
# for local flow
jsonFiles=$(find "$artifactsDir" -type f -name "*.json" -exec stat -f "%m %N" {} \; | sort -rn | head -n 1 | cut -d' ' -f2-)
else
# for CI flow
jsonFiles=$(find "$artifactsDir" -type f -name "*.json" -exec stat -c "%Y %n" {} \; | sort -rn | head -n 1 | cut -d' ' -f2-)
fi

if [ ! -f "$jsonFiles" ]; then
echo 'Failed to find ZKSync build artifact'
exit 1
fi

# Extract required keys and write to outputFile
if jq -c '{input, solcLongVersion, zk_version: .output.zk_version}' "$jsonFiles" >"$outputFileJson"; then
echo "export const buildArtifact = " >"$outputFileJs"
cat "$outputFileJson" >>"$outputFileJs"
echo "export const buildArtifact: any" >"$outputFileTsd"
echo 'Finished processing ZKSync build artifact.'
else
echo 'Failed to process ZKSync build artifact with jq'
exit 1
fi
fi
60 changes: 0 additions & 60 deletions solidity/generate-artifact-exports.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion solidity/hardhat.config.cts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
currency: 'USD',
},
typechain: {
outDir: './core-utils/typechain',
outDir: './types',
target: 'ethers-v5',
alwaysGenerateOverloads: true,
node16Modules: true,
Expand Down
Loading

0 comments on commit fe11a7b

Please sign in to comment.