From e6a9f821f5187743d7cba12d7215996b8f615c1a Mon Sep 17 00:00:00 2001 From: Mateo Date: Wed, 13 Nov 2024 15:22:56 +0100 Subject: [PATCH] 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`.