diff --git a/packages/ovm/src/contracts/ExecutionManager.sol b/packages/ovm/src/contracts/ExecutionManager.sol index 2ba0d0f6c2d8..03efcfd0d67b 100644 --- a/packages/ovm/src/contracts/ExecutionManager.sol +++ b/packages/ovm/src/contracts/ExecutionManager.sol @@ -24,7 +24,6 @@ contract ExecutionManager is FullStateManager { // bitwise right shift 28 * 8 bits so the 4 method ID bytes are in the right-most bytes bytes32 constant ovmCallMethodId = keccak256("ovmCALL()") >> 224; bytes32 constant ovmCreateMethodId = keccak256("ovmCREATE()") >> 224; - bytes32 constant executeCallMethodId = keccak256("executeCall()") >> 224; // Precompile addresses address constant l2ToL1MessagePasserOvmAddress = 0x4200000000000000000000000000000000000000; @@ -106,7 +105,7 @@ contract ExecutionManager is FullStateManager { } /** - * @notice Execute a call which will return the result of the call instead of the updated storage. + * @notice Execute a transaction which will return the result of the call instead of the updated storage. * Note: This should only be used with a Web3 `call` operation, otherwise you may accidentally save changes to the state. * Note: This is a raw function, so there are no listed (ABI-encoded) inputs / outputs. * Below format of the bytes expected as input and written as output: @@ -118,52 +117,37 @@ contract ExecutionManager is FullStateManager { * [callBytes (bytes (variable length))] * returndata: [variable-length bytes returned from call] */ - function executeCall() external { + function executeTransactionRaw() external { uint _timestamp; uint _queueOrigin; - uint callSize; + uint _callSize; bytes memory callBytes; - bytes32 methodId = ovmCallMethodId; + address _ovmEntrypoint; assembly { - // Revert if we don't have methodId, timestamp, queueOrigin, and ovmEntrypointAddress. - if lt(calldatasize, 100) { - revert(0,0) - } - // populate timestamp and queue origin from calldata - _timestamp := calldataload(4) + _timestamp := calldataload(0x04) // skip method ID (bytes4) and timestamp (bytes32) _queueOrigin := calldataload(0x24) callBytes := mload(0x40) // set callsize: total param size minus 2 uints (methodId bytes are repurposed) - callSize := sub(calldatasize, 0x40) - mstore(0x40, add(callBytes, callSize)) - - // leave room for method ID, skip ahead in calldata methodID(4), timestamp(32), queueOrigin(32) - calldatacopy(add(callBytes, 4), 0x44, sub(callSize, 4)) - - mstore8(callBytes, shr(24, methodId)) - mstore8(add(callBytes, 1), shr(16, methodId)) - mstore8(add(callBytes, 2), shr(8, methodId)) - mstore8(add(callBytes, 3), methodId) - } - - // Initialize our context - initializeContext(_timestamp, _queueOrigin, ZERO_ADDRESS, ZERO_ADDRESS); - - address addr = address(this); - assembly { - let success := call(gas, addr, 0, callBytes, callSize, 0, 0) - let result := mload(0x40) - returndatacopy(result, 0, returndatasize) - - if eq(success, 0) { - revert(result, returndatasize) - } + _callSize := sub(calldatasize, 0x40) + mstore(0x40, add(callBytes, _callSize)) - return(result, returndatasize) + _ovmEntrypoint := calldataload(0x44) + calldatacopy(add(callBytes, 0x20), 0x64, sub(_callSize, 0x04)) + mstore(callBytes, sub(_callSize, 0x20)) } + + return executeTransaction( + _timestamp, + _queueOrigin, + _ovmEntrypoint, + callBytes, + ZERO_ADDRESS, + ZERO_ADDRESS, + true + ); } /******************** @@ -201,11 +185,11 @@ contract ExecutionManager is FullStateManager { require(_nonce == getOvmContractNonce(eoaAddress), "Incorrect nonce!"); emit CallingWithEOA(eoaAddress); // Make the EOA call for the account - executeUnsignedEOACall(_timestamp, _queueOrigin, _ovmEntrypoint, _callBytes, eoaAddress, ZERO_ADDRESS, false); + executeTransaction(_timestamp, _queueOrigin, _ovmEntrypoint, _callBytes, eoaAddress, ZERO_ADDRESS, false); } /** - * @notice Execute an unsigned EOA call. Note that unsigned EOA calls are unauthenticated. + * @notice Execute an unsigned EOA transaction. Note that unsigned EOA calls are unauthenticated. * This means that they should not be allowed for normal execution. * @param _timestamp The timestamp which should be used for this call's context. * @param _queueOrigin The parent-chain queue from which this call originated. @@ -214,7 +198,7 @@ contract ExecutionManager is FullStateManager { * @param _fromAddress The address which this call should originate from--the msg.sender. * @param _allowRevert Flag which controls whether or not to revert in the case of failure. */ - function executeUnsignedEOACall( + function executeTransaction( uint _timestamp, uint _queueOrigin, address _ovmEntrypoint, diff --git a/packages/ovm/test/contracts/execution-manager.call-opcodes.spec.ts b/packages/ovm/test/contracts/execution-manager.call-opcodes.spec.ts index 923dc62a1cef..c964264abac3 100644 --- a/packages/ovm/test/contracts/execution-manager.call-opcodes.spec.ts +++ b/packages/ovm/test/contracts/execution-manager.call-opcodes.spec.ts @@ -42,7 +42,7 @@ const log = getLogger('execution-manager-calls', true) const methodIds = fromPairs( [ - 'executeCall', + 'executeTransactionRaw', 'makeCall', 'makeStaticCall', 'makeStaticCallThenCall', @@ -124,11 +124,11 @@ describe('Execution Manager -- Call opcodes', () => { describe('ovmCALL', async () => { it('properly executes ovmCALL to SLOAD', async () => { - const result: string = await executeCall([ - addressToBytes32Address(callContract2Address), + const result: string = await executeTransaction( + callContractAddress, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result: [${result}]`) remove0x(result).should.equal(unpopultedSLOADResult, 'Result mismatch!') @@ -136,7 +136,7 @@ describe('Execution Manager -- Call opcodes', () => { it('properly executes ovmCALL to SSTORE', async () => { const data: string = - encodeMethodId('executeCall') + + encodeMethodId('executeTransactionRaw') + encodeRawArguments([ getCurrentTime(), 0, @@ -155,11 +155,11 @@ describe('Execution Manager -- Call opcodes', () => { gasLimit, }) - const result: string = await executeCall([ - addressToBytes32Address(callContract2Address), + const result: string = await executeTransaction( + callContract2Address, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result: [${result}]`) @@ -168,11 +168,11 @@ describe('Execution Manager -- Call opcodes', () => { }) it('properly executes ovmCALL to CREATE', async () => { - const result: string = await executeCall([ - addressToBytes32Address(callContract2Address), + const result: string = await executeTransaction( + callContract2Address, methodIds.notStaticFriendlyCREATE, - deployTx.data, - ]) + [deployTx.data] + ) log.debug(`RESULT: ${result}`) @@ -185,12 +185,11 @@ describe('Execution Manager -- Call opcodes', () => { }) it('properly executes ovmCALL to CREATE2', async () => { - const result: string = await executeCall([ - addressToBytes32Address(callContract2Address), + const result: string = await executeTransaction( + callContract2Address, methodIds.notStaticFriendlyCREATE2, - 0, - deployTx.data, - ]) + [0, deployTx.data] + ) log.debug(`RESULT: ${result}`) @@ -206,7 +205,7 @@ describe('Execution Manager -- Call opcodes', () => { describe('ovmDELEGATECALL', async () => { it('properly executes ovmDELEGATECALL to SSTORE', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -226,11 +225,11 @@ describe('Execution Manager -- Call opcodes', () => { }) // Stored in contract 2 via delegate call but accessed via contract 1 - const result: string = await executeCall([ - addressToBytes32Address(callContractAddress), + const result: string = await executeTransaction( + callContractAddress, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result: [${result}]`) // Should have stored result @@ -239,11 +238,11 @@ describe('Execution Manager -- Call opcodes', () => { 'SLOAD should yield stored result!' ) - const contract2Result: string = await executeCall([ + const contract2Result: string = await executeTransaction( addressToBytes32Address(callContract2Address), methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result: [${contract2Result}]`) @@ -257,7 +256,7 @@ describe('Execution Manager -- Call opcodes', () => { it('properly executes nested ovmDELEGATECALLs to SSTORE', async () => { // contract 1 delegate calls contract 2 delegate calls contract 3 const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -278,11 +277,11 @@ describe('Execution Manager -- Call opcodes', () => { gasLimit, }) - const contract1Result: string = await executeCall([ - addressToBytes32Address(callContractAddress), + const contract1Result: string = await executeTransaction( + callContractAddress, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result 1: [${contract1Result}]`) @@ -292,11 +291,11 @@ describe('Execution Manager -- Call opcodes', () => { 'SLOAD should yield stored data!' ) - const contract2Result: string = await executeCall([ - addressToBytes32Address(callContract2Address), + const contract2Result: string = await executeTransaction( + callContract2Address, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result 2: [${contract2Result}]`) @@ -306,11 +305,11 @@ describe('Execution Manager -- Call opcodes', () => { 'SLOAD should not yield any data (0 x 32 bytes)!' ) - const contract3Result: string = await executeCall([ - addressToBytes32Address(callContract3Address), + const contract3Result: string = await executeTransaction( + callContract3Address, methodIds.staticFriendlySLOAD, - sloadKey, - ]) + [sloadKey] + ) log.debug(`Result 3: [${contract3Result}]`) @@ -324,15 +323,19 @@ describe('Execution Manager -- Call opcodes', () => { describe('ovmSTATICCALL', async () => { it('properly executes ovmSTATICCALL to SLOAD', async () => { - const result = await executeOVMCall(executionManager, 'executeCall', [ - 0, - 0, - addressToBytes32Address(callContractAddress), - methodIds.makeStaticCall, - addressToBytes32Address(callContract2Address), - methodIds.staticFriendlySLOAD, - sloadKey, - ]) + const result = await executeOVMCall( + executionManager, + 'executeTransactionRaw', + [ + getCurrentTime(), + 0, + addressToBytes32Address(callContractAddress), + methodIds.makeStaticCall, + addressToBytes32Address(callContract2Address), + methodIds.staticFriendlySLOAD, + sloadKey, + ] + ) log.debug(`Result: [${result}]`) @@ -340,17 +343,21 @@ describe('Execution Manager -- Call opcodes', () => { }) it('properly executes nested ovmSTATICCALL to SLOAD', async () => { - const result = await executeOVMCall(executionManager, 'executeCall', [ - 0, - 0, - addressToBytes32Address(callContractAddress), - methodIds.makeStaticCall, - addressToBytes32Address(callContract2Address), - methodIds.makeStaticCall, - addressToBytes32Address(callContract2Address), - methodIds.staticFriendlySLOAD, - sloadKey, - ]) + const result = await executeOVMCall( + executionManager, + 'executeTransactionRaw', + [ + getCurrentTime(), + 0, + addressToBytes32Address(callContractAddress), + methodIds.makeStaticCall, + addressToBytes32Address(callContract2Address), + methodIds.makeStaticCall, + addressToBytes32Address(callContract2Address), + methodIds.staticFriendlySLOAD, + sloadKey, + ] + ) log.debug(`Result: [${result}]`) @@ -359,7 +366,7 @@ describe('Execution Manager -- Call opcodes', () => { it('successfully makes static call then call', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -378,7 +385,7 @@ describe('Execution Manager -- Call opcodes', () => { it('remains in static context when exiting nested static context', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -400,7 +407,7 @@ describe('Execution Manager -- Call opcodes', () => { it('fails on ovmSTATICCALL to SSTORE', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -424,7 +431,7 @@ describe('Execution Manager -- Call opcodes', () => { it('Fails to create on ovmSTATICCALL to CREATE -- tx', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -451,7 +458,7 @@ describe('Execution Manager -- Call opcodes', () => { it('Fails to create on ovmSTATICCALL to CREATE -- call', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -474,7 +481,7 @@ describe('Execution Manager -- Call opcodes', () => { it('fails on ovmSTATICCALL to CREATE2 -- tx', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -502,7 +509,7 @@ describe('Execution Manager -- Call opcodes', () => { it('fails on ovmSTATICCALL to CREATE2 -- call', async () => { const data: string = - methodIds.executeCall + + methodIds.executeTransactionRaw + encodeRawArguments([ getCurrentTime(), 0, @@ -525,13 +532,17 @@ describe('Execution Manager -- Call opcodes', () => { }) }) - const executeCall = (args: any[]): Promise => { - return executeOVMCall(executionManager, 'executeCall', [ + const executeTransaction = async ( + contractAddress: string, + methodId: string, + args: any[] + ): Promise => { + return executeOVMCall(executionManager, 'executeTransactionRaw', [ encodeRawArguments([ getCurrentTime(), 0, - addressToBytes32Address(callContractAddress), - methodIds.makeCall, + addressToBytes32Address(contractAddress), + methodId, ...args, ]), ]) diff --git a/packages/ovm/test/contracts/execution-manager.context-opcodes.spec.ts b/packages/ovm/test/contracts/execution-manager.context-opcodes.spec.ts index 9aab8f61eb86..49ff7cfb831e 100644 --- a/packages/ovm/test/contracts/execution-manager.context-opcodes.spec.ts +++ b/packages/ovm/test/contracts/execution-manager.context-opcodes.spec.ts @@ -36,7 +36,7 @@ const log = getLogger('execution-manager-context', true) const methodIds = fromPairs( [ 'callThroughExecutionManager', - 'executeCall', + 'executeTransactionRaw', 'getADDRESS', 'getCALLER', 'getGASLIMIT', @@ -112,12 +112,12 @@ describe('Execution Manager -- Context opcodes', () => { describe('ovmCALLER', async () => { it('reverts when CALLER is not set', async () => { await TestUtils.assertThrowsAsync(async () => { - await executeCall([contractAddress32, methodIds.ovmCALLER]) + await executeTransaction([contractAddress32, methodIds.ovmCALLER]) }) }) it('properly retrieves CALLER when caller is set', async () => { - const result = await executeCall([ + const result = await executeTransaction([ contractAddress32, methodIds.callThroughExecutionManager, contract2Address32, @@ -133,12 +133,12 @@ describe('Execution Manager -- Context opcodes', () => { describe('ovmADDRESS', async () => { it('reverts when ADDRESS is not set', async () => { await TestUtils.assertThrowsAsync(async () => { - await executeCall([contractAddress32, methodIds.ovmADDRESS]) + await executeTransaction([contractAddress32, methodIds.ovmADDRESS]) }) }) it('properly retrieves ADDRESS when address is set', async () => { - const result = await executeCall([ + const result = await executeTransaction([ contractAddress32, methodIds.callThroughExecutionManager, contract2Address32, @@ -155,14 +155,18 @@ describe('Execution Manager -- Context opcodes', () => { describe('ovmTIMESTAMP', async () => { it('properly retrieves TIMESTAMP', async () => { const timestamp: number = 1582890922 - const result = await executeOVMCall(executionManager, 'executeCall', [ - timestamp, - 0, - contractAddress32, - methodIds.callThroughExecutionManager, - contract2Address32, - methodIds.getTIMESTAMP, - ]) + const result = await executeOVMCall( + executionManager, + 'executeTransactionRaw', + [ + timestamp, + 0, + contractAddress32, + methodIds.callThroughExecutionManager, + contract2Address32, + methodIds.getTIMESTAMP, + ] + ) log.debug(`TIMESTAMP result: ${result}`) @@ -173,7 +177,7 @@ describe('Execution Manager -- Context opcodes', () => { describe('ovmGASLIMIT', async () => { it('properly retrieves GASLIMIT', async () => { - const result = await executeCall([ + const result = await executeTransaction([ contractAddress32, methodIds.callThroughExecutionManager, contract2Address32, @@ -190,14 +194,18 @@ describe('Execution Manager -- Context opcodes', () => { describe('ovmQueueOrigin', async () => { it('gets Queue Origin when it is 0', async () => { const queueOrigin: string = '00'.repeat(32) - const result = await executeOVMCall(executionManager, 'executeCall', [ - getCurrentTime(), - queueOrigin, - contractAddress32, - methodIds.callThroughExecutionManager, - contract2Address32, - methodIds.getQueueOrigin, - ]) + const result = await executeOVMCall( + executionManager, + 'executeTransactionRaw', + [ + getCurrentTime(), + queueOrigin, + contractAddress32, + methodIds.callThroughExecutionManager, + contract2Address32, + methodIds.getQueueOrigin, + ] + ) log.debug(`QUEUE ORIGIN result: ${result}`) @@ -207,14 +215,18 @@ describe('Execution Manager -- Context opcodes', () => { it('properly retrieves Queue Origin when queue origin is set', async () => { const queueOrigin: string = '00'.repeat(30) + '1111' - const result = await executeOVMCall(executionManager, 'executeCall', [ - getCurrentTime(), - queueOrigin, - contractAddress32, - methodIds.callThroughExecutionManager, - contract2Address32, - methodIds.getQueueOrigin, - ]) + const result = await executeOVMCall( + executionManager, + 'executeTransactionRaw', + [ + getCurrentTime(), + queueOrigin, + contractAddress32, + methodIds.callThroughExecutionManager, + contract2Address32, + methodIds.getQueueOrigin, + ] + ) log.debug(`QUEUE ORIGIN result: ${result}`) @@ -223,8 +235,8 @@ describe('Execution Manager -- Context opcodes', () => { }) }) - const executeCall = (args: any[]): Promise => { - return executeOVMCall(executionManager, 'executeCall', [ + const executeTransaction = (args: any[]): Promise => { + return executeOVMCall(executionManager, 'executeTransactionRaw', [ encodeRawArguments([getCurrentTime(), 0, ...args]), ]) } diff --git a/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts b/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts index 577393324a29..48796dd69712 100644 --- a/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts +++ b/packages/ovm/test/contracts/execution-manager.executeCall.spec.ts @@ -40,7 +40,7 @@ const log = getLogger('execution-manager-calls', true) *********/ const unsignedCallMethodId: string = ethereumjsAbi - .methodID('executeUnsignedEOACall', []) + .methodID('executeTransaction', []) .toString('hex') describe('Execution Manager -- Call opcodes', () => { @@ -145,7 +145,7 @@ describe('Execution Manager -- Call opcodes', () => { } // Call using Ethers - const tx = await executionManager.executeUnsignedEOACall( + const tx = await executionManager.executeTransaction( getCurrentTime(), 0, transaction.to, @@ -283,7 +283,7 @@ describe('Execution Manager -- Call opcodes', () => { const calldata = getUnsignedTransactionCalldata( executionManager, - 'executeUnsignedEOACall', + 'executeTransaction', [ ZERO_UINT, ZERO_UINT, @@ -325,7 +325,7 @@ describe('Execution Manager -- Call opcodes', () => { const calldata = getUnsignedTransactionCalldata( executionManager, - 'executeUnsignedEOACall', + 'executeTransaction', [ ZERO_UINT, ZERO_UINT, diff --git a/packages/ovm/test/contracts/execution-manager.l1-l2-opcodes.spec.ts b/packages/ovm/test/contracts/execution-manager.l1-l2-opcodes.spec.ts index 4ac4b23410f9..fb7ac45e11b5 100644 --- a/packages/ovm/test/contracts/execution-manager.l1-l2-opcodes.spec.ts +++ b/packages/ovm/test/contracts/execution-manager.l1-l2-opcodes.spec.ts @@ -63,18 +63,18 @@ function overrideAbiFunctionData( } /** - * Use executeUnsignedEOACall with `eth_call`. + * Use executeTransaction with `eth_call`. * @param {ethers.Contract} an ExecutionManager contract instance used for it's address & provider. - * @param {Array} an array of parameters which should be fed into `executeUnsignedEOACall(...)`. + * @param {Array} an array of parameters which should be fed into `executeTransaction(...)`. * @param {OutputTypes} an array ABI types which should be used to decode the output of the call. */ -function callExecutionManagerExecuteUnsignedEOACall( +function callExecutionManagerExecuteTransaction( executionManager: Contract, parameters: any[], outputTypes: any[] ): Promise { const modifiedAbi = cloneDeep(ExecutionManager.abi) - overrideAbiFunctionData(modifiedAbi, 'executeUnsignedEOACall', { + overrideAbiFunctionData(modifiedAbi, 'executeTransaction', { constant: true, outputs: outputTypes, }) @@ -83,7 +83,7 @@ function callExecutionManagerExecuteUnsignedEOACall( modifiedAbi, executionManager.provider ) - return callableExecutionManager.executeUnsignedEOACall.apply(null, parameters) + return callableExecutionManager.executeTransaction.apply(null, parameters) } /********* @@ -124,9 +124,9 @@ describe('Execution Manager -- L1 <-> L2 Opcodes', () => { ethereumjsAbi.methodID('passMessageToL1', ['bytes']) ) const txData: string = - encodeMethodId('executeCall') + + encodeMethodId('executeTransactionRaw') + encodeRawArguments([ - 0, + getCurrentTime(), 0, addressToBytes32Address(callContractAddress), encodeMethodId('makeCall'), @@ -164,12 +164,12 @@ describe('Execution Manager -- L1 <-> L2 Opcodes', () => { ethereumjsAbi.methodID('getL1MessageSender', []) ) - it.only('should return the l1 message sender provided', async () => { + it('should return the l1 message sender provided', async () => { const l1MessageSenderPrecompileAddr = '0x4200000000000000000000000000000000000001' const testL1MsgSenderAddress = '0x' + '01'.repeat(20) - const callResult = await callExecutionManagerExecuteUnsignedEOACall( + const callResult = await callExecutionManagerExecuteTransaction( executionManager, [ getCurrentTime(), @@ -195,7 +195,7 @@ describe('Execution Manager -- L1 <-> L2 Opcodes', () => { let failed = false try { - const callResult = await callExecutionManagerExecuteUnsignedEOACall( + const callResult = await callExecutionManagerExecuteTransaction( executionManager, [ 0, @@ -222,7 +222,7 @@ describe('Execution Manager -- L1 <-> L2 Opcodes', () => { let failed = false try { - const callResult = await callExecutionManagerExecuteUnsignedEOACall( + const callResult = await callExecutionManagerExecuteTransaction( executionManager, [ 0, diff --git a/packages/ovm/test/contracts/simple-storage.spec.ts b/packages/ovm/test/contracts/simple-storage.spec.ts index 4e17e337aba0..40df79289ea2 100644 --- a/packages/ovm/test/contracts/simple-storage.spec.ts +++ b/packages/ovm/test/contracts/simple-storage.spec.ts @@ -16,7 +16,7 @@ import * as SimpleStorage from '../../build/contracts/SimpleStorage.json' import { manuallyDeployOvmContract, getUnsignedTransactionCalldata, - executeUnsignedEOACall, + executeTransaction, DEFAULT_ETHNODE_GAS_LIMIT, gasLimit, } from '../helpers' @@ -72,7 +72,7 @@ describe('SimpleStorage', () => { .toString('hex') const innerCallData: string = add0x(`${setStorageMethodId}${slot}${value}`) - return executeUnsignedEOACall( + return executeTransaction( executionManager, wallet, simpleStorageOvmAddress, diff --git a/packages/ovm/test/govm/simple-storage.spec.ts b/packages/ovm/test/govm/simple-storage.spec.ts index 47fb2b38592f..61bff922cbcd 100644 --- a/packages/ovm/test/govm/simple-storage.spec.ts +++ b/packages/ovm/test/govm/simple-storage.spec.ts @@ -17,7 +17,7 @@ import { ensureGovmIsConnected, manuallyDeployOvmContract, getUnsignedTransactionCalldata, - executeUnsignedEOACall, + executeTransaction, } from '../helpers' import { CHAIN_ID, GAS_LIMIT } from '../../src/app' @@ -69,7 +69,7 @@ describe('SimpleStorage', () => { const setStorage = async (slot, value): Promise => { const innerCallData: string = add0x(`${setStorageMethodId}${slot}${value}`) - return executeUnsignedEOACall( + return executeTransaction( executionManager, wallet, simpleStorageOvmAddress, diff --git a/packages/ovm/test/helpers.ts b/packages/ovm/test/helpers.ts index a6eb194a1e11..e0ac8a2cf325 100644 --- a/packages/ovm/test/helpers.ts +++ b/packages/ovm/test/helpers.ts @@ -72,7 +72,7 @@ export const manuallyDeployOvmContractReturnReceipt = async ( contractDefinition.bytecode ).getDeployTransaction(...constructorArguments).data as string - const receipt: TransactionReceipt = await executeUnsignedEOACall( + const receipt: TransactionReceipt = await executeTransaction( executionManager, wallet, undefined, @@ -103,7 +103,7 @@ export const manuallyDeployOvmContract = async ( return receipt.contractAddress } -export const executeUnsignedEOACall = async ( +export const executeTransaction = async ( executionManager: Contract, wallet: Wallet, to: Address, @@ -119,7 +119,7 @@ export const executeUnsignedEOACall = async ( const ovmTo = to === null || to === undefined ? ZERO_ADDRESS : to // Actually make the call - const tx = await executionManager.executeUnsignedEOACall( + const tx = await executionManager.executeTransaction( getCurrentTime(), 0, ovmTo, diff --git a/packages/rollup-full-node/src/app/web3-rpc-handler.ts b/packages/rollup-full-node/src/app/web3-rpc-handler.ts index a3ffd359a5fd..6876ebd971d6 100644 --- a/packages/rollup-full-node/src/app/web3-rpc-handler.ts +++ b/packages/rollup-full-node/src/app/web3-rpc-handler.ts @@ -635,7 +635,7 @@ export class DefaultWeb3Handler implements Web3Handler, FullnodeHandler { ovmEntrypoint = ZERO_ADDRESS } return this.context.executionManager.interface.functions[ - 'executeUnsignedEOACall' + 'executeTransaction' ].encode([ timestamp, queueOrigin,