-
Notifications
You must be signed in to change notification settings - Fork 55
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
refactor: rename src to contracts #314
Changes from 16 commits
baca1c5
3ac2f8e
fd1a844
cef10b9
748c709
8d13b25
eb14efd
2caf5ae
ed3ef6f
37b6923
09e1417
9c8cdbf
7de5d7e
2273d3b
1ff355e
d39e4a8
0b0f060
75a2ae1
d1e2746
6c765f7
0144685
d38b727
4b88aa6
ce1f6f5
3ee9939
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { HardhatUserConfig } from "hardhat/config"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we are adding hardhat to this foundry project, just wanted to double check if these instructions are followed, or we don't need to follow them? https://book.getfoundry.sh/config/hardhat There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we'd need it, but it doesn't seem like we're using it. Protocol contracts should now be compatible with hardhat users without having to have any hardhat config. |
||
|
||
const config: HardhatUserConfig = { | ||
solidity: { | ||
compilers: [{ version: "0.8.26" }], | ||
}, | ||
}; | ||
|
||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,18 @@ | |
"author": "zetachain", | ||
"files": [ | ||
"abi", | ||
"types" | ||
"types", | ||
"contracts" | ||
], | ||
"scripts": { | ||
"lint": "npx eslint . --ignore-pattern coverage/ --ignore-pattern coverage.json --ignore-pattern lib/ --ignore-pattern abi --ignore-pattern cache_forge/", | ||
"lint:fix": "npx eslint . --fix --ignore-pattern coverage/ --ignore-pattern coverage.json --ignore-pattern lib/ --ignore-pattern abi --ignore-pattern cache_forge/", | ||
"lint": "npx eslint . --ignore-pattern coverage/ --ignore-pattern coverage.json --ignore-pattern lib/ --ignore-pattern out --ignore-pattern cache_forge/", | ||
"lint:fix": "npx eslint . --fix --ignore-pattern coverage/ --ignore-pattern coverage.json --ignore-pattern lib/ --ignore-pattern out --ignore-pattern cache_forge/", | ||
"localnet": "concurrently --names \"NODE,WORKER\" --prefix-colors \"blue.bold,green.bold\" \"anvil --auto-impersonate\" \"wait-on tcp:8545 && npx ts-node scripts/localnet/worker.ts\"", | ||
"test": "forge clean && forge test -vvv", | ||
"coverage": "forge clean && forge coverage --no-match-coverage \"(script|test)\" --report lcov", | ||
"typechain": "npx typechain --target ethers-v6 \"abi/**/!(*.t|test).sol/!(*.abi).json\" --out-dir types", | ||
"generate": "del-cli abi && forge clean && forge build --out abi && forge fmt && ./scripts/generate_go.sh || true && yarn lint:fix && yarn typechain" | ||
"typechain": "npx typechain --target ethers-v6 \"out/**/!(*.t|test).sol/!(*.abi).json\" --out-dir types", | ||
"generate": "forge clean && forge build && forge fmt && ./scripts/generate_go.sh || true && yarn lint:fix && yarn typechain", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem was generate go still used |
||
"prepublishOnly": "copyfiles -u 1 'out/**/*' 'abi'" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.7.0", | ||
|
@@ -23,6 +25,7 @@ | |
"@typescript-eslint/eslint-plugin": "^8.0.1", | ||
"@typescript-eslint/parser": "^8.0.1", | ||
"concurrently": "^8.2.2", | ||
"copyfiles": "^2.4.1", | ||
"del-cli": "^5.1.0", | ||
"eslint": "^9.8.0", | ||
"ts-node": "^10.9.2", | ||
|
@@ -33,7 +36,9 @@ | |
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"@openzeppelin/contracts": "^5.0.2", | ||
"@openzeppelin/contracts-upgradeable": "^5.0.2", | ||
"ethers": "^6.13.1" | ||
}, | ||
"packageManager": "[email protected]+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this remapping needed if src is set to contracts above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I've removed the remapping and also changed the import paths in tests from src to contracts: 0b0f060