From d13d4876436879834fd004566e59564cbce24dbc Mon Sep 17 00:00:00 2001 From: Mateo Date: Fri, 1 Nov 2024 12:15:22 +0100 Subject: [PATCH 1/4] Base deployment --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0718cb3..6d169cb 100644 --- a/README.md +++ b/README.md @@ -123,16 +123,16 @@ Fortunately, when using Safe, it is possible to batch together all the above cal ### Deployed Contracts -| Contract Name | Ethereum Mainnet | Gnosis Chain | Sepolia | Arbitrum One | -| ------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------| -| `ExtensibleFallbackHandler` | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://etherscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://gnosisscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://sepolia.etherscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://arbiscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | -| `ComposableCoW` | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://etherscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://gnosisscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://sepolia.etherscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://arbiscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | -| `TWAP` | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://etherscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://gnosisscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://sepolia.etherscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://arbiscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | -| `GoodAfterTime` | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://etherscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://gnosisscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://sepolia.etherscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://arbiscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | -| `PerpetualStableSwap` | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://etherscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://gnosisscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://sepolia.etherscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://arbiscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | -| `TradeAboveThreshold` | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://etherscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://gnosisscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://sepolia.etherscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://arbiscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | -| `StopLoss` | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://etherscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://gnosisscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://sepolia.etherscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://arbiscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | -| `CurrentBlockTimestampFactory` | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://etherscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://gnosisscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://sepolia.etherscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://arbiscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | +| Contract Name | Ethereum Mainnet | Gnosis Chain | Sepolia | Arbitrum One | Base | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| +| `ExtensibleFallbackHandler` | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://etherscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://gnosisscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://sepolia.etherscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://arbiscan.io/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | [0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5](https://basescan.org/address/0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5) | +| `ComposableCoW` | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://etherscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://gnosisscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://sepolia.etherscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://arbiscan.io/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | [0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74](https://basescan.org/address/0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74) | +| `TWAP` | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://etherscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://gnosisscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://sepolia.etherscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://arbiscan.io/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | [0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5](https://basescan.org/address/0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5) | +| `GoodAfterTime` | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://etherscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://gnosisscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://sepolia.etherscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://arbiscan.io/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | [0xdaf33924925e03c9cc3a10d434016d6cfad0add5](https://basescan.org/address/0xdaf33924925e03c9cc3a10d434016d6cfad0add5) | +| `PerpetualStableSwap` | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://etherscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://gnosisscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://sepolia.etherscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://arbiscan.io/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | [0x519BA24e959E33b3B6220CA98bd353d8c2D89920](https://basescan.org/address/0x519BA24e959E33b3B6220CA98bd353d8c2D89920) | +| `TradeAboveThreshold` | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://etherscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://gnosisscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://sepolia.etherscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://arbiscan.io/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | [0x812308712a6d1367f437e1c1e4af85c854e1e9f6](https://basescan.org/address/0x812308712a6d1367f437e1c1e4af85c854e1e9f6) | +| `StopLoss` | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://etherscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://gnosisscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://sepolia.etherscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://arbiscan.io/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | [0x412c36e5011cd2517016d243a2dfb37f73a242e7](https://basescan.org/address/0x412c36e5011cd2517016d243a2dfb37f73a242e7) | +| `CurrentBlockTimestampFactory` | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://etherscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://gnosisscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://sepolia.etherscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://arbiscan.io/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | [0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc](https://basescan.org/address/0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc) | #### Audits From e6a9f821f5187743d7cba12d7215996b8f615c1a Mon Sep 17 00:00:00 2001 From: Mateo Date: Wed, 13 Nov 2024 15:22:56 +0100 Subject: [PATCH 2/4] extend docs --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 6d169cb..66e5595 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,22 @@ forge script script/deploy_OrderTypes.s.sol:DeployOrderTypes --rpc-url $ETH_RPC_ The `broadcast` directory collects the latest run of the deployment script by network and is updated manually. When the script is ran, the corresponding files can be found in the folder `broadcast/deploy_OrderTypes.s.sol/`. +#### Manual deployment + +Because of the issue [#39](https://github.com/cowprotocol/composable-cow/issues/93), in order to achieve deterministic deployment it is needed to: + +- Go to a deployed contract in another network, open the creation TX (e.g. [ExtensibleFallbackHandler](https://etherscan.io/tx/0x33dcbc73a8797c69a5b3956539dd8d191cf3f190bcb27a4d4eca8556f030f574) in mainnet) +- Go to `Click to show more` and copy the `Input Data` in Original format, also copy the `to` address +- Use your favourite tool to make a transaction (e.i. [swiss-knife](https://transact.swiss-knife.xyz/send-tx?chainId=1)) +- Use the corresponding `Input Data` and `to` and send the tx +- A new contract will be deployed using `CREATE2` to the same deterministic address + +How to verify the contracts: + +- Some contracts will auto-verify themselves (rare), because they exist in other networks +- Some contracts can be verified with forge e.i. `forge verify-contract --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5 lib/safe/contracts/handler/ExtensibleFallbackHandler.sol:ExtensibleFallbackHandler` +- For the contracts which can't be verified neither way, the standard json input has to be generated with forge: `forge verify-contract --verifier sourcify --show-standard-json-input --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 src/ComposableCoW.sol:ComposableCoW > ComposableCoW.json`, and submit the json to the corresponding block explorer + #### Local deployment For local integration testing, including the use of [Watch Tower](https://github.com/cowprotocol/tenderly-watch-tower), it may be useful deploying to a _forked_ mainnet environment. This can be done with `anvil`. From 9ec93b389246a8c89b0c505fcf52154349b18e07 Mon Sep 17 00:00:00 2001 From: m-lord-renkse <160488334+m-lord-renkse@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:07:17 +0100 Subject: [PATCH 3/4] Update README.md Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66e5595..e3b9061 100644 --- a/README.md +++ b/README.md @@ -193,14 +193,14 @@ Because of the issue [#39](https://github.com/cowprotocol/composable-cow/issues/ - Go to a deployed contract in another network, open the creation TX (e.g. [ExtensibleFallbackHandler](https://etherscan.io/tx/0x33dcbc73a8797c69a5b3956539dd8d191cf3f190bcb27a4d4eca8556f030f574) in mainnet) - Go to `Click to show more` and copy the `Input Data` in Original format, also copy the `to` address -- Use your favourite tool to make a transaction (e.i. [swiss-knife](https://transact.swiss-knife.xyz/send-tx?chainId=1)) +- Use your favourite tool to make a transaction (e.g., [swiss-knife](https://transact.swiss-knife.xyz/send-tx?chainId=1)) - Use the corresponding `Input Data` and `to` and send the tx - A new contract will be deployed using `CREATE2` to the same deterministic address How to verify the contracts: - Some contracts will auto-verify themselves (rare), because they exist in other networks -- Some contracts can be verified with forge e.i. `forge verify-contract --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5 lib/safe/contracts/handler/ExtensibleFallbackHandler.sol:ExtensibleFallbackHandler` +- Some contracts can be verified with forge, e.g., `forge verify-contract --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5 lib/safe/contracts/handler/ExtensibleFallbackHandler.sol:ExtensibleFallbackHandler` - For the contracts which can't be verified neither way, the standard json input has to be generated with forge: `forge verify-contract --verifier sourcify --show-standard-json-input --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 src/ComposableCoW.sol:ComposableCoW > ComposableCoW.json`, and submit the json to the corresponding block explorer #### Local deployment From f2b513ea7010c25f2edf0488dc9c21a4938b82df Mon Sep 17 00:00:00 2001 From: m-lord-renkse <160488334+m-lord-renkse@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:08:02 +0100 Subject: [PATCH 4/4] Update README.md Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e3b9061..8369dac 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ How to verify the contracts: - Some contracts will auto-verify themselves (rare), because they exist in other networks - Some contracts can be verified with forge, e.g., `forge verify-contract --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5 lib/safe/contracts/handler/ExtensibleFallbackHandler.sol:ExtensibleFallbackHandler` -- For the contracts which can't be verified neither way, the standard json input has to be generated with forge: `forge verify-contract --verifier sourcify --show-standard-json-input --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 src/ComposableCoW.sol:ComposableCoW > ComposableCoW.json`, and submit the json to the corresponding block explorer +- For the contracts which can't be verified either way, the standard json input has to be generated with forge: `forge verify-contract --verifier sourcify --show-standard-json-input --etherscan-api-key $BASESCAN_API_KEY --rpc-url $RPC_URL 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 src/ComposableCoW.sol:ComposableCoW > ComposableCoW.json`, and submit the json to the corresponding block explorer through the "standard-json" option on its web interface #### Local deployment