Cualquier combinación de firmantes con un peso combinado por debajo del umbral se considera inválida; cualquier firmante adicional por encima del umbral es ignorado.
La configuración nunca se almacena directamente en el contrato, sino que se hashea y se verifica cada vez que se valida una firma. Esto permite que los contratos de wallet reduzcan el uso de almacenamiento y, por lo tanto, el costo de gas.
Los wallets que nunca han sido actualizados no almacenan el imageHash directamente; en su lugar, el imageHash se usa como el salt durante la creación del contrato, y las firmas se validan contra la dirección del wallet.
// The code of the wallet proxy contractconst WalletProxyBytecode ="0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3";// These values are defined by the wallet context// they must be known in order to validate the counter-factual wallet imageHashconst factory = "0xf9D09D634Fb818b05149329C1dcCFAeA53639d96";const mainModule = "0xd01F11855bCcb95f88D7A48492F66410d4637313";// Append the `mainModule` to the `WalletProxyBytecode`// this completed the creation code of the proxy contract// used for computing the wallet address as defined by the CREATE2 opcodeconst codeHash = ethers.solidityPackedKeccak256(ethers.solidityPackedKeccak256(["bytes", "bytes32"],[WalletContractBytecode, ethers.hexZeroPad(mainModule, 32)]));// Compute the wallet addressconst hash = ethers.solidityPackedKeccak256(ethers.solidityPackedKeccak256(["bytes1", "address", "bytes32", "bytes32"],["0xff", factory, salt, codeHash]));const address = ethers.getAddress(ethers.dataSlice(hash, 12));