Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rename Step.sol to RISCV.sol #14

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rvgo/test/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func fakeHeader(n uint64, parentHash common.Hash) *types.Header {
return &header
}

func loadStepContractCode(t *testing.T) *Contract {
dat, err := os.ReadFile("../../rvsol/out/Step.sol/Step.json")
func loadRISCVContractCode(t *testing.T) *Contract {
dat, err := os.ReadFile("../../rvsol/out/RISCV.sol/RISCV.json")
require.NoError(t, err)
var outDat Contract
err = json.Unmarshal(dat, &outDat)
Expand Down Expand Up @@ -125,15 +125,15 @@ var testAddrs = &Addresses{

func testContracts(t *testing.T) *Contracts {
return &Contracts{
RISCV: loadStepContractCode(t),
RISCV: loadRISCVContractCode(t),
Oracle: loadPreimageOracleContractCode(t),
}
}

func addTracer(t *testing.T, env *vm.EVM, addrs *Addresses, contracts *Contracts) {
//env.Config.Tracer = logger.NewMarkdownLogger(&logger.Config{}, os.Stdout)

a, err := contracts.RISCV.SourceMap([]string{"../../rvsol/src/Step.sol"})
a, err := contracts.RISCV.SourceMap([]string{"../../rvsol/src/RISCV.sol"})
require.NoError(t, err)
b, err := contracts.Oracle.SourceMap([]string{"../../rvsol/src/PreimageOracle.sol"})
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion rvsol/src/Step.sol → rvsol/src/RISCV.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.13;

import {IPreimageOracle} from "@optimism/src/cannon/interfaces/IPreimageOracle.sol";

contract Step {
contract RISCV {

IPreimageOracle public preimageOracle;

Expand Down
12 changes: 6 additions & 6 deletions rvsol/test/Step.t.sol → rvsol/test/RISCV.t.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
pragma solidity 0.8.15;

import {Test} from "forge-std/Test.sol";
import {Step} from "src/Step.sol";
import {RISCV} from "src/RISCV.sol";
import {PreimageOracle} from "@optimism/src/cannon/PreimageOracle.sol";

contract Step_Test is Test {
contract RISCV_Test is Test {
RISCV internal riscv;
PreimageOracle internal oracle;
Step internal step;

function setUp() public {
oracle = new PreimageOracle(0, 0, 0);
step = new Step(oracle);
vm.store(address(step), 0x0, bytes32(abi.encode(address(oracle))));
riscv = new RISCV(oracle);
vm.store(address(riscv), 0x0, bytes32(abi.encode(address(oracle))));
vm.label(address(oracle), "PreimageOracle");
vm.label(address(step), "Step");
vm.label(address(riscv), "RISCV");
}
}
Loading