diff --git a/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ECDSAContractAccount.sol b/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ECDSAContractAccount.sol index b3fd2c869adec30f0392754c4d84530be9a66ecd..ee013f1e69345262a212dd0863a7e3fe89ef2f04 100644 --- a/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ECDSAContractAccount.sol +++ b/packages/contracts/contracts/optimistic-ethereum/OVM/accounts/OVM_ECDSAContractAccount.sol @@ -114,7 +114,7 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount { // Contract creations are signalled by sending a transaction to the zero address. if (decodedTx.to == address(0)) { (address created, bytes memory revertData) = Lib_SafeExecutionManagerWrapper.safeCREATE( - decodedTx.gasLimit, + gasleft(), decodedTx.data ); @@ -131,7 +131,7 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount { Lib_SafeExecutionManagerWrapper.safeINCREMENTNONCE(); return Lib_SafeExecutionManagerWrapper.safeCALL( - decodedTx.gasLimit, + gasleft(), decodedTx.to, decodedTx.data ); diff --git a/packages/contracts/test/contracts/OVM/accounts/OVM_ECDSAContractAccount.spec.ts b/packages/contracts/test/contracts/OVM/accounts/OVM_ECDSAContractAccount.spec.ts index 186aff6aa71c410623f66771cf6a5d3e3fdafd28..9bb7fc5bd165209cf9412a438efac47c22914568 100644 --- a/packages/contracts/test/contracts/OVM/accounts/OVM_ECDSAContractAccount.spec.ts +++ b/packages/contracts/test/contracts/OVM/accounts/OVM_ECDSAContractAccount.spec.ts @@ -106,7 +106,6 @@ describe('OVM_ECDSAContractAccount', () => { // The ovmCALL is the 2nd call because the first call transfers the fee. const ovmCALL: any = Mock__OVM_ExecutionManager.smocked.ovmCALL.calls[1] - expect(ovmCALL._gasLimit).to.equal(DEFAULT_EIP155_TX.gasLimit) expect(ovmCALL._address).to.equal(DEFAULT_EIP155_TX.to) expect(ovmCALL._calldata).to.equal(DEFAULT_EIP155_TX.data) }) @@ -130,7 +129,6 @@ describe('OVM_ECDSAContractAccount', () => { // The ovmCALL is the 2nd call because the first call transfers the fee. const ovmCALL: any = Mock__OVM_ExecutionManager.smocked.ovmCALL.calls[1] - expect(ovmCALL._gasLimit).to.equal(DEFAULT_EIP155_TX.gasLimit) expect(ovmCALL._address).to.equal(DEFAULT_EIP155_TX.to) expect(ovmCALL._calldata).to.equal(DEFAULT_EIP155_TX.data) })