Skip to content

Commit

Permalink
⚰️ Removing console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroknots committed Mar 4, 2024
1 parent 7353e2a commit 1bcc9ef
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/PermissionManager/src/PermissionValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ contract PermissionValidator is ERC7579ValidatorBase {
{
require(_userOp.sender == msg.sender, "sender must be msg.sender");
bytes32 permissionId = bytes32(_userOp.signature[0:32]);
console2.log("validate user Op. PermissionID:");
console2.logBytes32(permissionId);
if (
permissions[permissionId][msg.sender].flag & toFlag(1) == toFlag(0)
|| nonces[msg.sender].revoked > permissions[permissionId][msg.sender].nonce
Expand All @@ -217,8 +215,6 @@ contract PermissionValidator is ERC7579ValidatorBase {
Permission memory permission = permissions[permissionId][msg.sender];
PolicyConfig policy = permission.firstPolicy;
uint256 cursor = 32;
console2.log("policy", address(PolicyConfigLib.getAddress(policy)));
console2.logBytes32(PolicyConfig.unwrap(policy));
while (address(PolicyConfigLib.getAddress(policy)) != address(0)) {
// if (PolicyConfigLib.skipOnValidateUserOp(policy)) {
// policy = nextPolicy[permissionId][policy][msg.sender];
Expand All @@ -233,7 +229,6 @@ contract PermissionValidator is ERC7579ValidatorBase {
&& address(bytes20(_userOp.signature[cursor:cursor + 20]))
== address(PolicyConfigLib.getAddress(policy))
) {
console2.log("if");
// only when policy address is same as the one in signature
uint256 length = uint256(bytes32(_userOp.signature[cursor + 20:cursor + 52]));
require(
Expand All @@ -244,12 +239,9 @@ contract PermissionValidator is ERC7579ValidatorBase {
// policyDataLength, policyData]
cursor += 52 + length;
} else {
console2.log("else");
policyData = _userOp.signature[cursor:cursor];
}

console2.log("policyData");
console2.logBytes(policyData);
ValidationData policyValidation = PolicyConfigLib.getAddress(policy).checkUserOpPolicy(
msg.sender, permissionId, _userOp, policyData
);
Expand Down

0 comments on commit 1bcc9ef

Please sign in to comment.