MCPcopy Create free account
hub / github.com/Jesserc/gevm / getData

Function getData

gevm/common.go:66–76  ·  view source on GitHub ↗

getData returns a slice from the data based on the start and size and pads up to size with zero's. This function is overflow safe.

(data []byte, start uint64, size uint64)

Source from the content-addressed store, hash-verified

64// getData returns a slice from the data based on the start and size and pads
65// up to size with zero's. This function is overflow safe.
66func getData(data []byte, start uint64, size uint64) []byte {
67 length := uint64(len(data))
68 if start > length {
69 start = length
70 }
71 end := start + size
72 if end > length {
73 end = length
74 }
75 return common.RightPadBytes(data[start:end], int(size))
76}

Callers 5

TestGetDataFunction · 0.85
calldataloadFunction · 0.85
calldatacopyFunction · 0.85
codecopyFunction · 0.85
mcopyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetDataFunction · 0.68