public static OperationResult staticOperation(
      final MessageFrame frame, final byte[] code, final int pc, final int pushSize) {
    final int copyStart = pc + 1;
    Bytes push;
    if (code.length <= copyStart) {
      push = Bytes.EMPTY;
    } else {
      final int copyLength = Math.min(pushSize, code.length - pc - 1);
      final int rightPad = pushSize - copyLength;
      if (rightPad == 0) {
        push = Bytes.wrap(code, copyStart, copyLength);
      } else {
        // Right Pad the push with 0s up to pushSize if greater than the copyLength
        var bytecodeLocal = new byte[pushSize];
        System.arraycopy(code, copyStart, bytecodeLocal, 0, copyLength);
        push = Bytes.wrap(bytecodeLocal);
      }
    }
    frame.pushStackItem(push);
    frame.setPC(pc + pushSize);
    return pushSuccess;
  }
Performs Push operation.

@param frame the frame
@param code the code
@param pc the pc
@param pushSize the push size
@return the operation result
evm/src/main/java/org/hyperledger/besu/evm/operation/PushOperation.java