-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix conflicts by resolving Registry to 7.1.0
- Loading branch information
Showing
88 changed files
with
3,270 additions
and
700 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
80023dd9e9fadd4aa9fd868b5e7ad76dc3082494 | ||
2b3f78f7692b6b62e0f85023a29ecc2b2ab85008 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
rust/sealevel/environments/mainnet3/warp-routes/TONY-base-solanamainnet/program-ids.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"base": { | ||
"hex": "0x00000000000000000000000054624ca8abea68645b3b39211f90b804d53db680", | ||
"base58": "1111111111112BBkkpUZNJgdH8DEmyDxFt74d4bH" | ||
"hex": "0x000000000000000000000000cc9ece816641c8350db06af375811107b1aa0b9d", | ||
"base58": "1111111111113rLmoQoXh3C1oA8mu6848RKQbnN8" | ||
}, | ||
"solanamainnet": { | ||
"hex": "0x2efbd8ff6417a50dbcedc18bab4235d4a2aac61af89214ac59545d30e0f86991", | ||
"base58": "4AQVPTCAeLswnjksQdutxUDuxEJxUBwoWmVimGuPtGSt" | ||
"hex": "0xd87c4b79368eea606390118e5e9bfdb4f720d214f8d2fc45745d00e31562f6ed", | ||
"base58": "Fa4zQJCH7id5KL1eFJt2mHyFpUNfCCSkHgtMrLvrRJBN" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './typechain/index.js'; | ||
export * from './zksync/index.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const buildArtifact: any = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import { promises as fsPromises } from 'fs'; | ||
import path, { join } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
/** | ||
* @dev Represents a ZkSync artifact. | ||
*/ | ||
export type ZKSyncArtifact = { | ||
contractName: string; | ||
sourceName: string; | ||
abi: any; | ||
bytecode: string; | ||
deployedBytecode: string; | ||
factoryDeps?: Record<string, string>; | ||
}; | ||
|
||
/** | ||
* @dev A mapping of artifact names to their corresponding ZkSync artifacts. | ||
*/ | ||
export type ArtifactMap = { | ||
[key: string]: ZKSyncArtifact; | ||
}; | ||
|
||
// Get the resolved path to the current file | ||
const currentFilePath = fileURLToPath(import.meta.url); | ||
const currentDirectory = path.dirname(currentFilePath); | ||
|
||
/** | ||
* @dev Reads artifact files from the specified directory. | ||
* @param directory The directory to read artifact files from. | ||
* @return An array of artifact file names that end with '.json'. | ||
*/ | ||
async function getArtifactFiles(directory: string): Promise<string[]> { | ||
return fsPromises | ||
.readdir(directory) | ||
.then((files) => files.filter((file) => file.endsWith('.json'))); | ||
} | ||
|
||
/** | ||
* @dev Exports the list of artifact names without the .json extension. | ||
* @return An array of artifact names without the .json extension. | ||
*/ | ||
export async function getZKSyncArtifactNames(): Promise<string[]> { | ||
return getArtifactFiles(join(currentDirectory, 'artifacts')).then((files) => | ||
files.map((file) => file.replace('.json', '')), | ||
); | ||
} | ||
|
||
/** | ||
* @dev Checks if a ZkSync artifact exists by its name. | ||
* @param name The name of the artifact to check. | ||
* @return True if the artifact exists, false otherwise. | ||
*/ | ||
export async function artifactExists(name: string): Promise<boolean> { | ||
const artifactNames = await getZKSyncArtifactNames(); | ||
return artifactNames.includes(name); | ||
} | ||
|
||
/** | ||
* @dev Loads a ZkSync artifact by its name. | ||
* @param name The name of the artifact to load. | ||
* @return The loaded ZKSyncArtifact or undefined if it cannot be loaded. | ||
*/ | ||
export async function loadZKSyncArtifact( | ||
name: string, | ||
): Promise<ZKSyncArtifact | undefined> { | ||
try { | ||
const artifactPath = join(currentDirectory, 'artifacts', `${name}.json`); | ||
const artifactContent = await fsPromises.readFile(artifactPath, 'utf-8'); | ||
return JSON.parse(artifactContent); | ||
} catch (error) { | ||
console.error(`Error loading artifact: ${name}`, error); | ||
return undefined; | ||
} | ||
} | ||
|
||
/** | ||
* @dev Loads all ZkSync artifacts into a map. | ||
* @return A map of artifact names to their corresponding ZkSync artifacts. | ||
*/ | ||
export async function loadAllZKSyncArtifacts(): Promise<ArtifactMap> { | ||
const zkSyncArtifactMap: ArtifactMap = {}; | ||
const zksyncArtifactNames = await getZKSyncArtifactNames(); | ||
for (const artifactName of zksyncArtifactNames) { | ||
const artifact = await loadZKSyncArtifact(artifactName); | ||
if (artifact) { | ||
zkSyncArtifactMap[artifactName] = artifact; | ||
} | ||
} | ||
|
||
return zkSyncArtifactMap; | ||
} | ||
|
||
/** | ||
* @dev Retrieves a specific ZkSync artifact by its file name. | ||
* @param name The name of the artifact to retrieve. | ||
* @return The loaded ZkSyncArtifact or undefined if it cannot be loaded. | ||
*/ | ||
export async function getZKSyncArtifactByName( | ||
name: string, | ||
): Promise<ZKSyncArtifact | undefined> { | ||
return loadZKSyncArtifact(name); | ||
} |
Oops, something went wrong.