Skip to content

Commit

Permalink
begin adding log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardJES committed Jan 18, 2024
1 parent 13411eb commit 5ecf81f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/contracts/modules/commons/ModuleAuth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import "./interfaces/IModuleAuth.sol";

import "./ModuleERC165.sol";

import "hardhat/console.sol";

Check failure on line 12 in src/contracts/modules/commons/ModuleAuth.sol

View workflow job for this annotation

GitHub Actions / Solidity lint

Unexpected import of console file


abstract contract ModuleAuth is IModuleAuth, ModuleERC165, SignatureValidator, IERC1271Wallet {
using LibBytes for bytes;
Expand Down Expand Up @@ -115,6 +117,8 @@ abstract contract ModuleAuth is IModuleAuth, ModuleERC165, SignatureValidator, I
// Read dynamic size signature
bytes memory signature;
(signature, rindex) = _signature.readBytes(rindex, size);
console.log("ModuleAuth: isValidSignature");

Check failure on line 120 in src/contracts/modules/commons/ModuleAuth.sol

View workflow job for this annotation

GitHub Actions / Solidity lint

Unexpected console statement
console.logBytes4(isValidSignature(_hash, addr, signature));

Check failure on line 121 in src/contracts/modules/commons/ModuleAuth.sol

View workflow job for this annotation

GitHub Actions / Solidity lint

Unexpected console statement
require(isValidSignature(_hash, addr, signature), "ModuleAuth#_signatureValidation: INVALID_SIGNATURE");

// Acumulate total weight of the signature
Expand Down Expand Up @@ -166,7 +170,7 @@ abstract contract ModuleAuth is IModuleAuth, ModuleERC165, SignatureValidator, I
// solhint-disable-next-line no-empty-blocks
function updateImageHashInternal(bytes32 _imageHash) internal virtual {
// Default implementation does nothing
}
}



Expand All @@ -183,6 +187,7 @@ abstract contract ModuleAuth is IModuleAuth, ModuleERC165, SignatureValidator, I
bytes calldata _data,
bytes calldata _signatures
) external override view returns (bytes4) {
console.log("====== IS VALID SIGNATURE ======");

Check failure on line 190 in src/contracts/modules/commons/ModuleAuth.sol

View workflow job for this annotation

GitHub Actions / Solidity lint

Unexpected console statement
// Validate signatures
if (_signatureValidationInternal(_subDigest(keccak256(_data)), _signatures)) {
return SELECTOR_ERC1271_BYTES_BYTES;
Expand All @@ -203,6 +208,7 @@ abstract contract ModuleAuth is IModuleAuth, ModuleERC165, SignatureValidator, I
bytes32 _hash,
bytes calldata _signatures
) external override view returns (bytes4) {
console.log("====== IS VALID SIGNATURE bytes32 HASH ======");

Check failure on line 211 in src/contracts/modules/commons/ModuleAuth.sol

View workflow job for this annotation

GitHub Actions / Solidity lint

Unexpected console statement
// Validate signatures
if (_signatureValidationInternal(_subDigest(_hash), _signatures)) {
return SELECTOR_ERC1271_BYTES32_BYTES;
Expand Down
2 changes: 1 addition & 1 deletion utils/config-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getEnvConfig = (env: string) => {
const envLoad = dotenv.config({ path: envFile })

if (envLoad.error) {
console.warn('No config found, using default')
// console.warn('No config found, using default')
return { ETH_MNEMONIC: ethers.Wallet.createRandom().mnemonic.phrase }
}

Expand Down

0 comments on commit 5ecf81f

Please sign in to comment.