This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
5,289 additions
and
4,299 deletions.
There are no files selected for viewing
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,6 +1,11 @@ | ||
{ | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"root": true | ||
} | ||
"extends": ["@matterlabs/eslint-config-typescript"], | ||
"rules": { | ||
"no-multiple-empty-lines": ["error", { "max": 1 }], | ||
"@typescript-eslint/no-namespace": "off", | ||
"import/no-named-as-default-member": "off", | ||
"import/namespace": "off", | ||
"import/no-unresolved": "off", | ||
"import/order": "off" | ||
} | ||
} |
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,16 @@ | ||
#!/bin/sh | ||
|
||
CYAN='\033[0;36m' | ||
NC='\033[0m' # No Color | ||
RED='\033[0;31m' | ||
|
||
# Check that the code is formatted in the given directory provided in the first argument | ||
function check_prettier { | ||
if ! yarn prettier:check; then | ||
echo "${RED}Commit error! Cannot commit unformatted code!${NC}" | ||
echo "Prettier errors found. Please format the code via ${CYAN}yarn prettier:fix${NC}!" | ||
exit 1 | ||
fi | ||
} | ||
|
||
check_prettier |
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,16 @@ | ||
#!/bin/sh | ||
|
||
CYAN='\033[0;36m' | ||
NC='\033[0m' # No Color | ||
RED='\033[0;31m' | ||
|
||
# Checking that the code is linted and formatted in the given directory provided in the first argument | ||
function check_lint { | ||
if ! yarn lint:check; then | ||
echo "${RED}Push error! Cannot push unlinted code!${NC}" | ||
echo "Lint errors found. Please lint the code via ${CYAN}yarn lint:fix${NC} and/or fix the errors manually!" | ||
exit 1 | ||
fi | ||
} | ||
|
||
check_lint |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
...require("@matterlabs/prettier-config"), | ||
plugins: ["prettier-plugin-solidity"], | ||
overrides: [ | ||
{ | ||
files: "*.sol", | ||
options: { | ||
bracketSpacing: false, | ||
printWidth: 120, | ||
singleQuote: false, | ||
tabWidth: 4, | ||
useTabs: false, | ||
}, | ||
}, | ||
], | ||
}; |
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,51 +1,44 @@ | ||
import '@matterlabs/hardhat-zksync-chai-matchers'; | ||
import '@matterlabs/hardhat-zksync-solc'; | ||
import '@nomiclabs/hardhat-ethers'; | ||
import '@nomiclabs/hardhat-solpp'; | ||
import '@typechain/hardhat'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const systemConfig = require('./SystemConfig.json'); | ||
import "@matterlabs/hardhat-zksync-chai-matchers"; | ||
import "@matterlabs/hardhat-zksync-solc"; | ||
import "@nomiclabs/hardhat-ethers"; | ||
import "@nomiclabs/hardhat-solpp"; | ||
import "@typechain/hardhat"; | ||
|
||
export default { | ||
zksolc: { | ||
version: '1.3.14', | ||
compilerSource: 'binary', | ||
settings: { | ||
isSystem: true | ||
} | ||
zksolc: { | ||
version: "1.3.14", | ||
compilerSource: "binary", | ||
settings: { | ||
isSystem: true, | ||
}, | ||
zkSyncDeploy: { | ||
zkSyncNetwork: 'http://localhost:3050', | ||
ethNetwork: 'http://localhost:8545' | ||
}, | ||
zkSyncDeploy: { | ||
zkSyncNetwork: "http://localhost:3050", | ||
ethNetwork: "http://localhost:8545", | ||
}, | ||
solidity: { | ||
version: "0.8.17", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200, | ||
}, | ||
viaIR: true, | ||
}, | ||
solidity: { | ||
version: '0.8.20', | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200 | ||
}, | ||
viaIR: true | ||
} | ||
version: "0.8.20", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 200, | ||
}, | ||
viaIR: true, | ||
}, | ||
}, | ||
solpp: { | ||
defs: (() => { | ||
return { | ||
ECRECOVER_COST_GAS: systemConfig.ECRECOVER_COST_GAS, | ||
KECCAK_ROUND_COST_GAS: systemConfig.KECCAK_ROUND_COST_GAS, | ||
SHA256_ROUND_COST_GAS: systemConfig.SHA256_ROUND_COST_GAS | ||
}; | ||
})() | ||
zkSyncTestNode: { | ||
url: "http://127.0.0.1:8011", | ||
ethNetwork: "", | ||
zksync: true, | ||
}, | ||
networks: { | ||
hardhat: { | ||
zksync: true | ||
}, | ||
zkSyncTestNode: { | ||
url: 'http://127.0.0.1:8011', | ||
ethNetwork: '', | ||
zksync: true | ||
} | ||
} | ||
}, | ||
}; |
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
Oops, something went wrong.