Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add foundry unit test coverage for token bridge factory (#64)
* Draft implementation of constructor bytecode getter * Add function for getting the constructor bytecode * Check constructor size and throw error if unexpected one * Add constructor check rationale * Refactor * Add to CI * Check CI will fail if constructor is modified * Revert "Check CI will fail if constructor is modified" This reverts commit 6389b4a. * Clean up * Change _creationCodeFor so that it uses the same constructor as the one compiler would generate This will enable source code verification of the deployed token bridge contracts on the child chain * Init logic contract * Make deployment test more complete * Remove comment * Add deployment script * Calculate properly canonical address of L1 router * feat: remove canonicalL2FactoryAddress dependency * docs: explain * format: fix * Extract code creation function to lib * fix: remove create1 import * fix: fmt * feat: add create1 util * feat: remove logic salt * fix: interface name * Verify creation code generation * feat: cache and store deployment * refactor: lower contract size * feat: getTokenBridgeDeployment * Use chai test format * Add aeWETH/UpgradeExecutor constructor size check * feat: add e2e tests to CI (#18) * Add e2e tests to CI * Use custom testnode branch * Set testnode ref * Set correct ref * Specify main * Update comment Co-authored-by: gzeon <[email protected]> * Remove intermediary function * Update out-of-date comments * feat: disable template update * chore: rename error * ci: wait-for-l3 * ci: switch back to main * Test canonical address for multicall, beacon proxy and proxy admin are correct * refactor: _deployProxyWithSalt * fix: remove Create1 lib and use empty salt instead * fix: beacon deploy * Update local deployment scripts * Add test info * Refactor test to support latest contract changes * Fetch rollup owner from logs * Update prod deployment script * Remove unnecessary structs * refactor: inline internal methods * refactor: flatten more * refactor: _computeAddressAtNonce0 * refactor: remove return val * refactor: separate l1 l2 deployment * feat: add deployment setter * fix: l2 multicall template * Bring deployment and test scripts up to date * docs: sendRetryable * fix: remove some redundent logic * Run e2e tests on chain that uses fee token * Change action name * fix: remove getCanonicalL1RouterAddress * fix: do not set weth when isUsingFeeToken * docs: add more comments * docs: _computeAddressAtNonce0 * refactor: trycatch * rename: event OrbitTokenBridgeDeploymentSet * feat: L1AtomicTokenBridgeCreator_AlreadyCreated * Remove unused error * Add L1AtomicTokenBridgeCreator init tests * Test setTemplates * refactor: calc salt in deploySeedProxy * refactor: inline oneline methods * Add L1AtomicTokenBridgeCreator init tests * Test setTemplates * Update nitro-contracts ref for testing * Add createTokenBridge tests * Add more L1 creator tests * Test ERC20 chain * Add skeleton for L2AtomicTokenBridgeFactory tests * Add more checks for L2 factory * fix: unsalted deployment * Complete L2 factory tests * Add init check for StandardArbERC20 logic * Fix L2 multicall address prediction * test: AtomicTokenBridgeCreator in foundry * test: deployment fail case * feat: allow retry * fix: typo * test: fix new test * docs: more comments * docs: explain more * refactor: rename to resend * If rollupOwner is a contract, alias its address when sending to L2 * Move aliasing rollupOwner to L1 creator * Add more L1 factory tests * Add missing L1 factory tests * refactor: scope chainId to reduce stack size * Stack too deep fix * Adapt tests --------- Co-authored-by: gzeon <[email protected]> Co-authored-by: gzeon <[email protected]>
- Loading branch information