Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nerderlyne committed Sep 4, 2023
1 parent 47647dd commit 37bb52b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"private": false,
"scripts": {
"format": "prettier --write src/**.sol src/utils/**.sol src/utils/interfaces/**.sol src/extensions/dao/**.sol src/extensions/dao/utils/**.sol src/extensions/metadata/**.sol src/extensions/mint/**.sol src/extensions/storage/**.sol src/extensions/utils/**.sol test/**.sol test/utils/mocks/**.sol flat/**.sol --plugin-search-dir=.",
"format": "prettier --write --plugin=prettier-plugin-solidity 'src/**/*.sol' 'test/**/*.sol' 'flat/**/*.sol'",
"format:list": "prettier --list-different 'src/**/*.sol'",
"format:check": "prettier --check 'src/**/*.sol'",
"solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix --ignore-path .solhintignore",
Expand Down
14 changes: 5 additions & 9 deletions src/Keep.sol
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ contract Keep is ERC1155TokenReceiver, KeepToken, Multicallable {
bytes calldata sig
) public view virtual returns (bytes4) {
// Check `SIGN_KEY` as this denotes ownership.
if (_validate(hash, sig, SIGN_KEY) == 0)
return 0x1626ba7e; else return 0xffffffff;
if (_validate(hash, sig, SIGN_KEY) == 0) return 0x1626ba7e;
else return 0xffffffff;
}

/// -----------------------------------------------------------------------
Expand All @@ -480,8 +480,8 @@ contract Keep is ERC1155TokenReceiver, KeepToken, Multicallable {
bytes32 hash,
bytes calldata sig
) public view virtual returns (bytes4) {
if (_validate(hash, sig, id) == 0)
return 0x12edb34f; else return 0xffffffff;
if (_validate(hash, sig, id) == 0) return 0x12edb34f;
else return 0xffffffff;
}

/// -----------------------------------------------------------------------
Expand Down Expand Up @@ -514,11 +514,7 @@ contract Keep is ERC1155TokenReceiver, KeepToken, Multicallable {
missingAccountFunds
);
} else {
validationData = _validate(
userOpHash,
userOp.signature,
SIGN_KEY
);
validationData = _validate(userOpHash, userOp.signature, SIGN_KEY);
}

// Send any missing funds to `entrypoint()` (msg.sender).
Expand Down
5 changes: 4 additions & 1 deletion src/extensions/validate/URIRemoteFetcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ contract URIRemoteFetcher {

constructor() payable {}

Check warning on line 8 in src/extensions/validate/URIRemoteFetcher.sol

View workflow job for this annotation

GitHub Actions / run-ci

Code contains empty blocks

function uri(address origin, uint256 id) public view virtual returns (string memory) {
function uri(
address origin,
uint256 id
) public view virtual returns (string memory) {
return
string(
abi.encodePacked(
Expand Down
8 changes: 6 additions & 2 deletions src/extensions/validate/Validator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ pragma solidity ^0.8.4;

import {Ownable} from "../../utils/Ownable.sol";
import {UserOperation} from "../../Keep.sol";
function getURI(address,uint256) returns (string memory) {}

function getURI(address, uint256) returns (string memory) {}

Check warning on line 7 in src/extensions/validate/Validator.sol

View workflow job for this annotation

GitHub Actions / run-ci

Code contains empty blocks

/// @notice Open-ended metadata for ERC1155 and ERC4337 permission fetching.
contract Validator is Ownable(tx.origin) {

Check warning on line 10 in src/extensions/validate/Validator.sol

View workflow job for this annotation

GitHub Actions / run-ci

Avoid to use tx.origin
Expand Down Expand Up @@ -67,7 +68,10 @@ contract Validator is Ownable(tx.origin) {
/// -----------------------------------------------------------------------
/// URI Remote Logic
/// -----------------------------------------------------------------------
function uri(address, uint256) public view virtual returns (string memory) {}
function uri(
address,
uint256
) public view virtual returns (string memory) {}

Check warning on line 74 in src/extensions/validate/Validator.sol

View workflow job for this annotation

GitHub Actions / run-ci

Code contains empty blocks

function uri(uint256 id) public view virtual returns (string memory) {
return uriRemoteValidator.uri(msg.sender, id);
Expand Down

0 comments on commit 37bb52b

Please sign in to comment.