-
Notifications
You must be signed in to change notification settings - Fork 7
Add Cannon #69
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
Merged
Add Cannon #69
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ed14257
add cannonfile
kaze-cow 568376f
cleanups and misc fixes
kaze-cow 7d4cf9b
Merge branch 'main' into cannon
kaze-cow 6384274
newest changes
kaze-cow d7761f4
Merge branch 'cannon' of https://github.com/cowprotocol/ethflowcontra…
kaze-cow 0bdf6a3
fix foundry profile issue due to newer version of foundry
kaze-cow f325ead
update readme and inconsistencies in packagejson
kaze-cow 12c2f2c
remove unnecessary lines
kaze-cow 4c0a64a
added a warning for now. will need something much safer later
kaze-cow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,34 @@ | ||
| #:schema https://raw.githubusercontent.com/usecannon/cannon/refs/heads/dev/packages/lsp/src/schema.json | ||
| name = "cow-ethflow" | ||
| version = "1.0.3" | ||
|
|
||
| # dummy token for test network only | ||
| [import.dummyToken] | ||
| source = "mintable-token:2.0" | ||
| chainId = 13370 | ||
|
|
||
| [import.cow] | ||
| source = "cow-settlement:2.0.2" | ||
|
|
||
| [var.main] | ||
| cowSettlement = "<%= cow.Settlement.address %>" | ||
|
|
||
| # WARNING: Make sure you override the wrappedNativeToken with the corresponding native token contract address in the network. | ||
| # The deployment of CoWSwapEthFlow needs to happen in nonce 0, so there's only one possible attempt. | ||
| wrappedNativeToken = "<%= dummyToken.Token.address %>" | ||
|
|
||
| deployerAccount = "0x18AA26D5e4A18ef6E49c509D52a4f7d60242b10D" | ||
|
|
||
| [deploy.EthFlow] | ||
| artifact = "CoWSwapEthFlow" | ||
|
|
||
| # EthFlow is one of the few CoW protocol contracts that doesn't use create2 because the `wrappedNativeToken` | ||
| # so to achieve the same address, we use the same deployment key at nonce 0, resulting in the same address | ||
| # no matter the initcode | ||
kaze-cow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| from = "<%= settings.deployerAccount %>" | ||
| nonce = 0 | ||
|
|
||
| args = ["<%= settings.cowSettlement %>", "<%= settings.wrappedNativeToken %>"] | ||
|
|
||
| # Prevent the contract from failing to deploy due to gas limit issues | ||
| overrides.gasLimit = "2000000" | ||
This file contains hidden or 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,14 +1,19 @@ | ||
| { | ||
| "license": "LGPL-3.0-or-later", | ||
| "devDependencies": { | ||
| "@usecannon/cli": "2.26.0-alpha.0", | ||
| "prettier": "^2.7.1", | ||
| "prettier-plugin-solidity": "^1.0.0-beta.24", | ||
| "solhint": "^3.3.7", | ||
| "solhint-plugin-prettier": "^0.0.5" | ||
| }, | ||
| "scripts": { | ||
| "fmt": "prettier 'src/**/*.sol' -w && prettier 'test/**/*.sol' -w && prettier 'script/**/*.sol' -w", | ||
| "lint": "solhint 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'" | ||
| "lint": "solhint 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'", | ||
| "build": "yarn build:cannon", | ||
| "build:cannon": "yarn cannon build --wipe", | ||
| "cannon:publish": "yarn cannon publish cow-ethflow --chain-id 13370 --registry-chain-id 10 && yarn cannon:record", | ||
| "cannon:record": "yarn cannon inspect cow-ethflow:latest --chain-id 13370 --out deploy-json > cannon/deploy.json && yarn cannon inspect cow-ethflow:latest --chain-id 13370 --out misc-json > cannon/misc.json" | ||
| }, | ||
| "version": "1.5.0" | ||
| } |
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.