Skip to content

Commit 0c32799

Browse files
committed
Add wyvern benchmarking
1 parent 8f91df7 commit 0c32799

16 files changed

+1348
-446
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"solidity.packageDefaultDependenciesContractsDirectory": "src",
33
"solidity.packageDefaultDependenciesDirectory": "lib",
4-
"solidity.compileUsingRemoteVersion": "v0.8.13",
4+
"solidity.compileUsingRemoteVersion": "v0.8.14",
55
"search.exclude": { "lib": true },
66
"files.associations": {
77
".gas-snapshot": "julia"

src/BaseMarketConfig.sol

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.8.7;
33

4-
import { TestOrderPayload, TestOrderContext, TestCallParameters, TestItem20, TestItem721, TestItem1155 } from "./Types.sol";
4+
import {TestOrderPayload, TestOrderContext, TestCallParameters, TestItem20, TestItem721, TestItem1155} from "./Types.sol";
55

66
abstract contract BaseMarketConfig {
77
ITestRunner private _tester;
@@ -28,7 +28,11 @@ abstract contract BaseMarketConfig {
2828
function _sign(address signer, bytes32 digest)
2929
internal
3030
view
31-
returns (bytes memory)
31+
returns (
32+
uint8,
33+
bytes32,
34+
bytes32
35+
)
3236
{
3337
return _tester.signDigest(signer, digest);
3438
}
@@ -140,5 +144,9 @@ interface ITestRunner {
140144
function signDigest(address signer, bytes32 digest)
141145
external
142146
view
143-
returns (bytes memory);
147+
returns (
148+
uint8,
149+
bytes32,
150+
bytes32
151+
);
144152
}

src/marketplaces/seaport/SeaportConfig.sol

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity >=0.8.7;
33

4-
import { BaseMarketConfig } from "../../BaseMarketConfig.sol";
5-
import { TestCallParameters, TestOrderContext, TestOrderPayload, TestItem721, TestItem1155, TestItem20 } from "../../Types.sol";
4+
import {BaseMarketConfig} from "../../BaseMarketConfig.sol";
5+
import {TestCallParameters, TestOrderContext, TestOrderPayload, TestItem721, TestItem1155, TestItem20} from "../../Types.sol";
66
import "./lib/ConsiderationStructs.sol";
77
import "./lib/ConsiderationTypeHashes.sol";
8-
import { ConsiderationInterface as ISeaport } from "./interfaces/ConsiderationInterface.sol";
8+
import {ConsiderationInterface as ISeaport} from "./interfaces/ConsiderationInterface.sol";
99

1010
contract SeaportConfig is BaseMarketConfig, ConsiderationTypeHashes {
1111
function name() external view virtual override returns (string memory) {
12-
return "Seaport";
12+
return "Seaport";
1313
}
1414

1515
ISeaport internal constant seaport =
@@ -53,7 +53,8 @@ contract SeaportConfig is BaseMarketConfig, ConsiderationTypeHashes {
5353
basicComponents.basicOrderType = BasicOrderType(uint256(routeType) * 4);
5454
basicComponents.totalOriginalAdditionalRecipients = 0;
5555
bytes32 digest = _deriveEIP712Digest(_deriveOrderHash(components, 0));
56-
bytes memory signature = _sign(offerer, digest);
56+
(uint8 v, bytes32 r, bytes32 s) = _sign(offerer, digest);
57+
bytes memory signature = abi.encodePacked(r, s, v);
5758
basicComponents.signature = (order.signature = signature);
5859
}
5960

0 commit comments

Comments
 (0)