This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out MerkleTree contract and emit CapeBlock as part of BlockComm…
…itted event (#1097) * Emit CapeBlock as part of BlockCommitted event * Run cargo update * Emit block data fields individually If we emit the CapeBlock struct directly this leads to a compilation error. The workaround to emit ABI encoded bytes instead fails to decode the CapeBlock in rust struct at runtime. This workaround emits the ABI encoded fields of CapeBlock individually. The function `decode_cape_block` uses an ugly workaround to deal with the problem of not being able to import `BlockCommittedFilter` because that type exists both for `CAPE` and `TestCAPE` and is therefore ambiguous. * cargo update to get latest ethers-rs version * Remove ambigous type workaround * Organize imports * [WIP] Separate merkle tree contract - Create ownable merkle tree contract owned by CAPE. * undo unwanted changes * Add missing file * All tests pass. - Add missing public getters. - Remove tree height constructor arg from CAPE. * Update hardcoded contract addresses * Check access control of merkle tree contract After running `hardhat deploy` check that 1. The merkle tree contract is owned by the CAPE contract. 2. The deployer can no longer add elements to the merkle tree. * Fix typescript tests * Fix typo * Use 1000 solc optimizer runs instead of 20 Using a really high (e.g. 1M) number does have a significant impact on gas usage but also leads to a contract that is too big to deploy. With 1000 runs the CAPE contract is as 22.5 kB so there is still room to make changes to the contract. * Build executables before exporting wallet docs * More consistency * Remove the geth patch that enables >24kB contracts * Revert "Remove the geth patch that enables >24kB contracts" This reverts commit b716ae2. Re-enable failing compilation if CAPE code is > 24kB The TestCAPE contract is still too big unless we use a very low number of optimizer runs. * Update smart contract architecture diagram
- Loading branch information