As part of an ongoing effort to achieve 100% coverage for all contracts in this repo...
CoinbaseSmartContractFactory
Added a missing test for initCodeHash()
Added two new tests to catch missing branch in createAccount for cases when the account has already been intitialized and another case wherein the account cannot be initialized because of malformed owner bytes.
ERC1271
Currently, foundry coverage doesn't like the fact that we return the return-declared salt and extensions. Adding an explicit check that the return values match the uninitialized args doesn't tick the coverage box. However, in uncommitted changes (shown below), explicitly defining the values of salt and extensions gets this test to pass with "full coverage". Since explicitly declaring these variables (again) adds ~50 gas, we shouldn't make the change just for the sake of the coverage report.
As part of an ongoing effort to achieve 100% coverage for all contracts in this repo...
CoinbaseSmartContractFactory
initCodeHash()
createAccount
for cases when the account has already been intitialized and another case wherein the account cannot be initialized because of malformed owner bytes.ERC1271
Currently, foundry coverage doesn't like the fact that we return the return-declared
salt
andextensions
. Adding an explicit check that the return values match the uninitialized args doesn't tick the coverage box. However, in uncommitted changes (shown below), explicitly defining the values ofsalt
andextensions
gets this test to pass with "full coverage". Since explicitly declaring these variables (again) adds ~50 gas, we shouldn't make the change just for the sake of the coverage report.Bug reported to foundry: https://github.com/foundry-rs/foundry/issues/7476
Coverage report as of this PR: