@Override
  public Bytes getData(final int offset, final int length) {
    Bytes data = eofLayout.data();
    int dataLen = data.size();
    if (offset > dataLen) {
      return Bytes.EMPTY;
    } else if ((offset + length) > dataLen) {
      byte[] result = new byte[length];
      MutableBytes mbytes = MutableBytes.wrap(result);
      data.slice(offset).copyTo(mbytes, 0);
      return Bytes.wrap(result);
    } else {
      return data.slice(offset, length);
    }
  }
Instantiates a new CodeV1.

@param eofLayout the layout
evm/src/main/java/org/hyperledger/besu/evm/code/CodeV1.java