@@ -232,7 +232,7 @@ func opSAR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte
232
232
233
233
func opKeccak256 (pc * uint64 , interpreter * EVMInterpreter , scope * ScopeContext ) ([]byte , error ) {
234
234
offset , size := scope .Stack .pop (), scope .Stack .peek ()
235
- data := scope .Memory .GetPtr (int64 ( offset .Uint64 ()), int64 ( size .Uint64 () ))
235
+ data := scope .Memory .GetPtr (offset .Uint64 (), size .Uint64 ())
236
236
237
237
if interpreter .hasher == nil {
238
238
interpreter .hasher = crypto .NewKeccakState ()
@@ -502,7 +502,7 @@ func opPop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte
502
502
503
503
func opMload (pc * uint64 , interpreter * EVMInterpreter , scope * ScopeContext ) ([]byte , error ) {
504
504
v := scope .Stack .peek ()
505
- offset := int64 ( v .Uint64 () )
505
+ offset := v .Uint64 ()
506
506
v .SetBytes (scope .Memory .GetPtr (offset , 32 ))
507
507
return nil , nil
508
508
}
@@ -670,7 +670,7 @@ func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]b
670
670
var (
671
671
value = scope .Stack .pop ()
672
672
offset , size = scope .Stack .pop (), scope .Stack .pop ()
673
- input = scope .Memory .GetCopy (int64 ( offset .Uint64 ()), int64 ( size .Uint64 () ))
673
+ input = scope .Memory .GetCopy (offset .Uint64 (), size .Uint64 ())
674
674
gas = scope .Contract .Gas
675
675
)
676
676
if interpreter .evm .chainRules .IsEIP150 {
@@ -714,7 +714,7 @@ func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
714
714
endowment = scope .Stack .pop ()
715
715
offset , size = scope .Stack .pop (), scope .Stack .pop ()
716
716
salt = scope .Stack .pop ()
717
- input = scope .Memory .GetCopy (int64 ( offset .Uint64 ()), int64 ( size .Uint64 () ))
717
+ input = scope .Memory .GetCopy (offset .Uint64 (), size .Uint64 ())
718
718
gas = scope .Contract .Gas
719
719
)
720
720
@@ -752,7 +752,7 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt
752
752
addr , value , inOffset , inSize , retOffset , retSize := stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop ()
753
753
toAddr := common .Address (addr .Bytes20 ())
754
754
// Get the arguments from the memory.
755
- args := scope .Memory .GetPtr (int64 ( inOffset .Uint64 ()), int64 ( inSize .Uint64 () ))
755
+ args := scope .Memory .GetPtr (inOffset .Uint64 (), inSize .Uint64 ())
756
756
757
757
if interpreter .readOnly && ! value .IsZero () {
758
758
return nil , ErrWriteProtection
@@ -788,7 +788,7 @@ func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([
788
788
addr , value , inOffset , inSize , retOffset , retSize := stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop ()
789
789
toAddr := common .Address (addr .Bytes20 ())
790
790
// Get arguments from the memory.
791
- args := scope .Memory .GetPtr (int64 ( inOffset .Uint64 ()), int64 ( inSize .Uint64 () ))
791
+ args := scope .Memory .GetPtr (inOffset .Uint64 (), inSize .Uint64 ())
792
792
793
793
if ! value .IsZero () {
794
794
gas += params .CallStipend
@@ -821,7 +821,7 @@ func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext
821
821
addr , inOffset , inSize , retOffset , retSize := stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop ()
822
822
toAddr := common .Address (addr .Bytes20 ())
823
823
// Get arguments from the memory.
824
- args := scope .Memory .GetPtr (int64 ( inOffset .Uint64 ()), int64 ( inSize .Uint64 () ))
824
+ args := scope .Memory .GetPtr (inOffset .Uint64 (), inSize .Uint64 ())
825
825
826
826
ret , returnGas , err := interpreter .evm .DelegateCall (scope .Contract , toAddr , args , gas )
827
827
if err != nil {
@@ -850,7 +850,7 @@ func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
850
850
addr , inOffset , inSize , retOffset , retSize := stack .pop (), stack .pop (), stack .pop (), stack .pop (), stack .pop ()
851
851
toAddr := common .Address (addr .Bytes20 ())
852
852
// Get arguments from the memory.
853
- args := scope .Memory .GetPtr (int64 ( inOffset .Uint64 ()), int64 ( inSize .Uint64 () ))
853
+ args := scope .Memory .GetPtr (inOffset .Uint64 (), inSize .Uint64 ())
854
854
855
855
ret , returnGas , err := interpreter .evm .StaticCall (scope .Contract , toAddr , args , gas )
856
856
if err != nil {
@@ -871,14 +871,14 @@ func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
871
871
872
872
func opReturn (pc * uint64 , interpreter * EVMInterpreter , scope * ScopeContext ) ([]byte , error ) {
873
873
offset , size := scope .Stack .pop (), scope .Stack .pop ()
874
- ret := scope .Memory .GetPtr (int64 ( offset .Uint64 ()), int64 ( size .Uint64 () ))
874
+ ret := scope .Memory .GetPtr (offset .Uint64 (), size .Uint64 ())
875
875
876
876
return ret , errStopToken
877
877
}
878
878
879
879
func opRevert (pc * uint64 , interpreter * EVMInterpreter , scope * ScopeContext ) ([]byte , error ) {
880
880
offset , size := scope .Stack .pop (), scope .Stack .pop ()
881
- ret := scope .Memory .GetPtr (int64 ( offset .Uint64 ()), int64 ( size .Uint64 () ))
881
+ ret := scope .Memory .GetPtr (offset .Uint64 (), size .Uint64 ())
882
882
883
883
interpreter .returnData = ret
884
884
return ret , ErrExecutionReverted
@@ -947,7 +947,7 @@ func makeLog(size int) executionFunc {
947
947
topics [i ] = addr .Bytes32 ()
948
948
}
949
949
950
- d := scope .Memory .GetCopy (int64 ( mStart .Uint64 ()), int64 ( mSize .Uint64 () ))
950
+ d := scope .Memory .GetCopy (mStart .Uint64 (), mSize .Uint64 ())
951
951
interpreter .evm .StateDB .AddLog (& types.Log {
952
952
Address : scope .Contract .Address (),
953
953
Topics : topics ,
0 commit comments