Commit a92e4c3f authored by elenadimitrova's avatar elenadimitrova Committed by Kelvin Fichter

Removing generic OVM prefixes

parent f5a3cfd8
...@@ -13,7 +13,7 @@ export const initWatcher = async ( ...@@ -13,7 +13,7 @@ export const initWatcher = async (
AddressManager: Contract AddressManager: Contract
) => { ) => {
const l1MessengerAddress = await AddressManager.getAddress( const l1MessengerAddress = await AddressManager.getAddress(
'Proxy__OVM_L1CrossDomainMessenger' 'Proxy__L1CrossDomainMessenger'
) )
const l2MessengerAddress = await AddressManager.getAddress( const l2MessengerAddress = await AddressManager.getAddress(
'L2CrossDomainMessenger' 'L2CrossDomainMessenger'
......
...@@ -29,7 +29,7 @@ if [ $L1_STANDARD_BRIDGE_ADDRESS == null ]; then ...@@ -29,7 +29,7 @@ if [ $L1_STANDARD_BRIDGE_ADDRESS == null ]; then
envSet L1_STANDARD_BRIDGE_ADDRESS L1StandardBridge envSet L1_STANDARD_BRIDGE_ADDRESS L1StandardBridge
fi fi
envSet L1_CROSS_DOMAIN_MESSENGER_ADDRESS Proxy__OVM_L1CrossDomainMessenger envSet L1_CROSS_DOMAIN_MESSENGER_ADDRESS Proxy__L1CrossDomainMessenger
if [ $L1_CROSS_DOMAIN_MESSENGER_ADDRESS == null ]; then if [ $L1_CROSS_DOMAIN_MESSENGER_ADDRESS == null ]; then
envSet L1_CROSS_DOMAIN_MESSENGER_ADDRESS L1CrossDomainMessenger envSet L1_CROSS_DOMAIN_MESSENGER_ADDRESS L1CrossDomainMessenger
fi fi
......
...@@ -88,7 +88,7 @@ describe('BatchSubmitter', () => { ...@@ -88,7 +88,7 @@ describe('BatchSubmitter', () => {
let AddressManager: Contract let AddressManager: Contract
let Mock__OVM_ExecutionManager: MockContract let Mock__OVM_ExecutionManager: MockContract
let Mock__OVM_BondManager: MockContract let Mock__BondManager: MockContract
let Mock__StateCommitmentChain: MockContract let Mock__StateCommitmentChain: MockContract
before(async () => { before(async () => {
AddressManager = await makeAddressManager() AddressManager = await makeAddressManager()
...@@ -101,8 +101,8 @@ describe('BatchSubmitter', () => { ...@@ -101,8 +101,8 @@ describe('BatchSubmitter', () => {
await getContractFactory('OVM_ExecutionManager') await getContractFactory('OVM_ExecutionManager')
) )
Mock__OVM_BondManager = await smockit( Mock__BondManager = await smockit(
await getContractFactory('OVM_BondManager') await getContractFactory('BondManager')
) )
Mock__StateCommitmentChain = await smockit( Mock__StateCommitmentChain = await smockit(
...@@ -117,8 +117,8 @@ describe('BatchSubmitter', () => { ...@@ -117,8 +117,8 @@ describe('BatchSubmitter', () => {
await setProxyTarget( await setProxyTarget(
AddressManager, AddressManager,
'OVM_BondManager', 'BondManager',
Mock__OVM_BondManager Mock__BondManager
) )
await setProxyTarget( await setProxyTarget(
...@@ -131,7 +131,7 @@ describe('BatchSubmitter', () => { ...@@ -131,7 +131,7 @@ describe('BatchSubmitter', () => {
Mock__OVM_ExecutionManager.smocked.getMaxTransactionGasLimit.will.return.with( Mock__OVM_ExecutionManager.smocked.getMaxTransactionGasLimit.will.return.with(
MAX_GAS_LIMIT MAX_GAS_LIMIT
) )
Mock__OVM_BondManager.smocked.isCollateralized.will.return.with(true) Mock__BondManager.smocked.isCollateralized.will.return.with(true)
}) })
let Factory__CanonicalTransactionChain: ContractFactory let Factory__CanonicalTransactionChain: ContractFactory
......
...@@ -16,7 +16,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -16,7 +16,7 @@ const deployFn: DeployFunction = async (hre) => {
} }
) )
const result = await deploy('Proxy__OVM_L1CrossDomainMessenger', { const result = await deploy('Proxy__L1CrossDomainMessenger', {
contract: 'Lib_ResolvedDelegateProxy', contract: 'Lib_ResolvedDelegateProxy',
from: deployer, from: deployer,
args: [Lib_AddressManager.address, 'L1CrossDomainMessenger'], args: [Lib_AddressManager.address, 'L1CrossDomainMessenger'],
...@@ -27,23 +27,23 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -27,23 +27,23 @@ const deployFn: DeployFunction = async (hre) => {
return return
} }
const Proxy__OVM_L1CrossDomainMessenger = await getDeployedContract( const Proxy__L1CrossDomainMessenger = await getDeployedContract(
hre, hre,
'Proxy__OVM_L1CrossDomainMessenger', 'Proxy__L1CrossDomainMessenger',
{ {
signerOrProvider: deployer, signerOrProvider: deployer,
iface: 'L1CrossDomainMessenger', iface: 'L1CrossDomainMessenger',
} }
) )
await Proxy__OVM_L1CrossDomainMessenger.initialize(Lib_AddressManager.address) await Proxy__L1CrossDomainMessenger.initialize(Lib_AddressManager.address)
const libAddressManager = const libAddressManager =
await Proxy__OVM_L1CrossDomainMessenger.libAddressManager() await Proxy__L1CrossDomainMessenger.libAddressManager()
if (libAddressManager !== Lib_AddressManager.address) { if (libAddressManager !== Lib_AddressManager.address) {
throw new Error( throw new Error(
`\n**FATAL ERROR. THIS SHOULD NEVER HAPPEN. CHECK YOUR DEPLOYMENT.**:\n` + `\n**FATAL ERROR. THIS SHOULD NEVER HAPPEN. CHECK YOUR DEPLOYMENT.**:\n` +
`Proxy__OVM_L1CrossDomainMessenger could not be succesfully initialized.\n` + `Proxy__L1CrossDomainMessenger could not be succesfully initialized.\n` +
`Attempted to set Lib_AddressManager to: ${Lib_AddressManager.address}\n` + `Attempted to set Lib_AddressManager to: ${Lib_AddressManager.address}\n` +
`Actual address after initialization: ${libAddressManager}\n` + `Actual address after initialization: ${libAddressManager}\n` +
`This could indicate a compromised deployment.` `This could indicate a compromised deployment.`
...@@ -51,12 +51,12 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -51,12 +51,12 @@ const deployFn: DeployFunction = async (hre) => {
} }
await Lib_AddressManager.setAddress( await Lib_AddressManager.setAddress(
'Proxy__OVM_L1CrossDomainMessenger', 'Proxy__L1CrossDomainMessenger',
result.address result.address
) )
} }
deployFn.dependencies = ['Lib_AddressManager', 'L1CrossDomainMessenger'] deployFn.dependencies = ['Lib_AddressManager', 'L1CrossDomainMessenger']
deployFn.tags = ['Proxy__OVM_L1CrossDomainMessenger'] deployFn.tags = ['Proxy__L1CrossDomainMessenger']
export default deployFn export default deployFn
...@@ -58,7 +58,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -58,7 +58,7 @@ const deployFn: DeployFunction = async (hre) => {
// Set slot 0 to the L1 Messenger Address // Set slot 0 to the L1 Messenger Address
const l1MessengerAddress = await Lib_AddressManager.getAddress( const l1MessengerAddress = await Lib_AddressManager.getAddress(
'Proxy__OVM_L1CrossDomainMessenger' 'Proxy__L1CrossDomainMessenger'
) )
await Proxy__WithChugSplashInterface.setStorage( await Proxy__WithChugSplashInterface.setStorage(
hre.ethers.constants.HashZero, hre.ethers.constants.HashZero,
......
...@@ -67,7 +67,7 @@ export const connectL1Contracts = async ( ...@@ -67,7 +67,7 @@ export const connectL1Contracts = async (
), ),
stateCommitmentChain: getEthersContract('StateCommitmentChain'), stateCommitmentChain: getEthersContract('StateCommitmentChain'),
xDomainMessengerProxy: getEthersContract( xDomainMessengerProxy: getEthersContract(
'Proxy__OVM_L1CrossDomainMessenger' 'Proxy__L1CrossDomainMessenger'
), ),
bondManager: getEthersContract('mockBondManager'), bondManager: getEthersContract('mockBondManager'),
} }
......
...@@ -57,7 +57,7 @@ describe('L1CrossDomainMessenger', () => { ...@@ -57,7 +57,7 @@ describe('L1CrossDomainMessenger', () => {
let Factory__CanonicalTransactionChain: ContractFactory let Factory__CanonicalTransactionChain: ContractFactory
let Factory__ChainStorageContainer: ContractFactory let Factory__ChainStorageContainer: ContractFactory
let Factory__OVM_L1CrossDomainMessenger: ContractFactory let Factory__L1CrossDomainMessenger: ContractFactory
let CanonicalTransactionChain: Contract let CanonicalTransactionChain: Contract
before(async () => { before(async () => {
...@@ -93,7 +93,7 @@ describe('L1CrossDomainMessenger', () => { ...@@ -93,7 +93,7 @@ describe('L1CrossDomainMessenger', () => {
'ChainStorageContainer' 'ChainStorageContainer'
) )
Factory__OVM_L1CrossDomainMessenger = await ethers.getContractFactory( Factory__L1CrossDomainMessenger = await ethers.getContractFactory(
'L1CrossDomainMessenger' 'L1CrossDomainMessenger'
) )
CanonicalTransactionChain = CanonicalTransactionChain =
...@@ -132,7 +132,7 @@ describe('L1CrossDomainMessenger', () => { ...@@ -132,7 +132,7 @@ describe('L1CrossDomainMessenger', () => {
let L1CrossDomainMessenger: Contract let L1CrossDomainMessenger: Contract
beforeEach(async () => { beforeEach(async () => {
const xDomainMessengerImpl = const xDomainMessengerImpl =
await Factory__OVM_L1CrossDomainMessenger.deploy() await Factory__L1CrossDomainMessenger.deploy()
// We use an upgradable proxy for the XDomainMessenger--deploy & set up the proxy. // We use an upgradable proxy for the XDomainMessenger--deploy & set up the proxy.
L1CrossDomainMessenger = await deployProxyXDomainMessenger( L1CrossDomainMessenger = await deployProxyXDomainMessenger(
AddressManager, AddressManager,
...@@ -519,14 +519,14 @@ describe('L1CrossDomainMessenger', () => { ...@@ -519,14 +519,14 @@ describe('L1CrossDomainMessenger', () => {
describe('blockMessage and allowMessage', () => { describe('blockMessage and allowMessage', () => {
it('should revert if called by an account other than the owner', async () => { it('should revert if called by an account other than the owner', async () => {
const OVM_L1CrossDomainMessenger2 = const L1CrossDomainMessenger2 =
L1CrossDomainMessenger.connect(signer2) L1CrossDomainMessenger.connect(signer2)
await expect( await expect(
OVM_L1CrossDomainMessenger2.blockMessage(keccak256(calldata)) L1CrossDomainMessenger2.blockMessage(keccak256(calldata))
).to.be.revertedWith('Ownable: caller is not the owner') ).to.be.revertedWith('Ownable: caller is not the owner')
await expect( await expect(
OVM_L1CrossDomainMessenger2.allowMessage(keccak256(calldata)) L1CrossDomainMessenger2.allowMessage(keccak256(calldata))
).to.be.revertedWith('Ownable: caller is not the owner') ).to.be.revertedWith('Ownable: caller is not the owner')
}) })
......
...@@ -53,10 +53,10 @@ describe('L1StandardBridge', () => { ...@@ -53,10 +53,10 @@ describe('L1StandardBridge', () => {
let L1ERC20: Contract let L1ERC20: Contract
let L1StandardBridge: Contract let L1StandardBridge: Contract
let Mock__OVM_L1CrossDomainMessenger: MockContract let Mock__L1CrossDomainMessenger: MockContract
beforeEach(async () => { beforeEach(async () => {
// Get a new mock L1 messenger // Get a new mock L1 messenger
Mock__OVM_L1CrossDomainMessenger = await smockit( Mock__L1CrossDomainMessenger = await smockit(
await ethers.getContractFactory('L1CrossDomainMessenger'), await ethers.getContractFactory('L1CrossDomainMessenger'),
{ address: await l1MessengerImpersonator.getAddress() } // This allows us to use an ethers override {from: Mock__L2CrossDomainMessenger.address} to mock calls { address: await l1MessengerImpersonator.getAddress() } // This allows us to use an ethers override {from: Mock__L2CrossDomainMessenger.address} to mock calls
) )
...@@ -66,7 +66,7 @@ describe('L1StandardBridge', () => { ...@@ -66,7 +66,7 @@ describe('L1StandardBridge', () => {
await ethers.getContractFactory('L1StandardBridge') await ethers.getContractFactory('L1StandardBridge')
).deploy() ).deploy()
await L1StandardBridge.initialize( await L1StandardBridge.initialize(
Mock__OVM_L1CrossDomainMessenger.address, Mock__L1CrossDomainMessenger.address,
DUMMY_L2_BRIDGE_ADDRESS DUMMY_L2_BRIDGE_ADDRESS
) )
...@@ -108,7 +108,7 @@ describe('L1StandardBridge', () => { ...@@ -108,7 +108,7 @@ describe('L1StandardBridge', () => {
) )
const depositCallToMessenger = const depositCallToMessenger =
Mock__OVM_L1CrossDomainMessenger.smocked.sendMessage.calls[0] Mock__L1CrossDomainMessenger.smocked.sendMessage.calls[0]
const depositerBalance = await ethers.provider.getBalance(depositer) const depositerBalance = await ethers.provider.getBalance(depositer)
...@@ -153,7 +153,7 @@ describe('L1StandardBridge', () => { ...@@ -153,7 +153,7 @@ describe('L1StandardBridge', () => {
} }
) )
const depositCallToMessenger = const depositCallToMessenger =
Mock__OVM_L1CrossDomainMessenger.smocked.sendMessage.calls[0] Mock__L1CrossDomainMessenger.smocked.sendMessage.calls[0]
const depositerBalance = await ethers.provider.getBalance(aliceAddress) const depositerBalance = await ethers.provider.getBalance(aliceAddress)
expect(depositerBalance).to.equal(initialBalance.sub(depositAmount)) expect(depositerBalance).to.equal(initialBalance.sub(depositAmount))
...@@ -214,11 +214,11 @@ describe('L1StandardBridge', () => { ...@@ -214,11 +214,11 @@ describe('L1StandardBridge', () => {
await ethers.getContractFactory('L1StandardBridge') await ethers.getContractFactory('L1StandardBridge')
).deploy() ).deploy()
await L1StandardBridge.initialize( await L1StandardBridge.initialize(
Mock__OVM_L1CrossDomainMessenger.address, Mock__L1CrossDomainMessenger.address,
DUMMY_L2_BRIDGE_ADDRESS DUMMY_L2_BRIDGE_ADDRESS
) )
Mock__OVM_L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with( Mock__L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with(
'0x' + '22'.repeat(20) '0x' + '22'.repeat(20)
) )
...@@ -229,7 +229,7 @@ describe('L1StandardBridge', () => { ...@@ -229,7 +229,7 @@ describe('L1StandardBridge', () => {
1, 1,
NON_NULL_BYTES32, NON_NULL_BYTES32,
{ {
from: Mock__OVM_L1CrossDomainMessenger.address, from: Mock__L1CrossDomainMessenger.address,
} }
) )
).to.be.revertedWith(ERR_INVALID_X_DOMAIN_MSG_SENDER) ).to.be.revertedWith(ERR_INVALID_X_DOMAIN_MSG_SENDER)
...@@ -240,7 +240,7 @@ describe('L1StandardBridge', () => { ...@@ -240,7 +240,7 @@ describe('L1StandardBridge', () => {
expect(await ethers.provider.getBalance(NON_ZERO_ADDRESS)).to.be.equal(0) expect(await ethers.provider.getBalance(NON_ZERO_ADDRESS)).to.be.equal(0)
const withdrawalAmount = 100 const withdrawalAmount = 100
Mock__OVM_L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with( Mock__L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with(
() => DUMMY_L2_BRIDGE_ADDRESS () => DUMMY_L2_BRIDGE_ADDRESS
) )
...@@ -260,7 +260,7 @@ describe('L1StandardBridge', () => { ...@@ -260,7 +260,7 @@ describe('L1StandardBridge', () => {
withdrawalAmount, withdrawalAmount,
NON_NULL_BYTES32, NON_NULL_BYTES32,
{ {
from: Mock__OVM_L1CrossDomainMessenger.address, from: Mock__L1CrossDomainMessenger.address,
} }
) )
...@@ -291,7 +291,7 @@ describe('L1StandardBridge', () => { ...@@ -291,7 +291,7 @@ describe('L1StandardBridge', () => {
) )
const depositCallToMessenger = const depositCallToMessenger =
Mock__OVM_L1CrossDomainMessenger.smocked.sendMessage.calls[0] Mock__L1CrossDomainMessenger.smocked.sendMessage.calls[0]
const depositerBalance = await L1ERC20.balanceOf(aliceAddress) const depositerBalance = await L1ERC20.balanceOf(aliceAddress)
...@@ -333,7 +333,7 @@ describe('L1StandardBridge', () => { ...@@ -333,7 +333,7 @@ describe('L1StandardBridge', () => {
NON_NULL_BYTES32 NON_NULL_BYTES32
) )
const depositCallToMessenger = const depositCallToMessenger =
Mock__OVM_L1CrossDomainMessenger.smocked.sendMessage.calls[0] Mock__L1CrossDomainMessenger.smocked.sendMessage.calls[0]
const depositerBalance = await L1ERC20.balanceOf(aliceAddress) const depositerBalance = await L1ERC20.balanceOf(aliceAddress)
expect(depositerBalance).to.equal(INITIAL_TOTAL_L1_SUPPLY - depositAmount) expect(depositerBalance).to.equal(INITIAL_TOTAL_L1_SUPPLY - depositAmount)
...@@ -476,7 +476,7 @@ describe('L1StandardBridge', () => { ...@@ -476,7 +476,7 @@ describe('L1StandardBridge', () => {
}) })
it('onlyFromCrossDomainAccount: should revert on calls from the right crossDomainMessenger, but wrong xDomainMessageSender (ie. not the L2DepositedERC20)', async () => { it('onlyFromCrossDomainAccount: should revert on calls from the right crossDomainMessenger, but wrong xDomainMessageSender (ie. not the L2DepositedERC20)', async () => {
Mock__OVM_L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with( Mock__L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with(
'0x' + '22'.repeat(20) '0x' + '22'.repeat(20)
) )
...@@ -489,7 +489,7 @@ describe('L1StandardBridge', () => { ...@@ -489,7 +489,7 @@ describe('L1StandardBridge', () => {
1, 1,
NON_NULL_BYTES32, NON_NULL_BYTES32,
{ {
from: Mock__OVM_L1CrossDomainMessenger.address, from: Mock__L1CrossDomainMessenger.address,
} }
) )
).to.be.revertedWith(ERR_INVALID_X_DOMAIN_MSG_SENDER) ).to.be.revertedWith(ERR_INVALID_X_DOMAIN_MSG_SENDER)
...@@ -518,7 +518,7 @@ describe('L1StandardBridge', () => { ...@@ -518,7 +518,7 @@ describe('L1StandardBridge', () => {
// make sure no balance at start of test // make sure no balance at start of test
expect(await L1ERC20.balanceOf(NON_ZERO_ADDRESS)).to.be.equal(0) expect(await L1ERC20.balanceOf(NON_ZERO_ADDRESS)).to.be.equal(0)
Mock__OVM_L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with( Mock__L1CrossDomainMessenger.smocked.xDomainMessageSender.will.return.with(
() => DUMMY_L2_BRIDGE_ADDRESS () => DUMMY_L2_BRIDGE_ADDRESS
) )
...@@ -529,7 +529,7 @@ describe('L1StandardBridge', () => { ...@@ -529,7 +529,7 @@ describe('L1StandardBridge', () => {
NON_ZERO_ADDRESS, NON_ZERO_ADDRESS,
withdrawalAmount, withdrawalAmount,
NON_NULL_BYTES32, NON_NULL_BYTES32,
{ from: Mock__OVM_L1CrossDomainMessenger.address } { from: Mock__L1CrossDomainMessenger.address }
) )
expect(await L1ERC20.balanceOf(NON_ZERO_ADDRESS)).to.be.equal( expect(await L1ERC20.balanceOf(NON_ZERO_ADDRESS)).to.be.equal(
......
...@@ -22,14 +22,14 @@ describe('L2CrossDomainMessenger', () => { ...@@ -22,14 +22,14 @@ describe('L2CrossDomainMessenger', () => {
}) })
let Mock__TargetContract: MockContract let Mock__TargetContract: MockContract
let Mock__OVM_L1CrossDomainMessenger: MockContract let Mock__L1CrossDomainMessenger: MockContract
let Mock__OVM_L1MessageSender: MockContract let Mock__OVM_L1MessageSender: MockContract
let Mock__OVM_L2ToL1MessagePasser: MockContract let Mock__OVM_L2ToL1MessagePasser: MockContract
before(async () => { before(async () => {
Mock__TargetContract = await smockit( Mock__TargetContract = await smockit(
await ethers.getContractFactory('Helper_SimpleProxy') await ethers.getContractFactory('Helper_SimpleProxy')
) )
Mock__OVM_L1CrossDomainMessenger = await smockit( Mock__L1CrossDomainMessenger = await smockit(
await ethers.getContractFactory('L1CrossDomainMessenger') await ethers.getContractFactory('L1CrossDomainMessenger')
) )
Mock__OVM_L1MessageSender = await smockit( Mock__OVM_L1MessageSender = await smockit(
...@@ -53,7 +53,7 @@ describe('L2CrossDomainMessenger', () => { ...@@ -53,7 +53,7 @@ describe('L2CrossDomainMessenger', () => {
beforeEach(async () => { beforeEach(async () => {
L2CrossDomainMessenger = L2CrossDomainMessenger =
await Factory__L2CrossDomainMessenger.deploy( await Factory__L2CrossDomainMessenger.deploy(
Mock__OVM_L1CrossDomainMessenger.address Mock__L1CrossDomainMessenger.address
) )
}) })
...@@ -97,7 +97,7 @@ describe('L2CrossDomainMessenger', () => { ...@@ -97,7 +97,7 @@ describe('L2CrossDomainMessenger', () => {
beforeEach(async () => { beforeEach(async () => {
Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with( Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with(
Mock__OVM_L1CrossDomainMessenger.address Mock__L1CrossDomainMessenger.address
) )
}) })
...@@ -131,7 +131,7 @@ describe('L2CrossDomainMessenger', () => { ...@@ -131,7 +131,7 @@ describe('L2CrossDomainMessenger', () => {
it('should revert if trying to send the same message twice', async () => { it('should revert if trying to send the same message twice', async () => {
Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with( Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with(
Mock__OVM_L1CrossDomainMessenger.address Mock__L1CrossDomainMessenger.address
) )
await L2CrossDomainMessenger.relayMessage(target, sender, message, 0) await L2CrossDomainMessenger.relayMessage(target, sender, message, 0)
...@@ -143,7 +143,7 @@ describe('L2CrossDomainMessenger', () => { ...@@ -143,7 +143,7 @@ describe('L2CrossDomainMessenger', () => {
it('should not make a call if the target is the L2 MessagePasser', async () => { it('should not make a call if the target is the L2 MessagePasser', async () => {
Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with( Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with(
Mock__OVM_L1CrossDomainMessenger.address Mock__L1CrossDomainMessenger.address
) )
target = predeploys.OVM_L2ToL1MessagePasser target = predeploys.OVM_L2ToL1MessagePasser
message = Mock__OVM_L2ToL1MessagePasser.interface.encodeFunctionData( message = Mock__OVM_L2ToL1MessagePasser.interface.encodeFunctionData(
...@@ -184,7 +184,7 @@ describe('L2CrossDomainMessenger', () => { ...@@ -184,7 +184,7 @@ describe('L2CrossDomainMessenger', () => {
it('should revert if trying to reenter `relayMessage`', async () => { it('should revert if trying to reenter `relayMessage`', async () => {
Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with( Mock__OVM_L1MessageSender.smocked.getL1MessageSender.will.return.with(
Mock__OVM_L1CrossDomainMessenger.address Mock__L1CrossDomainMessenger.address
) )
const reentrantMessage = const reentrantMessage =
......
...@@ -111,7 +111,7 @@ export class MessageRelayerService extends BaseService<MessageRelayerOptions> { ...@@ -111,7 +111,7 @@ export class MessageRelayerService extends BaseService<MessageRelayerOptions> {
this.logger.info('Connecting to L1CrossDomainMessenger...') this.logger.info('Connecting to L1CrossDomainMessenger...')
this.state.L1CrossDomainMessenger = await loadContractFromManager({ this.state.L1CrossDomainMessenger = await loadContractFromManager({
name: 'L1CrossDomainMessenger', name: 'L1CrossDomainMessenger',
proxy: 'Proxy__OVM_L1CrossDomainMessenger', proxy: 'Proxy__L1CrossDomainMessenger',
Lib_AddressManager: this.state.Lib_AddressManager, Lib_AddressManager: this.state.Lib_AddressManager,
provider: this.options.l1RpcProvider, provider: this.options.l1RpcProvider,
}) })
......
...@@ -40,7 +40,7 @@ describe('relay transaction generation functions', () => { ...@@ -40,7 +40,7 @@ describe('relay transaction generation functions', () => {
const factory2 = getContractFactory('ChainStorageContainer') const factory2 = getContractFactory('ChainStorageContainer')
const factory3 = getContractFactory('StateCommitmentChain') const factory3 = getContractFactory('StateCommitmentChain')
const mockBondManager = await smockit(getContractFactory('OVM_BondManager')) const mockBondManager = await smockit(getContractFactory('BondManager'))
const mockCanonicalTransactionChain = await smockit( const mockCanonicalTransactionChain = await smockit(
getContractFactory('CanonicalTransactionChain') getContractFactory('CanonicalTransactionChain')
) )
...@@ -68,7 +68,7 @@ describe('relay transaction generation functions', () => { ...@@ -68,7 +68,7 @@ describe('relay transaction generation functions', () => {
StateCommitmentChain.address StateCommitmentChain.address
) )
await AddressManager.setAddress('OVM_BondManager', mockBondManager.address) await AddressManager.setAddress('BondManager', mockBondManager.address)
await AddressManager.setAddress( await AddressManager.setAddress(
'CanonicalTransactionChain', 'CanonicalTransactionChain',
......
...@@ -31,7 +31,7 @@ This bond will be slashed in the event of a successful fraud proof on a state ro ...@@ -31,7 +31,7 @@ This bond will be slashed in the event of a successful fraud proof on a state ro
### Roles ### Roles
- Process transactions from the CTC, and propose new state roots by posting them to the SCC. - Process transactions from the CTC, and propose new state roots by posting them to the SCC.
- MUST be collateralized by depositing a bond to the `OVM_BondManager` . - MUST be collateralized by depositing a bond to the `BondManager` .
**Future note:** The Proposer is currently identical to the Sequencer. This is expected to change. **Future note:** The Proposer is currently identical to the Sequencer. This is expected to change.
......
...@@ -261,7 +261,7 @@ The logic of `appendStateBatch()` will compute the Merkle root of the batches an ...@@ -261,7 +261,7 @@ The logic of `appendStateBatch()` will compute the Merkle root of the batches an
##### `appendStateBatch()` requirements ##### `appendStateBatch()` requirements
- The batch may not be empty, at least one new state root must be added - The batch may not be empty, at least one new state root must be added
- The `OVM_BondManager.isCollateralized(msg.sender)` must return `true` - The `BondManager.isCollateralized(msg.sender)` must return `true`
- The resulting number of elements in the SCC (ie. all state commitments, not batches) must be less than or equal to the number of elements (ie. transactions) in the CTC. - The resulting number of elements in the SCC (ie. all state commitments, not batches) must be less than or equal to the number of elements (ie. transactions) in the CTC.
#### Deleting batches from the SCC #### Deleting batches from the SCC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment