Skip to content

Commit

Permalink
add descriptive comments to stack args
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Jul 8, 2024
1 parent 4c96aaf commit 80cf3d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arbos/util/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func NewTracingInfo(evm *vm.EVM, from, to common.Address, scenario TracingScenar
func (info *TracingInfo) RecordEmitLog(topics []common.Hash, data []byte) {
size := uint64(len(data))
var args []uint256.Int
args = append(args, *uint256.NewInt(0))
args = append(args, *uint256.NewInt(size))
args = append(args, *uint256.NewInt(0)) // offset: byte offset in the memory in bytes
args = append(args, *uint256.NewInt(size)) // size: byte size to copy (length of data)
for _, topic := range topics {
args = append(args, HashToUint256(topic))
args = append(args, HashToUint256(topic)) // topic: 32-byte value. Max topics count is 4
}
memory := vm.NewMemory()
memory.Resize(size)
Expand Down

0 comments on commit 80cf3d4

Please sign in to comment.