Skip to content

Commit

Permalink
Rename JsonRPC to EthJsonRPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt committed Feb 6, 2024
1 parent b1159e7 commit df6f5e1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/protocols/JsonRPC.sol → src/protocols/EthJsonRPC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "src/suavelib/Suave.sol";
import "solady/src/utils/JSONParserLib.sol";
import "solady/src/utils/LibString.sol";

contract JsonRPC {
contract EthJsonRPC {
using JSONParserLib for *;

string endpoint;
Expand Down
24 changes: 24 additions & 0 deletions test/protocols/EthJsonRPC.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "forge-std/Test.sol";
import "src/Test.sol";
import "solady/src/utils/LibString.sol";
import "src/protocols/EthJsonRPC.sol";

contract EthJsonRPCTest is Test, SuaveEnabled {
function testEthJsonRPCGetNonce() public {
EthJsonRPC ethjsonrpc = getEthJsonRPC();

uint256 nonce = ethjsonrpc.nonce(address(this));
assertEq(nonce, 0);
}

function getEthJsonRPC() public returns (EthJsonRPC ethjsonrpc) {
try vm.envString("JSONRPC_ENDPOINT") returns (string memory endpoint) {
ethjsonrpc = new EthJsonRPC(endpoint);
} catch {
vm.skip(true);
}
}
}
24 changes: 0 additions & 24 deletions test/protocols/JsonRPC.t.sol

This file was deleted.

0 comments on commit df6f5e1

Please sign in to comment.