Skip to content

Commit

Permalink
add deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Mar 10, 2023
1 parent 5ec1f25 commit f559eff
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 12 deletions.
7 changes: 7 additions & 0 deletions contracts/ZkSync_SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ contract ZkSync_SpokePool is SpokePool {
int64 relayerFeePct,
uint32 depositId,
uint32 rootBundleId,
bytes memory message,
int256 payoutAdjustment,
bytes32[] memory proof
) public override(SpokePool) nonReentrant {
Expand All @@ -109,6 +110,7 @@ contract ZkSync_SpokePool is SpokePool {
relayerFeePct,
depositId,
rootBundleId,
message,
payoutAdjustment,
proof
);
Expand All @@ -129,6 +131,11 @@ contract ZkSync_SpokePool is SpokePool {
_executeRelayerRefundLeaf(rootBundleId, relayerRefundLeaf, proof);
}

// function _verifyDepositorSignature() {
// // We may need to override the signature recovery logic for ZkSync but I think it supports EIP1271:
// // https://era.zksync.io/docs/dev/developer-guides/aa.html#example-of-using-the-library
// }

/**************************************
* INTERNAL FUNCTIONS *
**************************************/
Expand Down
1 change: 0 additions & 1 deletion deployments/deployments.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"1": {
"AcrossConfigStore": { "address": "0x3B03509645713718B78951126E0A6de6f10043f5", "blockNumber": 14717196 },
"AcrossMerkleDistributor": { "address": "0xE50b2cEAC4f60E840Ae513924033E753e2366487", "blockNumber": 15976846 },
"Arbitrum_Adapter": { "address": "0x29528780E29abb8Af95a5e5a125b94766987543F", "blockNumber": 16243583 },
"Arbitrum_RescueAdapter": { "address": "0xC6fA0a4EBd802c01157d6E7fB1bbd2ae196ae375", "blockNumber": 16233939 },
"Arbitrum_SendTokensAdapter": { "address": "0xC06A68DF12376271817FcEBfb45Be996B0e1593E", "blockNumber": 16691987 },
Expand Down
15 changes: 11 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { getNodeUrl, getMnemonic } from "@uma/common";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-toolbox";
import "@matterlabs/hardhat-zksync-verify";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "hardhat-deploy";
Expand All @@ -22,8 +23,9 @@ dotenv.config();
// TODO: Figure out way to only compile specific contracts intended to be deployed on ZkSync (e.g. ZkSync_SpokePool) if
// the following config is true.
const compileZk = process.env.COMPILE_ZK === "true";

const solcVersion = "0.8.18";
const zkSyncSolcVersion = "0.8.16";
// TODO: Figure out better solution for this but if using zksync-solc, only supports up to 0.8.16
const solcVersion = compileZk ? zkSyncSolcVersion : "0.8.18";
const mnemonic = getMnemonic();

// Compilation settings are overridden for large contracts to allow them to compile without going over the bytecode
Expand All @@ -37,6 +39,10 @@ const config: HardhatUserConfig = {
solidity: {
compilers: [{ version: solcVersion, settings: { optimizer: { enabled: true, runs: 1000000 }, viaIR: true } }],
overrides: {
"contracts/ZkSync_SpokePool.sol": {
version: zkSyncSolcVersion,
settings: { optimizer: { enabled: true, runs: 1000000 }, viaIR: true },
},
"contracts/HubPool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Boba_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Optimism_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
Expand All @@ -46,7 +52,6 @@ const config: HardhatUserConfig = {
zksolc: {
version: "1.3.1",
compilerSource: "binary",
settings: {},
},
networks: {
hardhat: { accounts: { accountsBalance: "1000000000000000000000000" }, zksync: compileZk },
Expand All @@ -63,6 +68,8 @@ const config: HardhatUserConfig = {
accounts: { mnemonic },
companionNetworks: { l1: "goerli" },
zksync: true,
// Verification endpoint for Goerli
verifyURL: "https://zksync2-testnet-explorer.zksync.dev/contract_verification",
},
kovan: {
url: getNodeUrl("kovan", true, 42),
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
"arb-bridge-peripherals": "^1.0.5"
},
"devDependencies": {
"@matterlabs/hardhat-zksync-chai-matchers": "^0.1.1",
"@matterlabs/hardhat-zksync-deploy": "^0.6.2",
"@matterlabs/hardhat-zksync-solc": "^0.3.14",
"@matterlabs/zksync-contracts": "^0.5.2",
"@matterlabs/hardhat-zksync-toolbox": "^0.1.1",
"@matterlabs/hardhat-zksync-verify": "^0.1.3",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@nomiclabs/hardhat-etherscan": "^3.0.3",
"@nomiclabs/hardhat-waffle": "^2.0.3",
Expand Down Expand Up @@ -79,7 +83,8 @@
"solidity-coverage": "^0.7.16",
"ts-node": "^10.1.0",
"typechain": "^5.1.2",
"typescript": "^4.5.2"
"typescript": "^4.5.2",
"zksync-web3": "^0.13.4"
},
"husky": {
"hooks": {
Expand Down
93 changes: 88 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,19 @@
dependencies:
"@openzeppelin/contracts" "^4.2.0"

"@matterlabs/hardhat-zksync-solc@^0.3.14":
"@matterlabs/hardhat-zksync-chai-matchers@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-chai-matchers/-/hardhat-zksync-chai-matchers-0.1.1.tgz#ddacc697dcf22e30543b5ddcb3254fd0d1d90a88"
integrity sha512-ZyeeyXRzNkiudYADSNov/9+jjf82Y4PZln8NhpLM/3huj7rzfnTU2j8TsF6aW84fnq5GLFytii7kf/PUpJINDA==

"@matterlabs/hardhat-zksync-deploy@^0.6.2":
version "0.6.2"
resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.6.2.tgz#077beeaadc28af5afc469c0a94f394bbc9d96ad4"
integrity sha512-TRGbYXqFdLspaGRjNRWFcej0i8+OgYodDPFVRMg/3KJvC0QLViEEcBZ2cpBqC/R5fydsIql5KXe8ZVMz22AeqA==
dependencies:
chalk "4.1.2"

"@matterlabs/[email protected]", "@matterlabs/hardhat-zksync-solc@^0.3.14":
version "0.3.14"
resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-solc/-/hardhat-zksync-solc-0.3.14.tgz#0a32f01b4cd8631ecd8dfe0547e3ac49ab8290d5"
integrity sha512-iKuQ+vvnpv3K2lkFO41xpJcNWH0KHJ/5JbOboTlPZATVR7F3GJeHfJL+GG4wkxKXnxZczpxyQqC4rAfMKvRaDg==
Expand All @@ -1928,10 +1940,20 @@
chalk "4.1.2"
dockerode "^3.3.4"

"@matterlabs/zksync-contracts@^0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@matterlabs/zksync-contracts/-/zksync-contracts-0.5.2.tgz#1488c967f1d60ad9f00121a70d89a79f9a18dc01"
integrity sha512-4hLKAsCGlTa/vC0u/j0rgX2TT5OV8cALNcxG5ismi2TqoTvx7I0kQUPEPl/AZshTb652Y0SMKJc6ayLJgolr1g==
"@matterlabs/hardhat-zksync-toolbox@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-toolbox/-/hardhat-zksync-toolbox-0.1.1.tgz#723f20111035f031627bff01482cb3bf9eaee7f8"
integrity sha512-722AIJqLUsTJ7rKca4TbdYlLvRMKh4Ql3TKfLe5vh/kDrGUs5FfPH3+KgBs24hbwijMEcDKT5eL1taIIcRkRmQ==

"@matterlabs/hardhat-zksync-verify@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@matterlabs/hardhat-zksync-verify/-/hardhat-zksync-verify-0.1.3.tgz#81a349c36b5d8c36e0144690b61a6c417db3ce26"
integrity sha512-gZhJmsC529HaLiJ42qSfvT+lYpStqj9IsiEzkI/jxyKHH8FVQz5Uu1wWMeWIRd3Q4GkF0arIYIJWf14oO5AhqA==
dependencies:
"@matterlabs/hardhat-zksync-solc" "0.3.14"
axios "^1.3.4"
chalk "4.1.2"
dockerode "^3.3.4"

"@metamask/eth-sig-util@^4.0.0":
version "4.0.0"
Expand Down Expand Up @@ -2107,6 +2129,17 @@
mcl-wasm "^0.7.1"
rustbn.js "~0.2.0"

"@nomicfoundation/hardhat-chai-matchers@^1.0.6":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc"
integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@types/chai-as-promised" "^7.1.3"
chai-as-promised "^7.1.1"
deep-eql "^4.0.1"
ordinal "^1.0.3"

"@nomicfoundation/[email protected]":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.0.tgz#83a7367342bd053a76d04bbcf4f373fef07cf760"
Expand Down Expand Up @@ -2998,6 +3031,13 @@
dependencies:
"@types/node" "*"

"@types/chai-as-promised@^7.1.3":
version "7.1.5"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255"
integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==
dependencies:
"@types/chai" "*"

"@types/chai@*", "@types/chai@^4.2.0", "@types/chai@^4.2.21":
version "4.3.0"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.0.tgz#23509ebc1fa32f1b4d50d6a66c4032d5b8eaabdc"
Expand Down Expand Up @@ -4089,6 +4129,15 @@ axios@^0.21.1:
dependencies:
follow-redirects "^1.14.0"

axios@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024"
integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
Expand Down Expand Up @@ -5229,6 +5278,13 @@ cbor@^8.0.0:
dependencies:
nofilter "^3.1.0"

chai-as-promised@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0"
integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==
dependencies:
check-error "^1.0.2"

chai@^4.2.0, chai@^4.3.4:
version "4.3.6"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c"
Expand Down Expand Up @@ -6028,6 +6084,13 @@ deep-eql@^3.0.1:
dependencies:
type-detect "^4.0.0"

deep-eql@^4.0.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d"
integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==
dependencies:
type-detect "^4.0.0"

deep-equal@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
Expand Down Expand Up @@ -8069,6 +8132,11 @@ follow-redirects@^1.12.1, follow-redirects@^1.14.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==

follow-redirects@^1.15.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==

for-each@^0.3.3, for-each@~0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
Expand Down Expand Up @@ -11640,6 +11708,11 @@ optionator@^0.9.1:
type-check "^0.4.0"
word-wrap "^1.2.3"

ordinal@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d"
integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==

os-homedir@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
Expand Down Expand Up @@ -12267,6 +12340,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
Expand Down Expand Up @@ -16388,6 +16466,11 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

zksync-web3@^0.13.4:
version "0.13.4"
resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.13.4.tgz#1c5b1303436cb4cba1a0873ea07860b19f385331"
integrity sha512-AjCKhn9TRqsk2T9VLKxlod22rnVWOWGOjq+QXppFe2yTxZx9dVaai325OJ0aa7a3m5wx+9yhPqBu23jG2xPo5Q==

zksync-web3@^0.7.8:
version "0.7.11"
resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.7.11.tgz#1d829eda9b220b94a3d7e3ab29a2b37ab789a276"
Expand Down

0 comments on commit f559eff

Please sign in to comment.