Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Oct 3, 2024
1 parent 0d6173c commit ef702e6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.22.1

replace github.com/ethereum/go-ethereum v1.14.8 => github.com/ethereum-optimism/op-geth v1.101408.0-rc.4.0.20240827042333-110c433a2469

replace github.com/ethereum-optimism/optimism v1.9.2 => github.com/testinprod-io/optimism v0.0.0-20241003225321-55d7533108f9
replace github.com/ethereum-optimism/optimism v1.9.2 => github.com/testinprod-io/optimism v0.0.0-20241003231047-9d908ccbe262

require (
github.com/ethereum-optimism/optimism v1.9.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI=
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/testinprod-io/optimism v0.0.0-20241003225321-55d7533108f9 h1:M9Wm97GqM/5QzKR2Kk3lUdjGk8jscx6Cu3rZJ5+UulU=
github.com/testinprod-io/optimism v0.0.0-20241003225321-55d7533108f9/go.mod h1:eeUe73d7TOnas4o97ULLR8K0xP6zfdOx6HPilL7v3No=
github.com/testinprod-io/optimism v0.0.0-20241003231047-9d908ccbe262 h1:dhPqoJchsMwwHenZ9hSuN4gjNsdVuWKpMlXx6eosd+E=
github.com/testinprod-io/optimism v0.0.0-20241003231047-9d908ccbe262/go.mod h1:eeUe73d7TOnas4o97ULLR8K0xP6zfdOx6HPilL7v3No=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
Expand Down
10 changes: 3 additions & 7 deletions rvgo/test/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
Expand Down Expand Up @@ -101,14 +100,11 @@ func newEVMEnv(t *testing.T, contracts *Contracts, addrs *Addresses) *vm.EVM {
offsetBlocks := uint64(1000) // blocks after cancun fork
bc := &dummyChain{startTime: *chainCfg.CancunTime + offsetBlocks*12}
header := bc.GetHeader(common.Hash{}, 17034870+offsetBlocks)
db := rawdb.NewMemoryDatabase()
statedb := state.NewDatabase(db)
state, err := state.New(types.EmptyRootHash, statedb, nil)
require.NoError(t, err)
blockContext := core.NewEVMBlockContext(header, bc, nil, chainCfg, state)
statedb, _ := state.New(types.EmptyRootHash, state.NewDatabaseForTesting())
blockContext := core.NewEVMBlockContext(header, bc, nil)
vmCfg := vm.Config{}

env := vm.NewEVM(blockContext, vm.TxContext{}, state, chainCfg, vmCfg)
env := vm.NewEVM(blockContext, vm.TxContext{}, statedb, chainCfg, vmCfg)
env.StateDB.SetCode(addrs.RISCV, contracts.RISCV.DeployedBytecode.Object)
env.StateDB.SetCode(addrs.Oracle, contracts.Oracle.DeployedBytecode.Object)
env.StateDB.SetState(addrs.RISCV, common.Hash{}, common.BytesToHash(addrs.Oracle.Bytes())) // set storage slot pointing to preimage oracle
Expand Down
2 changes: 1 addition & 1 deletion rvsol/scripts/Deploy_Stage_1_4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ contract Deploy is Deployer, StdAssertions {
// `DisputeGameFactory` implementation alongside dependent contracts, which are always proxies.
Types.ContractSet memory contracts = _proxiesUnstrict();
contracts.DisputeGameFactory = address(factory);
ChainAssertions.checkDisputeGameFactory({ _contracts: contracts, _expectedOwner: address(0) });
ChainAssertions.checkDisputeGameFactory({ _contracts: contracts, _expectedOwner: address(0), _isProxy: true });

addr_ = address(factory);
}
Expand Down
3 changes: 2 additions & 1 deletion rvsol/test/RISCV.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity 0.8.15;

import { Test } from "@forge-std/Test.sol";
import { RISCV } from "src/RISCV.sol";
import { IPreimageOracle } from "@optimism/src/cannon/interfaces/IPreimageOracle.sol";
import { PreimageOracle } from "@optimism/src/cannon/PreimageOracle.sol";
import { CommonTest } from "./CommonTest.sol";
import "@optimism/src/dispute/lib/Types.sol";
Expand Down Expand Up @@ -31,7 +32,7 @@ contract RISCV_Test is CommonTest {
function setUp() public virtual override {
super.setUp();
oracle = new PreimageOracle(0, 0);
riscv = new RISCV(oracle);
riscv = new RISCV(IPreimageOracle(address(oracle)));
vm.store(address(riscv), 0x0, bytes32(abi.encode(address(oracle))));
vm.label(address(oracle), "PreimageOracle");
vm.label(address(riscv), "RISCV");
Expand Down

0 comments on commit ef702e6

Please sign in to comment.