Skip to content

Commit

Permalink
add dagstore lib with http call
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroXbrock committed May 24, 2024
1 parent bf73579 commit 5e7145d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/app-ofa-private/ofa-private.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ pragma solidity ^0.8.8;
import "suave-std/suavelib/Suave.sol";
import "suave-std/Context.sol";

library DagStore {
function get(bytes32 id) internal returns (bytes memory) {
bytes memory body = string.concat('{"jsonrpc":"2.0","method":"batches_pull","params":["', id, '"],"id":1}');
Suave.HttpRequest memory request = Suave.HttpRequest({
url: "http://localhost:8000",
method: "GET",
headers: [],
body: body,
withFlashbotsSignature: false
});
return Suave.doHTTPRequest(request);
}
}

contract OFAPrivate {
// Struct to hold hint-related information for an order.
struct HintOrder {
Expand Down

0 comments on commit 5e7145d

Please sign in to comment.