Merge pull request #1348 from ConsenSys/call/gaslim

fix gas limit for calls
ether_transfer
Bernhard Mueller 5 years ago committed by GitHub
commit fe6d6f53df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mythril/laser/ethereum/call.py

@ -5,6 +5,7 @@ parameters for the new global state."""
import logging
import re
from typing import Union, List, cast, Callable, Optional
from ethereum.opcodes import GSTIPEND
import mythril.laser.ethereum.util as util
from mythril.laser.ethereum import natives
@ -17,7 +18,7 @@ from mythril.laser.ethereum.state.calldata import (
ConcreteCalldata,
)
from mythril.laser.ethereum.state.global_state import GlobalState
from mythril.laser.smt import BitVec, is_true
from mythril.laser.smt import BitVec, is_true, If
from mythril.laser.smt import simplify, Expression, symbol_factory
from mythril.support.loader import DynLoader
@ -61,6 +62,7 @@ def get_call_parameters(
global_state, callee_address, dynamic_loader
)
gas = gas + If(value > 0, symbol_factory.BitVecVal(GSTIPEND, gas.size()), 0)
return (
callee_address,
callee_account,

Loading…
Cancel
Save