Skip to content

Commit 86dc0ee

Browse files
committed
chore : lint Bindings
1 parent 1554c7f commit 86dc0ee

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

foundry.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ optimizer_runs = 200
2323

2424
[bind_json]
2525
out = "tests/mocks/JsonBindings.sol"
26-
include = ["tests/helpers/EIP712Types.sol"]
26+
include = ["tests/helpers/EIP712Types.sol"]
27+
28+
[lint]
29+
ignore = ["tests/mocks/JsonBindings.sol"]

tests/mocks/JsonBindings.sol

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,14 @@ library JsonBindings {
5454
string memory objectKey,
5555
string memory valueKey
5656
) internal returns (string memory) {
57-
return
58-
vm.serializeJsonType(objectKey, valueKey, schema_BuyAssetWithSig, abi.encode(value));
57+
return vm.serializeJsonType(objectKey, valueKey, schema_BuyAssetWithSig, abi.encode(value));
5958
}
6059

6160
function deserializeBuyAssetWithSig(
6261
string memory json
6362
) public pure returns (EIP712Types.BuyAssetWithSig memory) {
6463
return
65-
abi.decode(
66-
vm.parseJsonType(json, schema_BuyAssetWithSig),
67-
(EIP712Types.BuyAssetWithSig)
68-
);
64+
abi.decode(vm.parseJsonType(json, schema_BuyAssetWithSig), (EIP712Types.BuyAssetWithSig));
6965
}
7066

7167
function deserializeBuyAssetWithSig(
@@ -90,7 +86,9 @@ library JsonBindings {
9086
);
9187
}
9288

93-
function serialize(EIP712Types.SellAssetWithSig memory value) internal pure returns (string memory) {
89+
function serialize(
90+
EIP712Types.SellAssetWithSig memory value
91+
) internal pure returns (string memory) {
9492
return vm.serializeJsonType(schema_SellAssetWithSig, abi.encode(value));
9593
}
9694

@@ -102,21 +100,32 @@ library JsonBindings {
102100
return vm.serializeJsonType(objectKey, valueKey, schema_SellAssetWithSig, abi.encode(value));
103101
}
104102

105-
function deserializeSellAssetWithSig(string memory json) public pure returns (EIP712Types.SellAssetWithSig memory) {
106-
return abi.decode(vm.parseJsonType(json, schema_SellAssetWithSig), (EIP712Types.SellAssetWithSig));
103+
function deserializeSellAssetWithSig(
104+
string memory json
105+
) public pure returns (EIP712Types.SellAssetWithSig memory) {
106+
return
107+
abi.decode(vm.parseJsonType(json, schema_SellAssetWithSig), (EIP712Types.SellAssetWithSig));
107108
}
108109

109110
function deserializeSellAssetWithSig(
110111
string memory json,
111112
string memory path
112113
) public pure returns (EIP712Types.SellAssetWithSig memory) {
113-
return abi.decode(vm.parseJsonType(json, path, schema_SellAssetWithSig), (EIP712Types.SellAssetWithSig));
114+
return
115+
abi.decode(
116+
vm.parseJsonType(json, path, schema_SellAssetWithSig),
117+
(EIP712Types.SellAssetWithSig)
118+
);
114119
}
115120

116121
function deserializeSellAssetWithSigArray(
117122
string memory json,
118123
string memory path
119124
) public pure returns (EIP712Types.SellAssetWithSig[] memory) {
120-
return abi.decode(vm.parseJsonTypeArray(json, path, schema_SellAssetWithSig), (EIP712Types.SellAssetWithSig[]));
125+
return
126+
abi.decode(
127+
vm.parseJsonTypeArray(json, path, schema_SellAssetWithSig),
128+
(EIP712Types.SellAssetWithSig[])
129+
);
121130
}
122-
}
131+
}

0 commit comments

Comments
 (0)