Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
lwedge99 committed Mar 25, 2024
1 parent fb25822 commit 546cb32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions eth/tracers/sentio/prestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (t *sentioPrestateTracer) CaptureTxEnd(restGas uint64) {
}
modified := false
postAccount := &account{Storage: make(map[common.Hash]common.Hash)}
newBalance := t.env.StateDB.GetBalance(addr)
newBalance := t.env.StateDB.GetBalance(addr).ToBig()
newNonce := t.env.StateDB.GetNonce(addr)
newCode := t.env.StateDB.GetCode(addr)
postAccount.CodeAddress = state.CodeAddress
Expand Down Expand Up @@ -301,7 +301,7 @@ func (t *sentioPrestateTracer) lookupAccount(addr common.Address) {
}

t.pre[addr] = &account{
Balance: t.env.StateDB.GetBalance(addr),
Balance: t.env.StateDB.GetBalance(addr).ToBig(),
Nonce: t.env.StateDB.GetNonce(addr),
Code: t.env.StateDB.GetCode(addr),
Storage: make(map[common.Hash]common.Hash),
Expand Down
4 changes: 2 additions & 2 deletions eth/tracers/sentio/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func (t *sentioTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, s
call.To = &to
call.Value = (*hexutil.Big)(scope.Stack.Back(2).ToBig())

v := call.Value.ToInt()
v := uint256.MustFromBig(call.Value.ToInt())
if v.BitLen() != 0 && !t.env.Context.CanTransfer(t.env.StateDB, from, v) {
if call.Error == "" {
call.Error = "insufficient funds for transfer"
Expand All @@ -341,7 +341,7 @@ func (t *sentioTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, s
// Treat this call as pure transfer until it enters the CaptureEnter
t.callstack[len(t.callstack)-1].Traces = append(t.callstack[len(t.callstack)-1].Traces, call)
case vm.CREATE, vm.CREATE2, vm.DELEGATECALL, vm.STATICCALL, vm.SELFDESTRUCT:
// more info to be add at CaptureEnter
// more info to be added at CaptureEnter
call := mergeBase(Trace{})
t.callstack = append(t.callstack, call)
case vm.LOG0, vm.LOG1, vm.LOG2, vm.LOG3, vm.LOG4:
Expand Down

0 comments on commit 546cb32

Please sign in to comment.