Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: zksync deploy branch #4761

Draft
wants to merge 151 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
91a2077
chore: add zksolc compiler for zksync
ljankovic-txfusion Sep 12, 2024
6fc9f02
update: make hardhat tests compatible with zksync
ljankovic-txfusion Sep 13, 2024
e5724aa
update: linking workspaces & contract compilation
ljankovic-txfusion Sep 16, 2024
0a692b3
chore: remove non-compatible zksync code from SDK
ljankovic-txfusion Sep 16, 2024
de77dba
feature: exporting zksync contract artifacts from core
ljankovic-txfusion Sep 17, 2024
1e1d748
feat: zksync deployer
ljankovic-txfusion Sep 18, 2024
2848efe
fix: artifacts compilation; add:typechain-types to .gitignore
ljankovic-txfusion Sep 18, 2024
79ceac4
update: wip deploying contracts via cli
ljankovic-txfusion Sep 18, 2024
04f390c
update: load artifacts from factory
ljankovic-txfusion Sep 18, 2024
e76bbf2
feat: cli bash script for automating core deployment
ljankovic-txfusion Sep 18, 2024
e1929f8
update: wip sdk hardhat test on zksync
ljankovic-txfusion Sep 19, 2024
8b2596a
update: wip making sdk tests compatible with zksync
ljankovic-txfusion Sep 19, 2024
e10d557
cleanup: minor test changes
ljankovic-txfusion Sep 19, 2024
e4cef73
cleanup: minor changes
ljankovic-txfusion Sep 19, 2024
2d2fb15
fix: should derive a token type from contract
ljankovic-txfusion Sep 19, 2024
a29df94
chore: refactoring multi provider
ljankovic-txfusion Sep 23, 2024
49c3812
feat: ProviderTypes for zksync
ljankovic-txfusion Sep 23, 2024
82e0938
refactor: deployment gasLimit for in memory node
ljankovic-txfusion Sep 23, 2024
53f8e61
feat: relaying messages locally
ljankovic-txfusion Sep 24, 2024
3022cd0
chore: remove gasLimit overrides for zksync
ljankovic-txfusion Sep 24, 2024
3e3637a
refactor: MultiProvider added defaultZKProviderBuilder in tryGetProvider
ljankovic-txfusion Sep 25, 2024
23f6e94
feat: singe cli/sdk to deploy to both evm and zkevm chains
ljankovic-txfusion Sep 27, 2024
733572a
feat: mutable storage multisig ISM
mortezashojaei Sep 30, 2024
629a4c8
fix: add missing addBufferToGasLimit function on utils
mortezashojaei Sep 30, 2024
2c0cb55
feat: compile contracts with solc & zksolc using single command
ljankovic-txfusion Sep 30, 2024
dcaecea
minor: cleanup
mortezashojaei Sep 30, 2024
36244c9
feature: support zksync protocol in addresses utils
mortezashojaei Sep 30, 2024
ecb3c49
minor: cleanup
mortezashojaei Sep 30, 2024
2b76f59
minot: revert back estimate handle in HyperlaneRelayer
mortezashojaei Sep 30, 2024
0ea4e51
feat: zksync support for TypedTransaction
ljankovic-txfusion Sep 30, 2024
74c3a67
Merge branch 'txfusion/sending-messages' of github.com:hyperlane-xyz/…
ljankovic-txfusion Sep 30, 2024
15de0ad
fix: prevent handle estimation on zksync protocol
mortezashojaei Sep 30, 2024
50903a6
feat: deploying StorageMerkleRootMultisigIsm
ljankovic-txfusion Oct 1, 2024
5e36ece
feat: deploying StorageMessageIdMultisigIsm
ljankovic-txfusion Oct 4, 2024
4273265
feat: refactor of contract deployment
ljankovic-txfusion Oct 4, 2024
d0fb3c8
chore: reverted & removed unused code
ljankovic-txfusion Oct 9, 2024
9bf46bc
chore: minor refactoring & adding types
ljankovic-txfusion Oct 9, 2024
8b5afe3
chore: minor changes & refactoring
ljankovic-txfusion Oct 9, 2024
0891c62
chore: minor refactoring
ljankovic-txfusion Oct 9, 2024
be23123
chore: minor cleanup
ljankovic-txfusion Oct 10, 2024
35260d6
minor refactor & cleanup
ljankovic-txfusion Oct 10, 2024
b8862ae
fix: yarn lock for cli e2e test
ljankovic-txfusion Oct 11, 2024
a432fbe
temp: testing verification
mortezashojaei Oct 8, 2024
b79b813
minor: revert contract verifier changes
mortezashojaei Oct 9, 2024
ccccce0
feat: zk verifier
mortezashojaei Oct 9, 2024
93af451
feat: verifying contract implementation on zksync explorer
ljankovic-txfusion Oct 10, 2024
6753e1f
fix: change the way load contract content
mortezashojaei Oct 10, 2024
4f39405
feat: verifying zksync contracts on block explorer
ljankovic-txfusion Oct 10, 2024
f44d3d3
minor: return verification id in zksync contract verification
mortezashojaei Oct 10, 2024
ac29b9d
feat: manage contract verification for both zksync and evm based chains
mortezashojaei Oct 11, 2024
b87cd54
minor: cleanup
mortezashojaei Oct 11, 2024
21add82
fix: support explorer just for etherum and zksync based chains
mortezashojaei Oct 11, 2024
1f0d464
minor: yarn lock
mortezashojaei Oct 11, 2024
9f98407
feat: handle verification on evm module deployer
mortezashojaei Oct 11, 2024
cb81ec7
feat: dynamic zksync artifact import
ljankovic-txfusion Oct 15, 2024
8383e95
chore: reverted/added comments
ljankovic-txfusion Oct 15, 2024
957375f
improvement: comments on zksync contract verifier
mortezashojaei Oct 15, 2024
eb79bea
fix: update hardat config type output directories
mortezashojaei Oct 15, 2024
cff1960
fix: update chain technical stack with latest values
mortezashojaei Oct 15, 2024
075f699
Merge remote-tracking branch 'origin/txfusion/sending-messages' into …
mortezashojaei Oct 15, 2024
dedaa34
merge with main repo latest changes
mortezashojaei Oct 16, 2024
52b221d
merge: latest main changes
mortezashojaei Oct 16, 2024
1c591a1
minor: yarn fix
mortezashojaei Oct 16, 2024
317f6d7
fix: add zksync address on explorer health test
mortezashojaei Oct 16, 2024
2f4cc62
naming: core/artifacts to core/zksync-artifacts
ljankovic-txfusion Oct 16, 2024
dec3ef4
feat: blacklist static contracts from being deployed on zksync on `hy…
ljankovic-txfusion Oct 18, 2024
8cc652d
test: e2e on zksync for warp read & apply
ljankovic-txfusion Oct 18, 2024
29205fb
feat: migrating from ProtocolType to chain technical stack for zksync
ljankovic-txfusion Oct 21, 2024
fbc7c31
feat: checking core config for Aggregation ISM on zksync core deployment
ljankovic-txfusion Oct 22, 2024
4f541e3
Merge remote-tracking branch 'origin-root/main'
mortezashojaei Oct 22, 2024
48c9b8c
merge: latest changes from root repo main
mortezashojaei Oct 22, 2024
570084a
minor: cleanup
mortezashojaei Oct 22, 2024
014e959
chore: reverting from workspace to npm versioning in package.json
ljankovic-txfusion Oct 22, 2024
c459f50
minor: cleanup
mortezashojaei Oct 22, 2024
59bff45
fix: PackageVersioned import in Mailbox.sol
ljankovic-txfusion Oct 23, 2024
ff269bd
configure
paulbalaji Oct 23, 2024
c6d3927
patches
paulbalaji Oct 23, 2024
26d198a
infra fixes
paulbalaji Oct 23, 2024
deac2fa
nice to haves
paulbalaji Oct 23, 2024
f21c18d
use fallback routing on zksync
paulbalaji Oct 23, 2024
8edb127
verification artifacts
paulbalaji Oct 23, 2024
7c90eab
zksync config
paulbalaji Oct 24, 2024
17b048e
more fixes
paulbalaji Oct 24, 2024
abd8a77
core deploy
paulbalaji Oct 24, 2024
057bee3
backport evm filtering fix
paulbalaji Oct 25, 2024
13cd945
merge latest hl main
paulbalaji Oct 25, 2024
8a5b966
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Oct 25, 2024
047d143
copy config after deploying to apechain arbitrumnova b3 fantom gravit…
paulbalaji Oct 25, 2024
ce4cf4c
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Oct 29, 2024
51987ea
fix lint
paulbalaji Oct 29, 2024
4518986
try fix slither
paulbalaji Oct 29, 2024
2a144aa
try fix yarn test + cli e2e tests
paulbalaji Oct 29, 2024
b9d0c22
fix sol tests
paulbalaji Oct 29, 2024
9f1127b
skip zksync e2e until we setup era_test_node
paulbalaji Oct 29, 2024
5c38d12
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Oct 30, 2024
f074691
copy over latest enrollment config changes
paulbalaji Oct 30, 2024
1a5aae1
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 6, 2024
464beec
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 6, 2024
9495645
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 6, 2024
0353c4f
fix strategy yaml
paulbalaji Nov 6, 2024
bee8254
try to update in-place on zksync to minimise recreation of storage ag…
paulbalaji Nov 7, 2024
94689c1
copy config updates
paulbalaji Nov 7, 2024
cb88e2e
fix testnet config generation
paulbalaji Nov 7, 2024
0287f49
fix + deploy
paulbalaji Nov 7, 2024
8631e01
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 8, 2024
2279b18
copy config from #4841
paulbalaji Nov 8, 2024
d93f011
don't skip zksync/zeronetwork on this branch
paulbalaji Nov 8, 2024
de1f4ba
copy CR tkporter from #4841
paulbalaji Nov 8, 2024
437af04
update owners.ts
paulbalaji Nov 8, 2024
c3afe47
Merge remote-tracking branch 'origin/main' into pb/zksync
paulbalaji Nov 18, 2024
6b649e3
feat: Add support for ZK storage aggregation in the schema and artifa…
ltyu Nov 21, 2024
824da54
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 21, 2024
37da4b6
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 25, 2024
fd43304
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Nov 26, 2024
b0c5022
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 2, 2024
40854be
fix prettier
paulbalaji Dec 2, 2024
5473002
fix prettier
paulbalaji Dec 2, 2024
dad2d8f
copy over config changes from dec2-enrollments
paulbalaji Dec 2, 2024
25f9614
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 4, 2024
29cbd50
infer manual submission for zksync if submitter is not signer
paulbalaji Dec 4, 2024
2de4a49
copy across zklink/treasure config
paulbalaji Dec 4, 2024
68b58c5
zklink deploy artifact
paulbalaji Dec 5, 2024
230fe45
copy across appchain config
paulbalaji Dec 5, 2024
f50993b
treasure verification
paulbalaji Dec 5, 2024
36dc030
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 5, 2024
2d19ebd
update .registryrc + agent config
paulbalaji Dec 5, 2024
b1fad56
update .registryrc + agent config
paulbalaji Dec 5, 2024
93f8ab8
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 9, 2024
b64b4e9
copy over config from pb/dec9
paulbalaji Dec 11, 2024
03deb73
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 11, 2024
4d17586
post-merge fixes
paulbalaji Dec 11, 2024
c0b5b25
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 13, 2024
fc1585c
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 18, 2024
dc5bf76
copy config updates from dec18 enrollments
paulbalaji Dec 18, 2024
a2df21c
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Dec 18, 2024
e8633ff
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 7, 2025
0327aef
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 13, 2025
da70831
fix
paulbalaji Jan 13, 2025
9895cdc
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 13, 2025
65f5fb0
copy changes from pb/enroll-jan13
paulbalaji Jan 13, 2025
834c73b
syncpack fix
paulbalaji Jan 13, 2025
10444e2
update yarn lock
paulbalaji Jan 13, 2025
c1d6b9a
testnet igp update
paulbalaji Jan 17, 2025
807bd19
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 20, 2025
1e0f44f
feat: modify gas oracle TS tooling to be friendly for all protocol ty…
tkporter Jan 21, 2025
2bca374
jan23 config
paulbalaji Jan 23, 2025
8dbf7a3
deploy to abstract
paulbalaji Jan 23, 2025
0bba7b2
prettier
paulbalaji Jan 27, 2025
a05e084
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 27, 2025
a8c872b
make build work by deleting cli tests just for this branch
paulbalaji Jan 27, 2025
c513d36
Merge remote-tracking branch 'hl/main' into pb/zksync
paulbalaji Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint-staged": "^12.4.3",
"prettier": "^2.8.8",
"syncpack": "^13.0.0",
"tsx": "^4.19.1"
"tsx": "^4.19.1",
"zksync-ethers": "^5.10.0"
},
"dependencies": {
"@changesets/cli": "^2.26.2"
Expand Down
12 changes: 11 additions & 1 deletion solidity/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
cache/
artifacts/
.artifacts/
types/
dist/
coverage/
Expand All @@ -15,3 +15,13 @@ docs
flattened/
buildArtifact.json
fixtures/


# zksync artifacts
artifacts-zk
cache-zk

core-utils/zksync/artifacts/output

.zksolc-libraries-cache/
typechain-types/
Empty file.
102 changes: 102 additions & 0 deletions solidity/core-utils/zksync/artifacts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import { readdirSync } 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; // Key is the artifact name, value is the ZkSyncArtifact
};

// Get the resolved path to the current file
const currentFilePath = fileURLToPath(import.meta.url); // Convert the module URL to a file path
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 '.js'.
*/
const getArtifactFiles = (directory: string): string[] => {
return readdirSync(directory).filter((file) => file.endsWith('.js')); // Filter for .js files
};

/**
* @dev Exports the list of artifact names without the .js extension.
* @return An array of artifact names without the .js extension.
*/
export const zksyncArtifactNames = getArtifactFiles(
join(currentDirectory, 'output'),
).map((file) => file.replace('.js', ''));

/**
* @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 const artifactExists = (name: string): boolean => {
return zksyncArtifactNames.includes(`${name}.js`); // Check if the artifact file exists
};

/**
* @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.
*/
const loadZkArtifact = async (
name: string,
): Promise<ZkSyncArtifact | undefined> => {
try {
const artifactModule = await import(
join(currentDirectory, 'output', `${name}.js`)
); // Dynamically import the artifact module
return artifactModule[name]; // Return the artifact from the artifactModule
} 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 const loadAllZkArtifacts = async (): Promise<ArtifactMap> => {
const zkSyncArtifactMap: ArtifactMap = {};

// Load all artifacts concurrently
const loadPromises = zksyncArtifactNames.map(async (artifactFileName) => {
const artifact = await loadZkArtifact(artifactFileName);
if (artifact) {
zkSyncArtifactMap[artifactFileName] = artifact;
}
});

await Promise.all(loadPromises);

return zkSyncArtifactMap; // Return the populated artifact map
};

/**
* @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 const getZkArtifactByName = async (
name: string,
): Promise<ZkSyncArtifact | undefined> => {
return loadZkArtifact(name);
};
45 changes: 41 additions & 4 deletions solidity/exportBuildArtifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ cd "$(dirname "$0")"
# Define the artifacts directory
artifactsDir="./artifacts/build-info"
# Define the output file
outputFileJson="./dist/buildArtifact.json"
outputFileJs="./dist/buildArtifact.js"
outputFileTsd="./dist/buildArtifact.d.ts"
outputFileJson="./dist/evm/buildArtifact.json"
outputFileJs="./dist/evm/buildArtifact.js"
outputFileTsd="./dist/evm/buildArtifact.d.ts"

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

# Find most recently modified JSON build artifact
if [ "$(uname)" = "Darwin" ]; then
Expand All @@ -37,3 +37,40 @@ else
echo 'Failed to process build artifact with jq'
exit 1
fi

# ZKSYNC

# 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 hardhat build ZKSync 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 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 build artifact.'
else
echo 'Failed to process build artifact with jq'
exit 1
fi
56 changes: 56 additions & 0 deletions solidity/generate-artifact-exports.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
import { basename, dirname, join } from 'path';
import { glob } from 'typechain';
import { fileURLToPath } from 'url';

const cwd = process.cwd();

const zksyncArtifacts = glob(cwd, [
`!./artifacts-zk/!(build-info)/**/*.dbg.json`,
`./artifacts-zk/!(build-info)/**/+([a-zA-Z0-9_]).json`,
]);

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

// Directory to store individual artifact files
const srcOutputDir = join(__dirname, 'core-utils/zksync/artifacts/output');

// Ensure the output directory exists
if (!existsSync(srcOutputDir)) {
mkdirSync(srcOutputDir, { recursive: true });
}

const zkSyncFileNames = new Set();
let zkSyncArtifactMap = {};

// Process each artifact file
zksyncArtifacts.forEach((file) => {
const fileContent = readFileSync(file, 'utf-8');
const jsonObject = JSON.parse(fileContent);
const contractName = jsonObject.contractName;
let fileName = `${basename(file, '.json')}`;

if (zkSyncFileNames.has(fileName)) {
return;
}
zkSyncFileNames.add(fileName);

// Add to artifact map
zkSyncArtifactMap[contractName] = fileName;

// Create a TypeScript object export statement
const fileContentEx = `export const ${fileName} = ${JSON.stringify(
jsonObject,
null,
2,
)} as const;`;

// Write individual file
const outputFile = join(srcOutputDir, `${fileName}.ts`);
writeFileSync(outputFile, fileContentEx);
});

console.log(
`Generated ${zksyncArtifacts.length} individual TypeScript files in ${srcOutputDir}`,
);
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: './types',
outDir: './core-utils/evm/types',
target: 'ethers-v5',
alwaysGenerateOverloads: true,
node16Modules: true,
Expand Down
28 changes: 18 additions & 10 deletions solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"@layerzerolabs/lz-evm-oapp-v2": "2.0.2",
"@openzeppelin/contracts": "^4.9.3",
"@openzeppelin/contracts-upgradeable": "^4.9.3",
"fx-portal": "^1.0.3"
"fx-portal": "^1.0.3",
"zksync-ethers": "^5.10.0"
},
"devDependencies": {
"@layerzerolabs/solidity-examples": "^1.1.0",
"@matterlabs/hardhat-zksync-deploy": "^0.7.0",
"@matterlabs/hardhat-zksync-solc": "^1.2.4",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@typechain/ethers-v5": "^11.1.2",
Expand Down Expand Up @@ -42,16 +45,20 @@
},
"type": "module",
"exports": {
".": "./dist/index.js",
"./mailbox": "./dist/contracts/Mailbox.js",
"./buildArtifact.js": "./dist/buildArtifact.js",
"./buildArtifact.json": "./dist/buildArtifact.json",
"./contracts": "./contracts"
".": "./dist/evm/types/index.js",
"./mailbox": "./dist/evm/types/contracts/Mailbox.js",
"./buildArtifact.js": "./dist/evm/buildArtifact.js",
"./buildArtifact-zksync.js": "./dist/zksync/buildArtifact.js",
"./buildArtifact.json": "./dist/evm/buildArtifact.json",
"./contracts": "./contracts",
"./zksync-artifacts": "./dist/zksync/artifacts/index.js",
"./zksync-artifacts/*": "./dist/zksync/artifacts/*.js"
},
"types": "./dist/index.d.ts",
"types": "./dist/evm/types/index.d.ts",
"files": [
"/dist",
"/contracts"
"/contracts",
"/dist/zksync/artifacts"
],
"engines": {
"node": ">=16"
Expand All @@ -64,13 +71,14 @@
],
"license": "Apache-2.0",
"scripts": {
"build": "yarn version:update && yarn hardhat-esm compile && tsc && ./exportBuildArtifact.sh",
"build": "yarn version:update && yarn hardhat-esm compile && yarn hardhat-zk compile && ts-node generate-artifact-exports.mjs && tsc && ./exportBuildArtifact.sh",
"lint": "solhint contracts/**/*.sol",
"clean": "yarn hardhat-esm clean && rm -rf ./dist ./cache ./types ./coverage ./out ./forge-cache ./fixtures",
"clean": "yarn hardhat-esm clean && yarn hardhat-zk clean && rm -rf ./dist ./cache ./cache-zk ./types ./coverage ./out ./forge-cache ./fixtures",
"coverage": "yarn fixtures && ./coverage.sh",
"docs": "forge doc",
"fixtures": "mkdir -p ./fixtures/aggregation ./fixtures/multisig",
"hardhat-esm": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only --no-warnings=ExperimentalWarning' hardhat --config hardhat.config.cts",
"hardhat-zk": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only --no-warnings=ExperimentalWarning' hardhat --config zk-hardhat.config.cts",
"prettier": "prettier --write ./contracts ./test",
"test": "yarn version:exhaustive && yarn hardhat-esm test && yarn test:forge",
"test:hardhat": "yarn hardhat-esm test",
Expand Down
4 changes: 2 additions & 2 deletions solidity/test/lib/mailboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
LegacyMultisigIsm,
TestMailbox,
TestMerkleTreeHook,
} from '../../types';
import { DispatchEvent } from '../../types/contracts/Mailbox';
} from '../../dist/evm/types';
import { DispatchEvent } from '../../dist/evm/types/contracts/Mailbox';

export type MessageAndProof = {
proof: MerkleProof;
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/merkle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'chai';
import { utils } from 'ethers';

import merkleTestCases from '../../vectors/merkle.json' assert { type: 'json' };
import { TestMerkle, TestMerkle__factory } from '../types';
import { TestMerkle, TestMerkle__factory } from '../dist/evm/types';

import { getSigner } from './signer';

Expand Down
6 changes: 5 additions & 1 deletion solidity/test/message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import {
} from '@hyperlane-xyz/utils';

import testCases from '../../vectors/message.json' assert { type: 'json' };
import { Mailbox__factory, TestMessage, TestMessage__factory } from '../types';
import {
Mailbox__factory,
TestMessage,
TestMessage__factory,
} from '../dist/evm/types';

import { getSigner, getSigners } from './signer';

Expand Down
5 changes: 4 additions & 1 deletion solidity/test/mockMailbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { utils } from 'ethers';

import { addressToBytes32 } from '@hyperlane-xyz/utils';

import { MockMailbox__factory, TestRecipient__factory } from '../types';
import {
MockMailbox__factory,
TestRecipient__factory,
} from '../dist/evm/types';

import { getSigner } from './signer';

Expand Down
2 changes: 1 addition & 1 deletion solidity/test/testrecipient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { utils } from 'ethers';

import { addressToBytes32 } from '@hyperlane-xyz/utils';

import { TestRecipient, TestRecipient__factory } from '../types';
import { TestRecipient, TestRecipient__factory } from '../dist/evm/types';

import { getSigner } from './signer';

Expand Down
4 changes: 2 additions & 2 deletions solidity/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./types"
"rootDir": "./core-utils"
},
"exclude": ["./test", "hardhat.config.cts", "./dist"]
"exclude": ["./test", "hardhat.config.cts", "zk-hardhat.config.cts", "./dist"]
}
Loading
Loading