Commit 497a8bbd authored by Kelvin Fichter's avatar Kelvin Fichter Committed by GitHub

cleanup: ECDSAContractAccount (#292)

parent 33065e82
...@@ -22,8 +22,15 @@ import { Lib_SafeMathWrapper } from "../../libraries/wrappers/Lib_SafeMathWrappe ...@@ -22,8 +22,15 @@ import { Lib_SafeMathWrapper } from "../../libraries/wrappers/Lib_SafeMathWrappe
*/ */
contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount { contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount {
/*************
* Constants *
*************/
// TODO: should be the amount sufficient to cover the gas costs of all of the transactions up
// to and including the CALL/CREATE which forms the entrypoint of the transaction.
uint256 constant EXECUTION_VALIDATION_GAS_OVERHEAD = 25000;
address constant ETH_ERC20_ADDRESS = 0x4200000000000000000000000000000000000006; address constant ETH_ERC20_ADDRESS = 0x4200000000000000000000000000000000000006;
uint256 constant EXECUTION_VALIDATION_GAS_OVERHEAD = 25000; // TODO: should be the amount sufficient to cover the gas costs of all of the transactions up to and including the CALL/CREATE which forms the entrypoint of the transaction.
/******************** /********************
* Public Functions * * Public Functions *
...@@ -36,8 +43,8 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount { ...@@ -36,8 +43,8 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount {
* @param _v Signature `v` parameter. * @param _v Signature `v` parameter.
* @param _r Signature `r` parameter. * @param _r Signature `r` parameter.
* @param _s Signature `s` parameter. * @param _s Signature `s` parameter.
* @return _success Whether or not the call returned (rather than reverted). * @return Whether or not the call returned (rather than reverted).
* @return _returndata Data returned by the call. * @return Data returned by the call.
*/ */
function execute( function execute(
bytes memory _transaction, bytes memory _transaction,
...@@ -49,8 +56,8 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount { ...@@ -49,8 +56,8 @@ contract OVM_ECDSAContractAccount is iOVM_ECDSAContractAccount {
override override
public public
returns ( returns (
bool _success, bool,
bytes memory _returndata bytes memory
) )
{ {
bool isEthSign = _signatureType == Lib_OVMCodec.EOASignatureType.ETH_SIGNED_MESSAGE; bool isEthSign = _signatureType == Lib_OVMCodec.EOASignatureType.ETH_SIGNED_MESSAGE;
......
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