diff --git a/contracts/libraries/SessionLib.sol b/contracts/libraries/SessionLib.sol index 0bb9f50..0c4b9bb 100644 --- a/contracts/libraries/SessionLib.sol +++ b/contracts/libraries/SessionLib.sol @@ -276,6 +276,7 @@ library SessionLib { uint64 period = uint64(block.timestamp / limit.period); return limit.limit - tracker.allowanceUsage[period][account]; } + return 0; } function getState( diff --git a/contracts/paymasters/GaslessPaymaster.sol b/contracts/paymasters/GaslessPaymaster.sol index 4e33e1a..056f076 100644 --- a/contracts/paymasters/GaslessPaymaster.sol +++ b/contracts/paymasters/GaslessPaymaster.sol @@ -53,6 +53,7 @@ contract GaslessPaymaster is IPaymaster, Ownable, BootloaderAuth { ) external payable onlyBootloader returns (bytes4 magic, bytes memory context) { // By default we consider the transaction as accepted. magic = PAYMASTER_VALIDATION_SUCCESS_MAGIC; + context = ""; // Revert if standart paymaster input is shorter than 4 bytes if (_transaction.paymasterInput.length < 4) revert Errors.SHORT_PAYMASTER_INPUT(); diff --git a/contracts/test/ERC20PaymasterMock.sol b/contracts/test/ERC20PaymasterMock.sol index 57fa42a..591f3a7 100644 --- a/contracts/test/ERC20PaymasterMock.sol +++ b/contracts/test/ERC20PaymasterMock.sol @@ -216,7 +216,7 @@ contract ERC20PaymasterMock is */ function callOracle( bytes memory //* oracleCalldata */ - ) external view returns (uint256) { + ) external pure returns (uint256) { // return getOracleNumericValueFromTxMsg(bytes32('ETH')); return 1500 * ORACLE_NOMINATOR; } diff --git a/contracts/test/MockModule.sol b/contracts/test/MockModule.sol index ca8708b..d8bbca9 100644 --- a/contracts/test/MockModule.sol +++ b/contracts/test/MockModule.sol @@ -31,7 +31,7 @@ contract MockModule is IModule { IAGWAccount(account).k1AddOwner(address(this)); } - function isInited(address account) external view returns (bool) { + function isInited(address) external pure returns (bool) { return true; } diff --git a/contracts/validators/SessionKeyValidator.sol b/contracts/validators/SessionKeyValidator.sol index 2708b07..c69c9f9 100644 --- a/contracts/validators/SessionKeyValidator.sol +++ b/contracts/validators/SessionKeyValidator.sol @@ -45,7 +45,7 @@ contract SessionKeyValidator is IValidationHook, IModuleValidator, IModule { return status; } - function handleValidation(OperationType operationType, bytes32 signedHash, bytes memory signature) external view returns (bool) { + function handleValidation(OperationType operationType, bytes32 signedHash, bytes memory) external view returns (bool) { if (operationType != OperationType.Transaction) { return false; }