Skip to content

Commit

Permalink
extend docs
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lord-renkse committed Nov 13, 2024
1 parent d13d487 commit e6a9f82
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit e6a9f82

Please sign in to comment.